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
FieldsModifier and TypeFieldDescriptionprotected final intprotected @Nullable net.minecraft.world.entity.LivingEntityprotected net.minecraft.world.entity.ai.targeting.TargetingConditionsThis filter is applied to the Entity search.Fields inherited from class net.minecraft.world.entity.ai.goal.target.TargetGoal
mustSee, targetMob, unseenMemoryTicks -
Constructor Summary
ConstructorsConstructorDescriptionNearestSupportGoal(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 TypeMethodDescriptionbooleancanUse()protected voidprotected @NotNull net.minecraft.world.phys.AABBgetTargetSearchArea(double dist) voidsetTarget(@Nullable net.minecraft.world.entity.LivingEntity entity) voidstart()Methods inherited from class net.minecraft.world.entity.ai.goal.target.TargetGoal
canAttack, canContinueToUse, getFollowDistance, setUnseenMemoryTicks, stopMethods inherited from class net.minecraft.world.entity.ai.goal.Goal
adjustedTickDelay, getFlags, isInterruptable, reducedTickDelay, requiresUpdateEveryTick, setFlags, tick, toString
-
Field Details
-
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 targetConditionsThis filter is applied to the Entity search. Only matching entities will be targeted.
-
-
Constructor Details
-
NearestSupportGoal
-
NearestSupportGoal
-
NearestSupportGoal
-
NearestSupportGoal
-
-
Method Details
-
canUse
public boolean canUse()- Specified by:
canUsein classnet.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:
startin classnet.minecraft.world.entity.ai.goal.target.TargetGoal
-
setTarget
public void setTarget(@Nullable @Nullable net.minecraft.world.entity.LivingEntity entity)
-