Class PlantTargetSelectGoal<T extends net.minecraft.world.entity.LivingEntity>

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.defend.PlantTargetSelectGoal<T>

public class PlantTargetSelectGoal<T extends net.minecraft.world.entity.LivingEntity> 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 net.minecraft.world.entity.LivingEntity
     
    protected net.minecraft.world.entity.ai.targeting.TargetingConditions
     
    protected final Class<T>
     

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

    mustSee, targetMob, unseenMemoryTicks
  • Constructor Summary

    Constructors
    Constructor
    Description
    PlantTargetSelectGoal(BasePlant mob, boolean mustSee, boolean mustReach, Class<T> classType, int interval, Predicate<net.minecraft.world.entity.LivingEntity> predicate)
     
    PlantTargetSelectGoal(BasePlant mob, Class<T> targetType, boolean mustSee)
     
    PlantTargetSelectGoal(BasePlant mob, Class<T> classType, boolean mustSee, boolean mustReach)
     
    PlantTargetSelectGoal(BasePlant mob, Class<T> classType, boolean mustSee, Predicate<net.minecraft.world.entity.LivingEntity> predicate)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    protected void
     
    protected net.minecraft.world.phys.AABB
    getTargetSearchArea(double dist)
     
    void
    setTarget(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 net.minecraft.world.entity.LivingEntity target
    • targetConditions

      protected net.minecraft.world.entity.ai.targeting.TargetingConditions targetConditions
  • Constructor Details

    • PlantTargetSelectGoal

      public PlantTargetSelectGoal(BasePlant mob, Class<T> targetType, boolean mustSee)
    • PlantTargetSelectGoal

      public PlantTargetSelectGoal(BasePlant mob, Class<T> classType, boolean mustSee, Predicate<net.minecraft.world.entity.LivingEntity> predicate)
    • PlantTargetSelectGoal

      public PlantTargetSelectGoal(BasePlant mob, Class<T> classType, boolean mustSee, boolean mustReach)
    • PlantTargetSelectGoal

      public PlantTargetSelectGoal(BasePlant mob, boolean mustSee, boolean mustReach, Class<T> classType, int interval, @Nullable 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

      protected 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 net.minecraft.world.entity.LivingEntity entity)