Exemplo n.º 1
0
  @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);
    }
  }
Exemplo n.º 2
0
 @Override
 public void startExecuting() {
   super.startExecuting();
   Animation.sendAnimationPacket(
       animatingEntity,
       animatingEntity.getRNG().nextBoolean()
           ? Animations.LOOKING_LEFT.get()
           : Animations.LOOKING_RIGHT.get());
   animatingEntity.getNavigator().clearPathEntity();
 }
Exemplo n.º 3
0
  @Override
  public boolean shouldExecute() {
    if (animatingEntity.getRNG().nextDouble() < 0.01) {
      return true;
    }

    return false;
  }
Exemplo n.º 4
0
 @Override
 public void resetTask() {
   super.resetTask();
   animatingEntity.currentAnim = null;
 }