Class CustomTargetGoal
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
FieldsModifier and TypeFieldDescriptionprotected final net.minecraft.world.entity.MobThe entity that this goal belongs toprotected final booleanprotected final booleanprotected intprotected intprotected net.minecraft.world.entity.LivingEntityprotected intprotected int -
Constructor Summary
ConstructorsConstructorDescriptionCustomTargetGoal(net.minecraft.world.entity.Mob mob, boolean mustSee) CustomTargetGoal(net.minecraft.world.entity.Mob mob, boolean mustSeeTarget, boolean mustReachTarget) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanAttack(net.minecraft.world.entity.LivingEntity potentialTarget, net.minecraft.world.entity.ai.targeting.TargetingConditions targetPredicate) booleanprotected doubleprotected net.minecraft.world.entity.LivingEntitybooleanisInvalid(net.minecraft.world.entity.LivingEntity entity) protected voidsetTarget(net.minecraft.world.entity.LivingEntity entity) setUnseenMemoryTicks(int ticks) voidstart()voidstop()Methods inherited from class net.minecraft.world.entity.ai.goal.Goal
adjustedTickDelay, canUse, getFlags, isInterruptable, reducedTickDelay, requiresUpdateEveryTick, setFlags, tick, toString
-
Field Details
-
mob
protected final net.minecraft.world.entity.Mob mobThe 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:
canContinueToUsein classnet.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:
startin classnet.minecraft.world.entity.ai.goal.Goal
-
stop
public void stop()- Overrides:
stopin classnet.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
-