Enderman angry condition

This commit is contained in:
StijnSimons 2019-07-13 17:17:10 +02:00
parent b16f9edd2c
commit 2b41012c5b

View File

@ -21,6 +21,7 @@ import baritone.Baritone;
import baritone.api.utils.BetterBlockPos;
import baritone.api.utils.IPlayerContext;
import it.unimi.dsi.fastutil.longs.Long2DoubleOpenHashMap;
import net.minecraft.entity.monster.EntityEnderman;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.monster.EntityPigZombie;
import net.minecraft.entity.monster.EntitySpider;
@ -74,6 +75,7 @@ public class Avoidance {
.filter(entity -> entity instanceof EntityMob)
.filter(entity -> (!(entity instanceof EntitySpider)) || ctx.player().getBrightness() < 0.5)
.filter(entity -> !(entity instanceof EntityPigZombie) || ((EntityPigZombie) entity).isAngry())
.filter(entity -> !(entity instanceof EntityEnderman) || ((EntityEnderman) entity).isScreaming())
.forEach(entity -> res.add(new Avoidance(new BlockPos(entity), mobCoeff, Baritone.settings().mobAvoidanceRadius.value)));
}
return res;