diff options
author | RoseGoldIsntGay <yoavkau@gmail.com> | 2022-01-15 00:19:33 +0200 |
---|---|---|
committer | RoseGoldIsntGay <yoavkau@gmail.com> | 2022-01-15 00:19:33 +0200 |
commit | 252dedff670a8a456ae557b8ac7f1727bb7fd1b1 (patch) | |
tree | 996f83583518b3774155f9454cea901af8bae534 /src/main/java/rosegoldaddons/features/EndermanMacro.java | |
parent | 0acbdcf7cd4ee78544b8cf7fbf8fa48dd395f693 (diff) | |
download | RGA-252dedff670a8a456ae557b8ac7f1727bb7fd1b1.tar.gz RGA-252dedff670a8a456ae557b8ac7f1727bb7fd1b1.tar.bz2 RGA-252dedff670a8a456ae557b8ac7f1727bb7fd1b1.zip |
2.5.2-pre1
Diffstat (limited to 'src/main/java/rosegoldaddons/features/EndermanMacro.java')
-rw-r--r-- | src/main/java/rosegoldaddons/features/EndermanMacro.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/rosegoldaddons/features/EndermanMacro.java b/src/main/java/rosegoldaddons/features/EndermanMacro.java index 4768eb0..bbde6db 100644 --- a/src/main/java/rosegoldaddons/features/EndermanMacro.java +++ b/src/main/java/rosegoldaddons/features/EndermanMacro.java @@ -2,7 +2,6 @@ package rosegoldaddons.features; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; -import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntityEnderman; import net.minecraftforge.client.event.RenderWorldLastEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @@ -12,7 +11,6 @@ import rosegoldaddons.utils.RenderUtils; import rosegoldaddons.utils.RotationUtils; import java.awt.*; -import java.util.Random; public class EndermanMacro { private static Entity enderman; @@ -36,6 +34,7 @@ public class EndermanMacro { private static Entity getClosestEnderman() { Entity eman = null; double closest = 9999; + if(Minecraft.getMinecraft().theWorld == null) return null; for (Entity entity1 : (Minecraft.getMinecraft().theWorld.loadedEntityList)) { if (entity1 instanceof EntityEnderman && !(((EntityEnderman) entity1).getHealth() == 0)) { double dist = entity1.getDistanceSq(Minecraft.getMinecraft().thePlayer.posX, Minecraft.getMinecraft().thePlayer.posY, Minecraft.getMinecraft().thePlayer.posZ); |