Skip to content

Commit

Permalink
Updated to local version
Browse files Browse the repository at this point in the history
  • Loading branch information
Meelee35 committed Apr 20, 2023
1 parent 98f8408 commit 98a21d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/java/svenhjol/charmonium/helper/BiomeHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import net.minecraft.core.BlockPos;
import net.minecraft.core.Holder;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.biome.Biome;
Expand All @@ -21,6 +22,6 @@ public static Holder<Biome> getBiomeHolder(Level level, BlockPos pos) {
@Nullable
public static ResourceKey<Biome> getBiomeKey(Level level, BlockPos pos) {
var biome = getBiome(level, pos);
return level.registryAccess().registryOrThrow(Registries.BIOME_REGISTRY).getResourceKey(biome).orElse(null);
return level.registryAccess().registryOrThrow(Registries.BIOME).getResourceKey(biome).orElse(null);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package svenhjol.charmonium.registry;

import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundEvent;
import svenhjol.charmonium.Charmonium;
Expand All @@ -13,6 +14,6 @@ public class ClientRegistry {
public static SoundEvent sound(String id) {
ResourceLocation res = new ResourceLocation(Charmonium.MOD_ID, id);
LogHelper.debug(ClientRegistry.class, "Registering sound `" + res + "`");
return Registry.register(Registries.SOUND_EVENT, res, new SoundEvent(res));
return Registry.register(BuiltInRegistries.SOUND_EVENT, res, SoundEvent.createVariableRangeEvent(res));
}
}

0 comments on commit 98a21d4

Please sign in to comment.