aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kubatech
diff options
context:
space:
mode:
authorJakub <53441451+kuba6000@users.noreply.github.com>2023-10-10 09:19:18 +0200
committerGitHub <noreply@github.com>2023-10-10 09:19:18 +0200
commitb03d20488c43e8533cc2a8468244b50ae62521a0 (patch)
tree53ec9a6a39edabb5b1e0de780e382a42ff4ada60 /src/main/java/kubatech
parent5d89f230b896915367d03209e52685fd516e6c0e (diff)
downloadGT5-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/main/java/kubatech')
-rw-r--r--src/main/java/kubatech/loaders/MobHandlerLoader.java5
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);