@Override public boolean shouldExecute() { return !this.pixie.getMoveHelper().isUpdating(); }
@Override public boolean shouldExecute() { return !this.butterfly.getMoveHelper().isUpdating(); }
@Override public boolean shouldExecute() { return !this.dragonfly.getMoveHelper().isUpdating(); }
/** * Returns whether the EntityAIBase should begin execution. */ public boolean shouldExecute() { return !EntityGaiaBanshee.this.getMoveHelper().isUpdating() && EntityGaiaBanshee.this.rand.nextInt(7) == 0; }
@Override public boolean shouldExecute() { EntityGrasshopper grasshopper = (EntityGrasshopper) entity; return !grasshopper.getMoveHelper().isUpdating() && super.shouldExecute(); //return !entity.getNavigator().noPath() && super.shouldExecute(); }
@Override public boolean shouldExecute() { return !blackAnt.getMoveHelper().isUpdating() && super.shouldExecute(); }
public boolean shouldExecute() { if (EntityAmphithere.this.flightBehavior != FlightBehavior.WANDER) { return false; } if (EntityAmphithere.this.isFlying()) { target = EntityAmphithere.getPositionRelativetoGround(EntityAmphithere.this, EntityAmphithere.this.world, EntityAmphithere.this.posX + EntityAmphithere.this.rand.nextInt(30) - 15, EntityAmphithere.this.posZ + EntityAmphithere.this.rand.nextInt(30) - 15, EntityAmphithere.this.rand); EntityAmphithere.this.orbitPos = null; return (!EntityAmphithere.this.getMoveHelper().isUpdating() || EntityAmphithere.this.ticksStill >= 50); } else { return false; } }
@Override public boolean shouldExecute() { return !entity.getMoveHelper().isUpdating() && super.shouldExecute(); //return !entity.getNavigator().noPath() && super.shouldExecute(); }
public boolean shouldExecute() { if (EntityMyrmexRoyal.this.isFlying()) { target = EntityMyrmexRoyal.getPositionRelativetoGround(EntityMyrmexRoyal.this, EntityMyrmexRoyal.this.world, EntityMyrmexRoyal.this.posX + EntityMyrmexRoyal.this.rand.nextInt(30) - 15, EntityMyrmexRoyal.this.posZ + EntityMyrmexRoyal.this.rand.nextInt(30) - 15, EntityMyrmexRoyal.this.rand); return isDirectPathBetweenPoints(EntityMyrmexRoyal.this.getPosition(), target) && !EntityMyrmexRoyal.this.getMoveHelper().isUpdating() && EntityMyrmexRoyal.this.rand.nextInt(2) == 0; } else { return false; } }
/** * Returns whether the EntityAIBase should begin execution. */ public boolean shouldExecute() { if (EntityGaiaBanshee.this.getAttackTarget() != null && !EntityGaiaBanshee.this.getMoveHelper().isUpdating() && EntityGaiaBanshee.this.rand.nextInt(7) == 0) { return EntityGaiaBanshee.this.getDistanceSq(EntityGaiaBanshee.this.getAttackTarget()) > 4.0D; } else { return false; } }
public boolean shouldExecute() { target = EntityPixie.getPositionRelativetoGround(EntityPixie.this, EntityPixie.this.world, EntityPixie.this.posX + EntityPixie.this.rand.nextInt(15) - 7, EntityPixie.this.posZ + EntityPixie.this.rand.nextInt(15) - 7, EntityPixie.this.rand); return !EntityPixie.this.isOwnerClose() && !EntityPixie.this.isSitting() && isDirectPathBetweenPoints(EntityPixie.this.getPosition(), target) && !EntityPixie.this.getMoveHelper().isUpdating() && EntityPixie.this.rand.nextInt(4) == 0 && EntityPixie.this.housePos == null; }
public boolean shouldExecute() { if (EntityPixie.this.isOwnerClose() || EntityPixie.this.getMoveHelper().isUpdating() || EntityPixie.this.isSitting() || EntityPixie.this.rand.nextInt(20) != 0 || EntityPixie.this.ticksUntilHouseAI != 0) { return false; } BlockPos blockpos1 = findAHouse(EntityPixie.this, EntityPixie.this.world); return !blockpos1.toString().equals(EntityPixie.this.getPosition().toString()); }
@Override public boolean shouldExecute() { EntityMoveHelper moveHelper = this.dino.getMoveHelper(); if (!moveHelper.isUpdating()) { return true; } else { double moveX = moveHelper.getX() - this.dino.posX; double moveY = moveHelper.getY() - this.dino.posY; double moveZ = moveHelper.getZ() - this.dino.posZ; double distance = moveX * moveX + moveY * moveY + moveZ * moveZ; return distance < 1.0D || distance > 3600.0D; } }
/** * Returns whether an in-progress EntityAIBase should continue executing */ public boolean shouldContinueExecuting() { return EntityGaiaBanshee.this.getMoveHelper().isUpdating() && EntityGaiaBanshee.this.isCharging() && EntityGaiaBanshee.this.getAttackTarget() != null && EntityGaiaBanshee.this.getAttackTarget().isEntityAlive(); }
@Override public void onLivingUpdate() { if (getMoveHelper().isUpdating() && motionY < 0.0D) motionY *= 0.2D; else motionY *= 0.75D; if (isInWater()) getMoveHelper().setMoveTo(this.posX, this.posY + 1, this.posZ, 0.32D); super.onLivingUpdate(); }
protected float getJumpUpwardsMotion() { if (!collidedHorizontally && (!moveHelper.isUpdating() || moveHelper.getY() <= posY + 0.5D)) { Path path = navigator.getPath(); if (path != null && path.getCurrentPathIndex() < path.getCurrentPathLength()) { Vec3d vec3d = path.getPosition(this); if (vec3d.y > posY + 0.5D) return 0.5F; } return moveHelper.getSpeed() <= 0.6D ? 0.5F : 0.5F; } else { return 0.5F; } }
@Override public void updateAITasks() { if (currentMoveTypeDuration > 0) { --currentMoveTypeDuration; } if (onGround) { if (!wasOnGround) { setJumping(false); checkLandingDelay(); } EntityGrasshopper.GrasshopperJumpHelper grasshopperjumphelper = (EntityGrasshopper.GrasshopperJumpHelper) jumpHelper; if (!grasshopperjumphelper.getIsJumping()) { if (moveHelper.isUpdating() && currentMoveTypeDuration == 0) { Path path = navigator.getPath(); Vec3d vec3d = new Vec3d(moveHelper.getX(), moveHelper.getY(), moveHelper.getZ()); if (path != null && path.getCurrentPathIndex() < path.getCurrentPathLength()) vec3d = path.getPosition(this); calculateRotationYaw(vec3d.x, vec3d.z); startJumping(); } } else if (!grasshopperjumphelper.canJump()) enableJumpControl(); } wasOnGround = onGround; }