java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
nokunami.floral_warfare.common.entity.ai.goal.plants.targeting.CustomTargetGoal
Direct Known Subclasses:
CustomHurtByGoal, CustomNearestTargetGoal, MultiHeadedNearestTargetGoal

public abstract class CustomTargetGoal extends net.minecraft.world.entity.ai.goal.Goal
  • 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 net.minecraft.world.entity.Mob
    The entity that this goal belongs to
    protected final boolean
     
    protected final boolean
     
    protected int
     
    protected int
     
    protected net.minecraft.world.entity.LivingEntity
     
    protected int
     
    protected int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    CustomTargetGoal(net.minecraft.world.entity.Mob mob, boolean mustSee)
     
    CustomTargetGoal(net.minecraft.world.entity.Mob mob, boolean mustSeeTarget, boolean mustReachTarget)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    canAttack(net.minecraft.world.entity.LivingEntity potentialTarget, net.minecraft.world.entity.ai.targeting.TargetingConditions targetPredicate)
     
    boolean
     
    protected double
     
    protected net.minecraft.world.entity.LivingEntity
     
    boolean
    isInvalid(net.minecraft.world.entity.LivingEntity entity)
     
    protected void
    setTarget(net.minecraft.world.entity.LivingEntity entity)
     
     
    void
     
    void
     

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

    adjustedTickDelay, canUse, 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

    • mob

      protected final net.minecraft.world.entity.Mob mob
      The entity that this goal belongs to
    • mustSee

      protected final boolean mustSee
    • mustReach

      protected final boolean mustReach
    • reachCache

      protected int reachCache
    • reachCacheTime

      protected int reachCacheTime
    • unseenTicks

      protected int unseenTicks
    • targetMob

      @Nullable protected net.minecraft.world.entity.LivingEntity targetMob
    • unseenMemoryTicks

      protected int unseenMemoryTicks
  • Constructor Details

    • CustomTargetGoal

      public CustomTargetGoal(net.minecraft.world.entity.Mob mob, boolean mustSee)
    • CustomTargetGoal

      public CustomTargetGoal(net.minecraft.world.entity.Mob mob, boolean mustSeeTarget, boolean mustReachTarget)
  • Method Details

    • canContinueToUse

      public boolean canContinueToUse()
      Overrides:
      canContinueToUse in class net.minecraft.world.entity.ai.goal.Goal
    • isInvalid

      public boolean isInvalid(net.minecraft.world.entity.LivingEntity entity)
    • getFollowDistance

      protected double getFollowDistance()
    • getTarget

      protected net.minecraft.world.entity.LivingEntity getTarget()
    • setTarget

      protected void setTarget(net.minecraft.world.entity.LivingEntity entity)
    • start

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

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

      protected boolean canAttack(@Nullable net.minecraft.world.entity.LivingEntity potentialTarget, net.minecraft.world.entity.ai.targeting.TargetingConditions targetPredicate)
    • setUnseenMemoryTicks

      public CustomTargetGoal setUnseenMemoryTicks(int ticks)