Class BreedGoal

java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.BreedGoal
Direct Known Subclasses:
Fox.FoxBreedGoal, Panda.PandaBreedGoal, Turtle.TurtleBreedGoal

public class BreedGoal extends Goal
  • Field Details

    • PARTNER_TARGETING

      private static final TargetingConditions PARTNER_TARGETING
    • animal

      protected final Animal animal
    • partnerClass

      private final Class<? extends Animal> partnerClass
    • level

      protected final Level level
    • partner

      @Nullable protected Animal partner
    • loveTime

      private int loveTime
    • speedModifier

      private final double speedModifier
  • Constructor Details

    • BreedGoal

      public BreedGoal(Animal p_25122_, double p_25123_)
    • BreedGoal

      public BreedGoal(Animal p_25125_, double p_25126_, Class<? extends Animal> p_25127_)
  • Method Details

    • canUse

      public boolean canUse()
      Specified by:
      canUse in class Goal
    • canContinueToUse

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

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

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

      @Nullable private Animal getFreePartner()
    • breed

      protected void breed()