aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/rosegoldaddons/features/EndermanMacro.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/rosegoldaddons/features/EndermanMacro.java')
-rw-r--r--src/main/java/rosegoldaddons/features/EndermanMacro.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/rosegoldaddons/features/EndermanMacro.java b/src/main/java/rosegoldaddons/features/EndermanMacro.java
index bbde6db..5e88e74 100644
--- a/src/main/java/rosegoldaddons/features/EndermanMacro.java
+++ b/src/main/java/rosegoldaddons/features/EndermanMacro.java
@@ -36,7 +36,7 @@ public class EndermanMacro {
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)) {
+ if (entity1 instanceof EntityEnderman && !(((EntityEnderman) entity1).getHealth() == 0) && Minecraft.getMinecraft().thePlayer.canEntityBeSeen(entity1)) {
double dist = entity1.getDistanceSq(Minecraft.getMinecraft().thePlayer.posX, Minecraft.getMinecraft().thePlayer.posY, Minecraft.getMinecraft().thePlayer.posZ);
if (dist < closest) {
if(Main.configFile.macroRadius != 0 && dist < Main.configFile.macroRadius) {