コード例 #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);
    }
  }
コード例 #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();
 }
コード例 #3
0
  @Override
  public boolean shouldExecute() {
    if (animatingEntity.getRNG().nextDouble() < 0.01) {
      return true;
    }

    return false;
  }
コード例 #4
0
 @Override
 public void resetTask() {
   super.resetTask();
   animatingEntity.currentAnim = null;
 }