Fixed slime avoid void AI

This commit is contained in:
paulevsGitch 2021-01-15 05:56:05 +03:00
parent f7482ec811
commit 8255318d06

View file

@ -242,8 +242,8 @@ public class EntityEndSlime extends SlimeEntity {
float yaw = EntityEndSlime.this.getHeadYaw();
float speed = EntityEndSlime.this.getMovementSpeed();
if (speed > 0.1) {
float dx = MathHelper.sin(-yaw * 0.017453292F - 3.1415927F);
float dz = MathHelper.cos(-yaw * 0.017453292F - 3.1415927F);
float dx = MathHelper.sin(-yaw * 0.017453292F);
float dz = MathHelper.cos(-yaw * 0.017453292F);
BlockPos pos = EntityEndSlime.this.getBlockPos().add(dx * speed * 4, 0, dz * speed * 4);
int down = BlocksHelper.downRay(EntityEndSlime.this.world, pos, 16);
return down < 5;