From 1077275376d9bfc5262cb04135a281315e2f4bba Mon Sep 17 00:00:00 2001 From: Marcel Konrad Date: Tue, 12 Jul 2022 21:22:02 +0200 Subject: [PATCH] Update to forge 41.0.96 --- build.gradle | 2 +- .../exopandora/worldhandler/WorldHandler.java | 2 +- .../argument/EntitySummonArgument.java | 58 +++++++++---------- .../config/ConfigCategoryButcher.java | 2 +- .../event/ClientEventHandler.java | 6 +- .../gui/content/impl/ContentButcher.java | 4 +- .../content/impl/ContentButcherPresets.java | 8 +-- .../content/impl/ContentButcherSettings.java | 6 +- .../gui/content/impl/ContentCommandStack.java | 10 ++-- .../impl/ContentScoreboardObjectives.java | 2 +- .../gui/content/impl/ContentSummon.java | 8 +-- .../worldhandler/util/RegistryHelper.java | 2 +- 12 files changed, 55 insertions(+), 55 deletions(-) diff --git a/build.gradle b/build.gradle index 77a133a..e49a443 100644 --- a/build.gradle +++ b/build.gradle @@ -106,7 +106,7 @@ dependencies { // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied. // The userdev artifact is a special name and will get all sorts of transformations applied to it. - minecraft 'net.minecraftforge:forge:1.19-41.0.64' + minecraft 'net.minecraftforge:forge:1.19-41.0.96' // You may put jars on which you depend on in ./libs or you may define them like so.. // compile "some.group:artifact:version:classifier" diff --git a/src/main/java/exopandora/worldhandler/WorldHandler.java b/src/main/java/exopandora/worldhandler/WorldHandler.java index a561bf7..89eadc7 100644 --- a/src/main/java/exopandora/worldhandler/WorldHandler.java +++ b/src/main/java/exopandora/worldhandler/WorldHandler.java @@ -67,7 +67,7 @@ public class WorldHandler public void clientSetup(FMLClientSetupEvent event) { MinecraftForge.EVENT_BUS.addListener(KeyHandler::keyInputEvent); - MinecraftForge.EVENT_BUS.addListener(ClientEventHandler::renderLevelLastEvent); + MinecraftForge.EVENT_BUS.addListener(ClientEventHandler::renderLevelStageEvent); MinecraftForge.EVENT_BUS.addListener(ClientEventHandler::clientTickEvent); } diff --git a/src/main/java/exopandora/worldhandler/builder/argument/EntitySummonArgument.java b/src/main/java/exopandora/worldhandler/builder/argument/EntitySummonArgument.java index 1d3e1bd..6a563b2 100644 --- a/src/main/java/exopandora/worldhandler/builder/argument/EntitySummonArgument.java +++ b/src/main/java/exopandora/worldhandler/builder/argument/EntitySummonArgument.java @@ -16,32 +16,32 @@ public class EntitySummonArgument implements IDeserializableArgument { private static final Map ALIASES = Util.make(new HashMap(), map -> { - map.put("RedCow", ForgeRegistries.ENTITIES.getKey(EntityType.MOOSHROOM)); - map.put("ChickenJockey", ForgeRegistries.ENTITIES.getKey(EntityType.CHICKEN)); - map.put("Pigman", ForgeRegistries.ENTITIES.getKey(EntityType.PIGLIN)); - map.put("ZombiePig", ForgeRegistries.ENTITIES.getKey(EntityType.PIGLIN)); - map.put("ZombiePigman", ForgeRegistries.ENTITIES.getKey(EntityType.PIGLIN)); - map.put("Dog", ForgeRegistries.ENTITIES.getKey(EntityType.WOLF)); - map.put("Dragon", ForgeRegistries.ENTITIES.getKey(EntityType.ENDER_DRAGON)); - map.put("SnowMan", ForgeRegistries.ENTITIES.getKey(EntityType.SNOW_GOLEM)); - map.put("LavaCube", ForgeRegistries.ENTITIES.getKey(EntityType.MAGMA_CUBE)); - map.put("MagmaSlime", ForgeRegistries.ENTITIES.getKey(EntityType.MAGMA_CUBE)); - map.put("LavaSlime", ForgeRegistries.ENTITIES.getKey(EntityType.MAGMA_CUBE)); - map.put("SpiderJockey", ForgeRegistries.ENTITIES.getKey(EntityType.SPIDER)); - map.put("VillagerGolem", ForgeRegistries.ENTITIES.getKey(EntityType.IRON_GOLEM)); - map.put("Ozelot", ForgeRegistries.ENTITIES.getKey(EntityType.OCELOT)); - map.put("Kitty", ForgeRegistries.ENTITIES.getKey(EntityType.CAT)); - map.put("Kitten", ForgeRegistries.ENTITIES.getKey(EntityType.CAT)); - map.put("TESTIFICATE", ForgeRegistries.ENTITIES.getKey(EntityType.VILLAGER)); - map.put("Octopus", ForgeRegistries.ENTITIES.getKey(EntityType.SQUID)); - map.put("GlowingOctopus", ForgeRegistries.ENTITIES.getKey(EntityType.SQUID)); - map.put("Exwife", ForgeRegistries.ENTITIES.getKey(EntityType.GHAST)); - map.put("CommandMinecart", ForgeRegistries.ENTITIES.getKey(EntityType.COMMAND_BLOCK_MINECART)); - map.put("Wizard", ForgeRegistries.ENTITIES.getKey(EntityType.EVOKER)); - map.put("Johnny", ForgeRegistries.ENTITIES.getKey(EntityType.VINDICATOR)); - map.put("BabyZombie", ForgeRegistries.ENTITIES.getKey(EntityType.ZOMBIE)); + map.put("RedCow", ForgeRegistries.ENTITY_TYPES.getKey(EntityType.MOOSHROOM)); + map.put("ChickenJockey", ForgeRegistries.ENTITY_TYPES.getKey(EntityType.CHICKEN)); + map.put("Pigman", ForgeRegistries.ENTITY_TYPES.getKey(EntityType.PIGLIN)); + map.put("ZombiePig", ForgeRegistries.ENTITY_TYPES.getKey(EntityType.PIGLIN)); + map.put("ZombiePigman", ForgeRegistries.ENTITY_TYPES.getKey(EntityType.PIGLIN)); + map.put("Dog", ForgeRegistries.ENTITY_TYPES.getKey(EntityType.WOLF)); + map.put("Dragon", ForgeRegistries.ENTITY_TYPES.getKey(EntityType.ENDER_DRAGON)); + map.put("SnowMan", ForgeRegistries.ENTITY_TYPES.getKey(EntityType.SNOW_GOLEM)); + map.put("LavaCube", ForgeRegistries.ENTITY_TYPES.getKey(EntityType.MAGMA_CUBE)); + map.put("MagmaSlime", ForgeRegistries.ENTITY_TYPES.getKey(EntityType.MAGMA_CUBE)); + map.put("LavaSlime", ForgeRegistries.ENTITY_TYPES.getKey(EntityType.MAGMA_CUBE)); + map.put("SpiderJockey", ForgeRegistries.ENTITY_TYPES.getKey(EntityType.SPIDER)); + map.put("VillagerGolem", ForgeRegistries.ENTITY_TYPES.getKey(EntityType.IRON_GOLEM)); + map.put("Ozelot", ForgeRegistries.ENTITY_TYPES.getKey(EntityType.OCELOT)); + map.put("Kitty", ForgeRegistries.ENTITY_TYPES.getKey(EntityType.CAT)); + map.put("Kitten", ForgeRegistries.ENTITY_TYPES.getKey(EntityType.CAT)); + map.put("TESTIFICATE", ForgeRegistries.ENTITY_TYPES.getKey(EntityType.VILLAGER)); + map.put("Octopus", ForgeRegistries.ENTITY_TYPES.getKey(EntityType.SQUID)); + map.put("GlowingOctopus", ForgeRegistries.ENTITY_TYPES.getKey(EntityType.SQUID)); + map.put("Exwife", ForgeRegistries.ENTITY_TYPES.getKey(EntityType.GHAST)); + map.put("CommandMinecart", ForgeRegistries.ENTITY_TYPES.getKey(EntityType.COMMAND_BLOCK_MINECART)); + map.put("Wizard", ForgeRegistries.ENTITY_TYPES.getKey(EntityType.EVOKER)); + map.put("Johnny", ForgeRegistries.ENTITY_TYPES.getKey(EntityType.VINDICATOR)); + map.put("BabyZombie", ForgeRegistries.ENTITY_TYPES.getKey(EntityType.ZOMBIE)); - ForgeRegistries.PROFESSIONS.getEntries().stream().forEach(profession -> map.put(profession.getKey().location().getPath(), profession.getKey().location())); + ForgeRegistries.VILLAGER_PROFESSIONS.getEntries().stream().forEach(profession -> map.put(profession.getKey().location().getPath(), profession.getKey().location())); }); private EntityType entity; @@ -67,10 +67,10 @@ public class EntitySummonArgument implements IDeserializableArgument { if(entity != null) { - EntityType type = ForgeRegistries.ENTITIES.getValue(entity); - ResourceLocation location = ForgeRegistries.ENTITIES.getKey(type); + EntityType type = ForgeRegistries.ENTITY_TYPES.getValue(entity); + ResourceLocation location = ForgeRegistries.ENTITY_TYPES.getKey(type); - if(!ForgeRegistries.ENTITIES.getDefaultKey().equals(location) || location.equals(entity)) + if(!ForgeRegistries.ENTITY_TYPES.getDefaultKey().equals(location) || location.equals(entity)) { this.set(type); } @@ -124,7 +124,7 @@ public class EntitySummonArgument implements IDeserializableArgument return null; } - return ForgeRegistries.ENTITIES.getKey(this.entity).toString(); + return ForgeRegistries.ENTITY_TYPES.getKey(this.entity).toString(); } @Override diff --git a/src/main/java/exopandora/worldhandler/config/ConfigCategoryButcher.java b/src/main/java/exopandora/worldhandler/config/ConfigCategoryButcher.java index 5ad4d8e..1ce22c6 100644 --- a/src/main/java/exopandora/worldhandler/config/ConfigCategoryButcher.java +++ b/src/main/java/exopandora/worldhandler/config/ConfigCategoryButcher.java @@ -63,7 +63,7 @@ public class ConfigCategoryButcher { if(string != null) { - return ForgeRegistries.ENTITIES.containsKey(ResourceLocation.tryParse(string.toString())); + return ForgeRegistries.ENTITY_TYPES.containsKey(ResourceLocation.tryParse(string.toString())); } return false; diff --git a/src/main/java/exopandora/worldhandler/event/ClientEventHandler.java b/src/main/java/exopandora/worldhandler/event/ClientEventHandler.java index f052487..006769e 100644 --- a/src/main/java/exopandora/worldhandler/event/ClientEventHandler.java +++ b/src/main/java/exopandora/worldhandler/event/ClientEventHandler.java @@ -13,7 +13,7 @@ import net.minecraft.client.renderer.MultiBufferSource.BufferSource; import net.minecraft.client.renderer.RenderType; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; -import net.minecraftforge.client.event.RenderLevelLastEvent; +import net.minecraftforge.client.event.RenderLevelStageEvent; import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.TickEvent.ClientTickEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -23,9 +23,9 @@ public class ClientEventHandler public static boolean openGui; @SubscribeEvent - public static void renderLevelLastEvent(RenderLevelLastEvent event) + public static void renderLevelStageEvent(RenderLevelStageEvent event) { - if(Config.getSettings().highlightBlocks() && Minecraft.getInstance().level != null && Minecraft.getInstance().getEntityRenderDispatcher().camera != null) + if(RenderLevelStageEvent.Stage.AFTER_CUTOUT_MIPPED_BLOCKS_BLOCKS.equals(event.getStage()) && Config.getSettings().highlightBlocks() && Minecraft.getInstance().level != null && Minecraft.getInstance().getEntityRenderDispatcher().camera != null) { Vec3 projected = Minecraft.getInstance().getEntityRenderDispatcher().camera.getPosition(); diff --git a/src/main/java/exopandora/worldhandler/gui/content/impl/ContentButcher.java b/src/main/java/exopandora/worldhandler/gui/content/impl/ContentButcher.java index 7246946..b5ab7ac 100644 --- a/src/main/java/exopandora/worldhandler/gui/content/impl/ContentButcher.java +++ b/src/main/java/exopandora/worldhandler/gui/content/impl/ContentButcher.java @@ -103,7 +103,7 @@ public class ContentButcher extends Content container.add(slaughter = new GuiButtonBase(x + 58, y + 48, 114, 20, Component.translatable("gui.worldhandler.butcher.slaughter"), () -> { - Collection> entities = Config.getButcher().getEntities().stream().map(ForgeRegistries.ENTITIES::getValue).filter(Predicates.notNull()).collect(Collectors.toList()); + Collection> entities = Config.getButcher().getEntities().stream().map(ForgeRegistries.ENTITY_TYPES::getValue).filter(Predicates.notNull()).collect(Collectors.toList()); ContentButcher.slaughter(container.getPlayer(), entities, Integer.parseInt(this.radius)); })); slaughter.active = enabled && !Config.getButcher().getEntities().isEmpty(); @@ -133,7 +133,7 @@ public class ContentButcher extends Content { KillCommandBuilder kill = new KillCommandBuilder(); kill.targets().setSelectorType(SelectorTypes.ALL_ENTITIES); - kill.targets().setType(ForgeRegistries.ENTITIES.getKey(entity)); + kill.targets().setType(ForgeRegistries.ENTITY_TYPES.getKey(entity)); kill.targets().setDistanceMax(radius); CommandHelper.sendCommand(username, kill, KillCommandBuilder.Label.KILL_TARGETS); } diff --git a/src/main/java/exopandora/worldhandler/gui/content/impl/ContentButcherPresets.java b/src/main/java/exopandora/worldhandler/gui/content/impl/ContentButcherPresets.java index 7ca1624..04fdacc 100644 --- a/src/main/java/exopandora/worldhandler/gui/content/impl/ContentButcherPresets.java +++ b/src/main/java/exopandora/worldhandler/gui/content/impl/ContentButcherPresets.java @@ -42,22 +42,22 @@ public class ContentButcherPresets extends ContentChild container.add(new GuiButtonBase(x + 58, y, 114, 20, Component.translatable("gui.worldhandler.butcher.presets.passive_mobs"), () -> { - ContentButcher.slaughter(container.getPlayer(), ForgeRegistries.ENTITIES.getValues().stream().filter(entity -> !MobCategory.MONSTER.equals(entity.getCategory()) && !MobCategory.MISC.equals(entity.getCategory())).collect(Collectors.toList()), this.radius); + ContentButcher.slaughter(container.getPlayer(), ForgeRegistries.ENTITY_TYPES.getValues().stream().filter(entity -> !MobCategory.MONSTER.equals(entity.getCategory()) && !MobCategory.MISC.equals(entity.getCategory())).collect(Collectors.toList()), this.radius); ActionHelper.open(this.getParentContent()); })); container.add(new GuiButtonBase(x + 58, y + 24, 114, 20, Component.translatable("gui.worldhandler.butcher.presets.hostile_mobs"), () -> { - ContentButcher.slaughter(container.getPlayer(), ForgeRegistries.ENTITIES.getValues().stream().filter(entity -> MobCategory.MONSTER.equals(entity.getCategory())).collect(Collectors.toList()), this.radius); + ContentButcher.slaughter(container.getPlayer(), ForgeRegistries.ENTITY_TYPES.getValues().stream().filter(entity -> MobCategory.MONSTER.equals(entity.getCategory())).collect(Collectors.toList()), this.radius); ActionHelper.open(this.getParentContent()); })); container.add(new GuiButtonBase(x + 58, y + 48, 114, 20, Component.translatable("gui.worldhandler.butcher.presets.players"), () -> { - ContentButcher.slaughter(container.getPlayer(), ForgeRegistries.ENTITIES.getValues().stream().filter(entity -> EntityType.PLAYER.equals(entity)).collect(Collectors.toList()), this.radius); + ContentButcher.slaughter(container.getPlayer(), ForgeRegistries.ENTITY_TYPES.getValues().stream().filter(entity -> EntityType.PLAYER.equals(entity)).collect(Collectors.toList()), this.radius); ActionHelper.open(this.getParentContent()); })); container.add(new GuiButtonBase(x + 58, y + 72, 114, 20, Component.translatable("gui.worldhandler.butcher.presets.entities"), () -> { - ContentButcher.slaughter(container.getPlayer(), ForgeRegistries.ENTITIES.getValues().stream().filter(entity -> MobCategory.MISC.equals(entity.getCategory()) && !EntityType.PLAYER.equals(entity)).collect(Collectors.toList()), this.radius); + ContentButcher.slaughter(container.getPlayer(), ForgeRegistries.ENTITY_TYPES.getValues().stream().filter(entity -> MobCategory.MISC.equals(entity.getCategory()) && !EntityType.PLAYER.equals(entity)).collect(Collectors.toList()), this.radius); ActionHelper.open(this.getParentContent()); })); } diff --git a/src/main/java/exopandora/worldhandler/gui/content/impl/ContentButcherSettings.java b/src/main/java/exopandora/worldhandler/gui/content/impl/ContentButcherSettings.java index 7fc65f7..8c951cd 100644 --- a/src/main/java/exopandora/worldhandler/gui/content/impl/ContentButcherSettings.java +++ b/src/main/java/exopandora/worldhandler/gui/content/impl/ContentButcherSettings.java @@ -24,7 +24,7 @@ public class ContentButcherSettings extends ContentChild @Override public void initGui(Container container, int x, int y) { - List> list = ForgeRegistries.ENTITIES.getValues().stream().filter(EntityType::canSummon).collect(Collectors.toList()); + List> list = ForgeRegistries.ENTITY_TYPES.getValues().stream().filter(EntityType::canSummon).collect(Collectors.toList()); MenuPageList> entities = new MenuPageList>(x, y, list, 114, 20, 3, container, new ILogicPageList>() { @@ -37,13 +37,13 @@ public class ContentButcherSettings extends ContentChild @Override public MutableComponent toTooltip(EntityType item) { - return Component.literal(ForgeRegistries.ENTITIES.getKey(item).toString()); + return Component.literal(ForgeRegistries.ENTITY_TYPES.getKey(item).toString()); } @Override public void onClick(EntityType item) { - ContentButcherSettings.this.entity = ForgeRegistries.ENTITIES.getKey(item); + ContentButcherSettings.this.entity = ForgeRegistries.ENTITY_TYPES.getKey(item); container.initButtons(); } diff --git a/src/main/java/exopandora/worldhandler/gui/content/impl/ContentCommandStack.java b/src/main/java/exopandora/worldhandler/gui/content/impl/ContentCommandStack.java index 0b6a11c..7078c60 100644 --- a/src/main/java/exopandora/worldhandler/gui/content/impl/ContentCommandStack.java +++ b/src/main/java/exopandora/worldhandler/gui/content/impl/ContentCommandStack.java @@ -60,14 +60,14 @@ public class ContentCommandStack extends ContentChild this.activatorRail.setBlockState(Blocks.ACTIVATOR_RAIL.defaultBlockState()); this.builderCommandStack.nbt().addTagProvider(this.activatorRail); - EntityTag redstoneBlock = new EntityTag(ForgeRegistries.ENTITIES.getKey(EntityType.FALLING_BLOCK)); + EntityTag redstoneBlock = new EntityTag(ForgeRegistries.ENTITY_TYPES.getKey(EntityType.FALLING_BLOCK)); redstoneBlock.setTime(1); redstoneBlock.setBlockState(Blocks.REDSTONE_BLOCK.defaultBlockState()); this.activatorRail.addPassenger(redstoneBlock); this.addCommand(0); - EntityTag blockRemover = new EntityTag(ForgeRegistries.ENTITIES.getKey(EntityType.COMMAND_BLOCK_MINECART)); + EntityTag blockRemover = new EntityTag(ForgeRegistries.ENTITY_TYPES.getKey(EntityType.COMMAND_BLOCK_MINECART)); SetBlockCommandBuilder builder = new SetBlockCommandBuilder(); builder.pos().setX(new Coordinate.Ints(Coordinate.Type.RELATIVE)); builder.pos().setY(new Coordinate.Ints(-2, Coordinate.Type.RELATIVE)); @@ -88,10 +88,10 @@ public class ContentCommandStack extends ContentChild blockRemover.setCommand(builder.toCommand(SetBlockCommandBuilder.Label.DESTROY, false)); this.activatorRail.addPassenger(blockRemover); - EntityTag entityRemover = new EntityTag(ForgeRegistries.ENTITIES.getKey(EntityType.COMMAND_BLOCK_MINECART)); + EntityTag entityRemover = new EntityTag(ForgeRegistries.ENTITY_TYPES.getKey(EntityType.COMMAND_BLOCK_MINECART)); KillCommandBuilder kill = new KillCommandBuilder(); kill.targets().setSelectorType(SelectorTypes.ALL_ENTITIES); - kill.targets().setType(ForgeRegistries.ENTITIES.getKey(EntityType.COMMAND_BLOCK_MINECART)); + kill.targets().setType(ForgeRegistries.ENTITY_TYPES.getKey(EntityType.COMMAND_BLOCK_MINECART)); kill.targets().setDistanceMax(1.0D); entityRemover.setCommand(kill.toCommand(KillCommandBuilder.Label.KILL_TARGETS, false)); this.activatorRail.addPassenger(entityRemover); @@ -265,7 +265,7 @@ public class ContentCommandStack extends ContentChild private void addCommand(int index) { - this.activatorRail.addPassenger(index + HEAD_LENGTH, new EntityTag(ForgeRegistries.ENTITIES.getKey(EntityType.COMMAND_BLOCK_MINECART))); + this.activatorRail.addPassenger(index + HEAD_LENGTH, new EntityTag(ForgeRegistries.ENTITY_TYPES.getKey(EntityType.COMMAND_BLOCK_MINECART))); } private void removeCommand(int index) diff --git a/src/main/java/exopandora/worldhandler/gui/content/impl/ContentScoreboardObjectives.java b/src/main/java/exopandora/worldhandler/gui/content/impl/ContentScoreboardObjectives.java index 3ad333c..b405980 100644 --- a/src/main/java/exopandora/worldhandler/gui/content/impl/ContentScoreboardObjectives.java +++ b/src/main/java/exopandora/worldhandler/gui/content/impl/ContentScoreboardObjectives.java @@ -145,7 +145,7 @@ public class ContentScoreboardObjectives extends ContentScoreboard @Nullable private boolean isRegistryItem(ResourceLocation resource) { - IForgeRegistry[] registries = new IForgeRegistry[] {ForgeRegistries.BLOCKS, ForgeRegistries.ITEMS, ForgeRegistries.ENTITIES}; + IForgeRegistry[] registries = new IForgeRegistry[] {ForgeRegistries.BLOCKS, ForgeRegistries.ITEMS, ForgeRegistries.ENTITY_TYPES}; for(IForgeRegistry registry : registries) { diff --git a/src/main/java/exopandora/worldhandler/gui/content/impl/ContentSummon.java b/src/main/java/exopandora/worldhandler/gui/content/impl/ContentSummon.java index 00a621c..e245ce7 100644 --- a/src/main/java/exopandora/worldhandler/gui/content/impl/ContentSummon.java +++ b/src/main/java/exopandora/worldhandler/gui/content/impl/ContentSummon.java @@ -444,12 +444,12 @@ public class ContentSummon extends Content } else if(EntityType.VILLAGER.equals(entity)) { - for(VillagerProfession profession : ForgeRegistries.PROFESSIONS) + for(VillagerProfession profession : ForgeRegistries.VILLAGER_PROFESSIONS) { if(StringUtils.equalsIgnoreCase(this.mob, profession.toString())) { CompoundTag villagerData = new CompoundTag(); - villagerData.putString("profession", ForgeRegistries.PROFESSIONS.getKey(profession).toString()); + villagerData.putString("profession", ForgeRegistries.VILLAGER_PROFESSIONS.getKey(profession).toString()); this.mutable.setKey("VillagerData"); this.mutable.setTag(villagerData); @@ -468,7 +468,7 @@ public class ContentSummon extends Content else if(EntityType.CHICKEN.equals(entity) && StringUtils.containsIgnoreCase(this.mob, "Jockey") && !this.entity.hasPassengers()) { ListTag list = new ListTag(); - EntityTag zombie = new EntityTag(ForgeRegistries.ENTITIES.getKey(EntityType.ZOMBIE)); + EntityTag zombie = new EntityTag(ForgeRegistries.ENTITY_TYPES.getKey(EntityType.ZOMBIE)); zombie.setIsBaby(true); list.add(zombie.value()); @@ -479,7 +479,7 @@ public class ContentSummon extends Content else if(EntityType.SPIDER.equals(entity) && StringUtils.containsIgnoreCase(this.mob, "Jockey") && !this.entity.hasPassengers()) { ListTag list = new ListTag(); - EntityTag skeleton = new EntityTag(ForgeRegistries.ENTITIES.getKey(EntityType.SKELETON)); + EntityTag skeleton = new EntityTag(ForgeRegistries.ENTITY_TYPES.getKey(EntityType.SKELETON)); skeleton.setHandItem(0, Items.BOW); list.add(skeleton.value()); diff --git a/src/main/java/exopandora/worldhandler/util/RegistryHelper.java b/src/main/java/exopandora/worldhandler/util/RegistryHelper.java index 01ddf8b..e30bbea 100644 --- a/src/main/java/exopandora/worldhandler/util/RegistryHelper.java +++ b/src/main/java/exopandora/worldhandler/util/RegistryHelper.java @@ -37,7 +37,7 @@ public class RegistryHelper return Language.getInstance().has(key) ? key : resource.toString(); }); registerRegistry(ForgeRegistries.ENCHANTMENTS, Enchantment::getDescriptionId); - registerRegistry(ForgeRegistries.ENTITIES, EntityType::getDescriptionId); + registerRegistry(ForgeRegistries.ENTITY_TYPES, EntityType::getDescriptionId); registerRegistry(ForgeRegistries.STAT_TYPES, stat -> "stat." + stat.toString().replace(':', '.')); }