diff --git a/src/main/java/svenhjol/charmonium/helper/BiomeHelper.java b/src/main/java/svenhjol/charmonium/helper/BiomeHelper.java index 36bc732..37ce261 100644 --- a/src/main/java/svenhjol/charmonium/helper/BiomeHelper.java +++ b/src/main/java/svenhjol/charmonium/helper/BiomeHelper.java @@ -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; @@ -21,6 +22,6 @@ public static Holder getBiomeHolder(Level level, BlockPos pos) { @Nullable public static ResourceKey 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); } } diff --git a/src/main/java/svenhjol/charmonium/registry/ClientRegistry.java b/src/main/java/svenhjol/charmonium/registry/ClientRegistry.java index 5c64f3e..573b5ac 100644 --- a/src/main/java/svenhjol/charmonium/registry/ClientRegistry.java +++ b/src/main/java/svenhjol/charmonium/registry/ClientRegistry.java @@ -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; @@ -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)); } }