@Override public void updateTask() { if (dinosaur .getEntityBoundingBox() .intersectsWith(mate.getEntityBoundingBox().expand(0.5D, 0.5D, 0.5D))) { Animation.sendAnimationPacket(dinosaur, Animations.MATING.get()); dinosaur.getMetabolism().decreaseFood(1000); } }
@Override public void startExecuting() { super.startExecuting(); Animation.sendAnimationPacket( animatingEntity, animatingEntity.getRNG().nextBoolean() ? Animations.LOOKING_LEFT.get() : Animations.LOOKING_RIGHT.get()); animatingEntity.getNavigator().clearPathEntity(); }
@Override public boolean shouldExecute() { if (animatingEntity.getRNG().nextDouble() < 0.01) { return true; } return false; }
@Override public void resetTask() { super.resetTask(); animatingEntity.currentAnim = null; }