Fixed Compiletime issue

This commit is contained in:
Frank 2022-12-09 16:01:06 +01:00
parent fd2559e038
commit a8856fff15
94 changed files with 562 additions and 574 deletions

View file

@ -9,7 +9,7 @@ import org.betterx.betterend.registry.EndEntities;
import org.betterx.betterend.registry.EndItems;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.Registries;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.NbtUtils;
import net.minecraft.resources.ResourceKey;
@ -95,7 +95,7 @@ public class SilkMothEntity extends Animal implements FlyingAnimal {
hivePos = NbtUtils.readBlockPos(tag.getCompound("HivePos"));
ResourceLocation worldID = new ResourceLocation(tag.getString("HiveWorld"));
try {
hiveWorld = level.getServer().getLevel(ResourceKey.create(Registry.DIMENSION_REGISTRY, worldID));
hiveWorld = level.getServer().getLevel(ResourceKey.create(Registries.DIMENSION, worldID));
} catch (Exception e) {
BetterEnd.LOGGER.warning("Silk Moth Hive World {} is missing!", worldID);
hivePos = null;