private void forceMove(BlockPos pos, EntityLiving ent) { double x = (pos.getX() + 0.5D - ent.posX); double y = (pos.getY() + 1D - ent.posY); double z = (pos.getZ() + 0.5D - ent.posZ); double distance = Math.sqrt(x * x + y * y + z * z); if (distance > 2) { EntityMob mod = (EntityMob) ent; mod.faceEntity(getTarget(ent.getEntityWorld(), pos), 180, 0); mod.getMoveHelper().strafe(0, 0.3f); if (mod.posY < pos.getY()) { mod.setJumping(true); } else { mod.setJumping(false); } } }
this.entity.getMoveHelper().strafe(this.strafingBackwards ? -0.5F : 0.5F, this.strafingClockwise ? 0.5F : -0.5F); this.entity.faceEntity(entitylivingbase, 30.0F, 30.0F); } else {
this.entity.getMoveHelper().strafe(this.strafingBackwards ? -1.0F : 1.0F, this.strafingClockwise ? 0.5F : -0.5F); this.entity.faceEntity(entitylivingbase, 30.0F, 30.0F);
this.entity.getMoveHelper().strafe(this.strafingBackwards ? -0.5F : 0.5F, this.strafingClockwise ? 0.5F : -0.5F); this.entity.faceEntity(entitylivingbase, 30.0F, 30.0F); } else {
this.entity.getMoveHelper().strafe(this.strafingBackwards ? -0.5F : 0.5F, this.strafingClockwise ? 0.5F : -0.5F); this.entity.getLookHelper().setLookPosition(entitylivingbase.posX, entitylivingbase.posY + (double) entitylivingbase.getEyeHeight(), entitylivingbase.posZ, (float) this.entity.getHorizontalFaceSpeed(), (float) this.entity.getVerticalFaceSpeed()); } else {
worker.getMoveHelper().strafe(0, 0); return DECIDE;
worker.getMoveHelper().strafe(0, 0);
worker.getMoveHelper().strafe(0, 0); movingToTarget = true; strafingTime = -1; worker.getMoveHelper().strafe(0, (float) strafingClockwise * 0.2f); strafingClockwise *= -1; worker.getMoveHelper().strafe(0, (float) (getCombatMovementSpeed() * strafingClockwise * STRAFING_SPEED)); worker.getMoveHelper().strafe(0, 0);