Class ChargeAtTargetGoal
java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.MoveToBlockGoal
com.lightning.northstar.entity.goals.ChargeAtTargetGoal
public class ChargeAtTargetGoal
extends net.minecraft.world.entity.ai.goal.MoveToBlockGoal
-
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 inherited from class net.minecraft.world.entity.ai.goal.MoveToBlockGoal
blockPos, mob, nextStartTick, speedModifier, tryTicks, verticalSearchStart -
Constructor Summary
ConstructorsConstructorDescriptionChargeAtTargetGoal(VenusStoneBullEntity mob, double pSpeedModifier, int pSearchRange) -
Method Summary
Modifier and TypeMethodDescriptiondoublenet.minecraft.world.phys.Vec3blockPosToVec3(net.minecraft.core.BlockPos pos) booleanbooleancanUse()Returns whether execution should begin.protected booleanisValidTarget(net.minecraft.world.level.LevelReader pLevel, net.minecraft.core.BlockPos pPos) Returntrueto set given position as destinationprotected voidvoidplayBreakSound(net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos) voidplayDestroyProgressSound(net.minecraft.world.level.LevelAccessor pLevel, net.minecraft.core.BlockPos pPos) voidstart()Execute a one shot task or start executing a continuous taskvoidstop()Reset the task's internal state.voidtick()Keep ticking a continuous task that has already been startedMethods inherited from class net.minecraft.world.entity.ai.goal.MoveToBlockGoal
findNearestBlock, getMoveToTarget, isReachedTarget, nextStartTick, requiresUpdateEveryTick, shouldRecalculatePathMethods inherited from class net.minecraft.world.entity.ai.goal.Goal
adjustedTickDelay, getFlags, isInterruptable, reducedTickDelay, setFlags, toString
-
Constructor Details
-
ChargeAtTargetGoal
-
-
Method Details
-
acceptedDistance
public double acceptedDistance()- Overrides:
acceptedDistancein classnet.minecraft.world.entity.ai.goal.MoveToBlockGoal
-
canUse
public boolean canUse()Returns whether execution should begin. You can also read and cache any state necessary for execution in this method as well.- Overrides:
canUsein classnet.minecraft.world.entity.ai.goal.MoveToBlockGoal
-
stop
public void stop()Reset the task's internal state. Called when this task is interrupted by another one- Overrides:
stopin classnet.minecraft.world.entity.ai.goal.Goal
-
start
public void start()Execute a one shot task or start executing a continuous task- Overrides:
startin classnet.minecraft.world.entity.ai.goal.MoveToBlockGoal
-
playDestroyProgressSound
public void playDestroyProgressSound(net.minecraft.world.level.LevelAccessor pLevel, net.minecraft.core.BlockPos pPos) -
playBreakSound
public void playBreakSound(net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos) -
tick
public void tick()Keep ticking a continuous task that has already been started- Overrides:
tickin classnet.minecraft.world.entity.ai.goal.MoveToBlockGoal
-
blockPosToVec3
public net.minecraft.world.phys.Vec3 blockPosToVec3(net.minecraft.core.BlockPos pos) -
canContinueToUse
public boolean canContinueToUse()- Overrides:
canContinueToUsein classnet.minecraft.world.entity.ai.goal.MoveToBlockGoal
-
moveMobToBlock
protected void moveMobToBlock()- Overrides:
moveMobToBlockin classnet.minecraft.world.entity.ai.goal.MoveToBlockGoal
-
isValidTarget
protected boolean isValidTarget(net.minecraft.world.level.LevelReader pLevel, net.minecraft.core.BlockPos pPos) Returntrueto set given position as destination- Specified by:
isValidTargetin classnet.minecraft.world.entity.ai.goal.MoveToBlockGoal
-