Class MultiHeadedNearestTargetGoal<T extends net.minecraft.world.entity.LivingEntity,R extends net.minecraft.world.entity.Mob & IFWAction & IMultiHeadedEntity>

java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
nokunami.floral_warfare.common.entity.ai.goal.plants.targeting.CustomTargetGoal
nokunami.floral_warfare.common.entity.ai.goal.plants.targeting.MultiHeadedNearestTargetGoal<T,R>

public class MultiHeadedNearestTargetGoal<T extends net.minecraft.world.entity.LivingEntity,R extends net.minecraft.world.entity.Mob & IFWAction & IMultiHeadedEntity> extends CustomTargetGoal
  • Field Details

    • targetType

      protected final Class<T extends net.minecraft.world.entity.LivingEntity> targetType
    • randomInterval

      protected final int randomInterval
    • cachedTarget

      @Nullable protected net.minecraft.world.entity.LivingEntity cachedTarget
    • cachedTargets

      protected List<net.minecraft.world.entity.LivingEntity> cachedTargets
    • goalConfig

      protected TargetGoalConfig<T extends net.minecraft.world.entity.LivingEntity> goalConfig
    • targetConditions

      protected net.minecraft.world.entity.ai.targeting.TargetingConditions targetConditions
      This filter is applied to the Entity search. Only matching entities will be targeted.
    • horizontalDistance

      protected double horizontalDistance
    • verticalDistance

      protected double verticalDistance
    • priority

      protected TargetPriority priority
  • Constructor Details

    • MultiHeadedNearestTargetGoal

      public MultiHeadedNearestTargetGoal(R basePlant)
    • MultiHeadedNearestTargetGoal

      public MultiHeadedNearestTargetGoal(R basePlant, TargetGoalConfig<T> properties)
  • Method Details

    • canUse

      public boolean canUse()
      Specified by:
      canUse in class net.minecraft.world.entity.ai.goal.Goal
    • getTargetSearchArea

      protected net.minecraft.world.phys.AABB getTargetSearchArea()
    • findTarget

      protected void findTarget()
    • start

      public void start()
      Overrides:
      start in class CustomTargetGoal
    • tick

      public void tick()
      Overrides:
      tick in class net.minecraft.world.entity.ai.goal.Goal
    • setTargetAndResetCount

      protected void setTargetAndResetCount(net.minecraft.world.entity.LivingEntity entity)
    • getFollowDistance

      protected double getFollowDistance()
      Overrides:
      getFollowDistance in class CustomTargetGoal
    • setTarget

      protected void setTarget(net.minecraft.world.entity.LivingEntity entity)
      Overrides:
      setTarget in class CustomTargetGoal
    • setAltTarget

      protected void setAltTarget(int i, net.minecraft.world.entity.LivingEntity entity)