Class CustomNearestTargetGoal<T extends net.minecraft.world.entity.LivingEntity,R extends BasePlant & IFWAction>
java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
nokunami.floral_warfare.common.entity.ai.goal.plants.targeting.CustomTargetGoal
nokunami.floral_warfare.common.entity.ai.goal.plants.targeting.CustomNearestTargetGoal<T,R>
- Direct Known Subclasses:
NearestSunTargetGoal,NearestSupportGoal
public class CustomNearestTargetGoal<T extends net.minecraft.world.entity.LivingEntity,R extends BasePlant & IFWAction>
extends CustomTargetGoal
-
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 net.minecraft.world.entity.LivingEntityprotected TargetGoalConfig<T>protected doubleprotected TargetPriorityprotected final intprotected net.minecraft.world.entity.ai.targeting.TargetingConditionsThis filter is applied to the Entity search.protected doubleFields inherited from class nokunami.floral_warfare.common.entity.ai.goal.plants.targeting.CustomTargetGoal
mob, mustReach, mustSee, reachCache, reachCacheTime, targetMob, unseenMemoryTicks, unseenTicks -
Constructor Summary
ConstructorsConstructorDescriptionCustomNearestTargetGoal(R basePlant) CustomNearestTargetGoal(R basePlant, TargetGoalConfig<T> properties) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanUse()protected voidprotected doubleprotected net.minecraft.world.phys.AABBprotected voidsetTarget(net.minecraft.world.entity.LivingEntity entity) protected voidsetTargetAndResetCount(net.minecraft.world.entity.LivingEntity entity) voidstart()voidtick()Methods inherited from class nokunami.floral_warfare.common.entity.ai.goal.plants.targeting.CustomTargetGoal
canAttack, canContinueToUse, getTarget, isInvalid, setUnseenMemoryTicks, stopMethods inherited from class net.minecraft.world.entity.ai.goal.Goal
adjustedTickDelay, getFlags, isInterruptable, reducedTickDelay, requiresUpdateEveryTick, setFlags, toString
-
Field Details
-
targetType
-
randomInterval
protected final int randomInterval -
cachedTarget
@Nullable protected net.minecraft.world.entity.LivingEntity cachedTarget -
goalConfig
-
targetConditions
protected net.minecraft.world.entity.ai.targeting.TargetingConditions targetConditionsThis filter is applied to the Entity search. Only matching entities will be targeted. -
horizontalDistance
protected double horizontalDistance -
verticalDistance
protected double verticalDistance -
priority
-
-
Constructor Details
-
CustomNearestTargetGoal
-
CustomNearestTargetGoal
-
-
Method Details
-
canUse
public boolean canUse()- Specified by:
canUsein classnet.minecraft.world.entity.ai.goal.Goal
-
getTargetSearchArea
protected net.minecraft.world.phys.AABB getTargetSearchArea() -
findTarget
protected void findTarget() -
start
public void start()- Overrides:
startin classCustomTargetGoal
-
tick
public void tick()- Overrides:
tickin classnet.minecraft.world.entity.ai.goal.Goal
-
setTargetAndResetCount
protected void setTargetAndResetCount(net.minecraft.world.entity.LivingEntity entity) -
getFollowDistance
protected double getFollowDistance()- Overrides:
getFollowDistancein classCustomTargetGoal
-
setTarget
protected void setTarget(net.minecraft.world.entity.LivingEntity entity) - Overrides:
setTargetin classCustomTargetGoal
-