java.lang.Object
net.minecraft.world.entity.monster.hoglin.HoglinAi

public class HoglinAi extends Object
  • Field Details

    • REPELLENT_DETECTION_RANGE_HORIZONTAL

      public static final int REPELLENT_DETECTION_RANGE_HORIZONTAL
      See Also:
      Constant Field Values
    • REPELLENT_DETECTION_RANGE_VERTICAL

      public static final int REPELLENT_DETECTION_RANGE_VERTICAL
      See Also:
      Constant Field Values
    • RETREAT_DURATION

      private static final UniformInt RETREAT_DURATION
    • ATTACK_DURATION

      private static final int ATTACK_DURATION
      See Also:
      Constant Field Values
    • DESIRED_DISTANCE_FROM_PIGLIN_WHEN_IDLING

      private static final int DESIRED_DISTANCE_FROM_PIGLIN_WHEN_IDLING
      See Also:
      Constant Field Values
    • DESIRED_DISTANCE_FROM_PIGLIN_WHEN_RETREATING

      private static final int DESIRED_DISTANCE_FROM_PIGLIN_WHEN_RETREATING
      See Also:
      Constant Field Values
    • ATTACK_INTERVAL

      private static final int ATTACK_INTERVAL
      See Also:
      Constant Field Values
    • BABY_ATTACK_INTERVAL

      private static final int BABY_ATTACK_INTERVAL
      See Also:
      Constant Field Values
    • REPELLENT_PACIFY_TIME

      private static final int REPELLENT_PACIFY_TIME
      See Also:
      Constant Field Values
    • ADULT_FOLLOW_RANGE

      private static final UniformInt ADULT_FOLLOW_RANGE
    • SPEED_MULTIPLIER_WHEN_AVOIDING_REPELLENT

      private static final float SPEED_MULTIPLIER_WHEN_AVOIDING_REPELLENT
      See Also:
      Constant Field Values
    • SPEED_MULTIPLIER_WHEN_RETREATING

      private static final float SPEED_MULTIPLIER_WHEN_RETREATING
      See Also:
      Constant Field Values
    • SPEED_MULTIPLIER_WHEN_MAKING_LOVE

      private static final float SPEED_MULTIPLIER_WHEN_MAKING_LOVE
      See Also:
      Constant Field Values
    • SPEED_MULTIPLIER_WHEN_IDLING

      private static final float SPEED_MULTIPLIER_WHEN_IDLING
      See Also:
      Constant Field Values
    • SPEED_MULTIPLIER_WHEN_FOLLOWING_ADULT

      private static final float SPEED_MULTIPLIER_WHEN_FOLLOWING_ADULT
      See Also:
      Constant Field Values
  • Constructor Details

    • HoglinAi

      public HoglinAi()
  • Method Details

    • makeBrain

      protected static Brain<?> makeBrain(Brain<Hoglin> p_34576_)
    • initCoreActivity

      private static void initCoreActivity(Brain<Hoglin> p_34592_)
    • initIdleActivity

      private static void initIdleActivity(Brain<Hoglin> p_34602_)
    • initFightActivity

      private static void initFightActivity(Brain<Hoglin> p_34609_)
    • initRetreatActivity

      private static void initRetreatActivity(Brain<Hoglin> p_34616_)
    • createIdleMovementBehaviors

      private static RunOne<Hoglin> createIdleMovementBehaviors()
    • updateActivity

      protected static void updateActivity(Hoglin p_34578_)
    • onHitTarget

      protected static void onHitTarget(Hoglin p_34580_, LivingEntity p_34581_)
    • broadcastRetreat

      private static void broadcastRetreat(Hoglin p_34606_, LivingEntity p_34607_)
    • retreatFromNearestTarget

      private static void retreatFromNearestTarget(Hoglin p_34613_, LivingEntity p_34614_)
    • setAvoidTarget

      private static void setAvoidTarget(Hoglin p_34620_, LivingEntity p_34621_)
    • findNearestValidAttackTarget

      private static Optional<? extends LivingEntity> findNearestValidAttackTarget(Hoglin p_34611_)
    • isPosNearNearestRepellent

      static boolean isPosNearNearestRepellent(Hoglin p_34586_, BlockPos p_34587_)
    • wantsToStopFleeing

      private static boolean wantsToStopFleeing(Hoglin p_34618_)
    • piglinsOutnumberHoglins

      private static boolean piglinsOutnumberHoglins(Hoglin p_34623_)
    • wasHurtBy

      protected static void wasHurtBy(Hoglin p_34596_, LivingEntity p_34597_)
    • maybeRetaliate

      private static void maybeRetaliate(Hoglin p_34625_, LivingEntity p_34626_)
    • setAttackTarget

      private static void setAttackTarget(Hoglin p_34630_, LivingEntity p_34631_)
    • broadcastAttackTarget

      private static void broadcastAttackTarget(Hoglin p_34635_, LivingEntity p_34636_)
    • setAttackTargetIfCloserThanCurrent

      private static void setAttackTargetIfCloserThanCurrent(Hoglin p_34640_, LivingEntity p_34641_)
    • getSoundForCurrentActivity

      public static Optional<SoundEvent> getSoundForCurrentActivity(Hoglin p_34594_)
    • getSoundForActivity

      private static SoundEvent getSoundForActivity(Hoglin p_34583_, Activity p_34584_)
    • getVisibleAdultHoglins

      private static List<Hoglin> getVisibleAdultHoglins(Hoglin p_34628_)
    • isNearRepellent

      private static boolean isNearRepellent(Hoglin p_34633_)
    • isBreeding

      private static boolean isBreeding(Hoglin p_34638_)
    • isPacified

      protected static boolean isPacified(Hoglin p_34604_)