aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/rosegoldaddons/features/GhostMacro.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/rosegoldaddons/features/GhostMacro.java')
-rw-r--r--src/main/java/rosegoldaddons/features/GhostMacro.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/java/rosegoldaddons/features/GhostMacro.java b/src/main/java/rosegoldaddons/features/GhostMacro.java
index 79a7907..364471b 100644
--- a/src/main/java/rosegoldaddons/features/GhostMacro.java
+++ b/src/main/java/rosegoldaddons/features/GhostMacro.java
@@ -36,6 +36,7 @@ public class GhostMacro {
private static Entity getClosestCreeper() {
Entity eman = null;
double closest = 9999.0;
+ if(Minecraft.getMinecraft().theWorld == null) return null;
for (Entity entity1 : (Minecraft.getMinecraft().theWorld.loadedEntityList)) {
if (entity1 instanceof EntityCreeper && !(((EntityCreeper) entity1).getHealth() == 0)) {
double dist = entity1.getDistanceSq(Minecraft.getMinecraft().thePlayer.posX, Minecraft.getMinecraft().thePlayer.posY, Minecraft.getMinecraft().thePlayer.posZ);