Class AnimalMateGoal

java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.AnimalMateGoal
Direct Known Subclasses:
FoxEntity.MateGoal, PandaEntity.PandaMateGoal, TurtleEntity.MateGoal

public class AnimalMateGoal
extends Goal
  • Field Details

    • VALID_MATE_PREDICATE

      private static final TargetPredicate VALID_MATE_PREDICATE
    • animal

      protected final AnimalEntity animal
    • entityClass

      private final Class<? extends AnimalEntity> entityClass
    • world

      protected final World world
    • mate

      protected AnimalEntity mate
    • timer

      private int timer
    • chance

      private final double chance
  • Constructor Details

  • Method Details

    • canStart

      public boolean canStart()
      Specified by:
      canStart in class Goal
    • shouldContinue

      public boolean shouldContinue()
      Overrides:
      shouldContinue in class Goal
    • stop

      public void stop()
      Overrides:
      stop in class Goal
    • tick

      public void tick()
      Overrides:
      tick in class Goal
    • findMate

      @Nullable private AnimalEntity findMate()
    • breed

      protected void breed()