From b03d20488c43e8533cc2a8468244b50ae62521a0 Mon Sep 17 00:00:00 2001 From: Jakub <53441451+kuba6000@users.noreply.github.com> Date: Tue, 10 Oct 2023 09:19:18 +0200 Subject: Use the new method to copy entity from MobsInfo (#98) * Update build.gradle * Update dependencies.gradle * Use the new API --- src/main/java/kubatech/loaders/MobHandlerLoader.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src') diff --git a/src/main/java/kubatech/loaders/MobHandlerLoader.java b/src/main/java/kubatech/loaders/MobHandlerLoader.java index 35d92de13d..bcef5b96d9 100644 --- a/src/main/java/kubatech/loaders/MobHandlerLoader.java +++ b/src/main/java/kubatech/loaders/MobHandlerLoader.java @@ -38,7 +38,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.JsonToNBT; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.StatCollector; -import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import org.apache.logging.log4j.LogManager; @@ -92,9 +91,7 @@ public class MobHandlerLoader { this.mOutputs = transformedDrops; this.recipe = recipe; try { - this.entityCopy = this.recipe.entity.getClass() - .getConstructor(World.class) - .newInstance(this.recipe.entity.worldObj); + this.entityCopy = this.recipe.createEntityCopy(); } catch (NoSuchMethodException | InvocationTargetException | InstantiationException | IllegalAccessException e) { throw new RuntimeException(e); -- cgit