Class RangedKitingGoal
java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
com.binaris.wizardry.content.entity.goal.RangedKitingGoal
public class RangedKitingGoal
extends net.minecraft.world.entity.ai.goal.Goal
Intelligent kiting goal for ranged attack entities that maintains a safe distance. Just controls the movement directly
without using pathfinding (avoiding the look modifications that comes with that), leaving look control to other goals
(e.g.
HardLookAtTargetGoal), and attack control to other goals (e.g. AttackSpellBasicGoal).
Behavior:
- If the target is too close (FLEE_DISTANCE): retreats
- If the target is at optimal distance: stops movement
- If the target is too far (SAFE_DISTANCE): advances towards it
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.Goal.Flag -
Constructor Summary
ConstructorsConstructorDescriptionRangedKitingGoal(net.minecraft.world.entity.PathfinderMob mob, double moveSpeed) Simplified constructor with default distance values.RangedKitingGoal(net.minecraft.world.entity.PathfinderMob mob, double moveSpeed, double safeDistance, double fleeDistance, double followRange) General constructor, allowing full configuration for the kiting behavior. -
Method Summary
Methods inherited from class net.minecraft.world.entity.ai.goal.Goal
adjustedTickDelay, getFlags, isInterruptable, reducedTickDelay, setFlags, toString
-
Constructor Details
-
RangedKitingGoal
public RangedKitingGoal(net.minecraft.world.entity.PathfinderMob mob, double moveSpeed, double safeDistance, double fleeDistance, double followRange) General constructor, allowing full configuration for the kiting behavior.- Parameters:
mob- Mob that will use this goalmoveSpeed- Movement speed when approaching or retreatingsafeDistance- Distance to maintain from the targetfleeDistance- Minimum distance before retreatingfollowRange- Maximum range to follow the target
-
RangedKitingGoal
public RangedKitingGoal(net.minecraft.world.entity.PathfinderMob mob, double moveSpeed) Simplified constructor with default distance values.- Parameters:
mob- Mob that will use this goalmoveSpeed- Movement speed when approaching or retreating
-
-
Method Details
-
canUse
public boolean canUse()- Specified by:
canUsein classnet.minecraft.world.entity.ai.goal.Goal
-
canContinueToUse
public boolean canContinueToUse()- Overrides:
canContinueToUsein classnet.minecraft.world.entity.ai.goal.Goal
-
requiresUpdateEveryTick
public boolean requiresUpdateEveryTick()- Overrides:
requiresUpdateEveryTickin classnet.minecraft.world.entity.ai.goal.Goal
-
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
-
tick
public void tick()- Overrides:
tickin classnet.minecraft.world.entity.ai.goal.Goal
-