Merge pull request #531 from StijnSimons/master
Added Spider, PigZombie and Enderman conditions
This commit is contained in:
commit
cdbec60da0
@ -21,7 +21,10 @@ 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;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -70,6 +73,9 @@ public class Avoidance {
|
||||
if (mobCoeff != 1.0D) {
|
||||
ctx.world().loadedEntityList.stream()
|
||||
.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;
|
||||
|
Loading…
Reference in New Issue
Block a user