diff options
author | Jakub <53441451+kuba6000@users.noreply.github.com> | 2023-10-10 09:19:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-10 09:19:18 +0200 |
commit | b03d20488c43e8533cc2a8468244b50ae62521a0 (patch) | |
tree | 53ec9a6a39edabb5b1e0de780e382a42ff4ada60 /src | |
parent | 5d89f230b896915367d03209e52685fd516e6c0e (diff) | |
download | GT5-Unofficial-b03d20488c43e8533cc2a8468244b50ae62521a0.tar.gz GT5-Unofficial-b03d20488c43e8533cc2a8468244b50ae62521a0.tar.bz2 GT5-Unofficial-b03d20488c43e8533cc2a8468244b50ae62521a0.zip |
Use the new method to copy entity from MobsInfo (#98)
* Update build.gradle
* Update dependencies.gradle
* Use the new API
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/kubatech/loaders/MobHandlerLoader.java | 5 |
1 files changed, 1 insertions, 4 deletions
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); |