Class NearestSupportGoal<T extends net.minecraft.world.entity.LivingEntity,M extends BasePlant & ISupportPlant>

java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.target.TargetGoal
nokunami.floral_warfare.common.entity.ai.goal.plants.support.NearestSupportGoal<T,M>

public class NearestSupportGoal<T extends net.minecraft.world.entity.LivingEntity,M extends BasePlant & ISupportPlant> extends net.minecraft.world.entity.ai.goal.target.TargetGoal
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.goal.Goal

    net.minecraft.world.entity.ai.goal.Goal.Flag
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final int
     
    protected @Nullable net.minecraft.world.entity.LivingEntity
     
    protected net.minecraft.world.entity.ai.targeting.TargetingConditions
    This filter is applied to the Entity search.
    protected final Class<T>
     

    Fields inherited from class net.minecraft.world.entity.ai.goal.target.TargetGoal

    mustSee, targetMob, unseenMemoryTicks
  • Constructor Summary

    Constructors
    Constructor
    Description
    NearestSupportGoal(M plant, Class<T> type, boolean pMustSee, boolean pMustReach, Predicate<net.minecraft.world.entity.LivingEntity> predicate)
     
    NearestSupportGoal(M plant, Class<T> type, boolean mustSee, double range, Predicate<net.minecraft.world.entity.LivingEntity> predicate)
     
    NearestSupportGoal(M plant, Class<T> type, boolean mustSee, Predicate<net.minecraft.world.entity.LivingEntity> predicate)
     
    NearestSupportGoal(M plant, Class<T> type, int interval, boolean mustSee, boolean mustReach, double range, Predicate<net.minecraft.world.entity.LivingEntity> predicate)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    protected void
     
    protected @NotNull net.minecraft.world.phys.AABB
    getTargetSearchArea(double dist)
     
    void
    setTarget(@Nullable net.minecraft.world.entity.LivingEntity entity)
     
    void
     

    Methods inherited from class net.minecraft.world.entity.ai.goal.target.TargetGoal

    canAttack, canContinueToUse, getFollowDistance, setUnseenMemoryTicks, stop

    Methods inherited from class net.minecraft.world.entity.ai.goal.Goal

    adjustedTickDelay, getFlags, isInterruptable, reducedTickDelay, requiresUpdateEveryTick, setFlags, tick, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • targetType

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

      protected final int randomInterval
    • target

      @Nullable protected @Nullable net.minecraft.world.entity.LivingEntity target
    • targetConditions

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

    • NearestSupportGoal

      public NearestSupportGoal(M plant, Class<T> type, boolean mustSee, Predicate<net.minecraft.world.entity.LivingEntity> predicate)
    • NearestSupportGoal

      public NearestSupportGoal(M plant, Class<T> type, boolean mustSee, double range, Predicate<net.minecraft.world.entity.LivingEntity> predicate)
    • NearestSupportGoal

      public NearestSupportGoal(M plant, Class<T> type, boolean pMustSee, boolean pMustReach, Predicate<net.minecraft.world.entity.LivingEntity> predicate)
    • NearestSupportGoal

      public NearestSupportGoal(M plant, Class<T> type, int interval, boolean mustSee, boolean mustReach, double range, Predicate<net.minecraft.world.entity.LivingEntity> predicate)
  • Method Details

    • canUse

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

      @NotNull protected @NotNull net.minecraft.world.phys.AABB getTargetSearchArea(double dist)
    • findTarget

      protected void findTarget()
    • start

      public void start()
      Overrides:
      start in class net.minecraft.world.entity.ai.goal.target.TargetGoal
    • setTarget

      public void setTarget(@Nullable @Nullable net.minecraft.world.entity.LivingEntity entity)