Class SunDonatorGoal<T extends net.minecraft.world.entity.LivingEntity,M extends BasePlant & ISunProducer>

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.SunDonatorGoal<T,M>

public class SunDonatorGoal<T extends net.minecraft.world.entity.LivingEntity,M extends BasePlant & ISunProducer> 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
     
    protected final Class<T>
     

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

    mob, mustSee, targetMob, unseenMemoryTicks
  • Constructor Summary

    Constructors
    Constructor
    Description
    SunDonatorGoal(M plant, Class<T> type, boolean pMustSee, boolean pMustReach, Predicate<net.minecraft.world.entity.LivingEntity> predicate)
     
    SunDonatorGoal(M plant, Class<T> type, boolean mustSee, double horizontalRange, double verticalRange, Predicate<net.minecraft.world.entity.LivingEntity> predicate)
     
    SunDonatorGoal(M plant, Class<T> type, boolean mustSee, Predicate<net.minecraft.world.entity.LivingEntity> predicate)
     
    SunDonatorGoal(M sunProducer, Class<T> type, int interval, boolean mustSee, boolean mustReach, double horizontalRange, double verticalRange, 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
  • Constructor Details

    • SunDonatorGoal

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

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

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

      public SunDonatorGoal(M sunProducer, Class<T> type, int interval, boolean mustSee, boolean mustReach, double horizontalRange, double verticalRange, 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)