Package net.minecraft.entity.ai.goal
Class BreakBlockGoal
java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.MoveToBlockGoal
net.minecraft.entity.ai.goal.BreakBlockGoal
- Direct Known Subclasses:
ZombieEntity.AttackTurtleEggGoal
-
Nested Class Summary
-
Field Summary
Fields inherited from class net.minecraft.entity.ai.goal.MoveToBlockGoal
blockPos, mob, nextStartTick, speedModifier, tryTicks, verticalSearchStart
-
Constructor Summary
ConstructorDescriptionBreakBlockGoal
(Block p_i48795_1_, CreatureEntity p_i48795_2_, double p_i48795_3_, int p_i48795_5_) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canUse()
private BlockPos
getPosWithBlock
(BlockPos p_203115_1_, IBlockReader p_203115_2_) protected boolean
isValidTarget
(IWorldReader p_179488_1_, BlockPos p_179488_2_) void
playBreakSound
(World p_203116_1_, BlockPos p_203116_2_) void
playDestroyProgressSound
(IWorld p_203114_1_, BlockPos p_203114_2_) void
start()
void
stop()
void
tick()
private boolean
Methods inherited from class net.minecraft.entity.ai.goal.MoveToBlockGoal
acceptedDistance, canContinueToUse, findNearestBlock, getMoveToTarget, isReachedTarget, moveMobToBlock, nextStartTick, shouldRecalculatePath
Methods inherited from class net.minecraft.entity.ai.goal.Goal
getFlags, isInterruptable, setFlags, toString
-
Field Details
-
blockToRemove
-
removerMob
-
ticksSinceReachedGoal
private int ticksSinceReachedGoal
-
-
Constructor Details
-
BreakBlockGoal
public BreakBlockGoal(Block p_i48795_1_, CreatureEntity p_i48795_2_, double p_i48795_3_, int p_i48795_5_)
-
-
Method Details
-
canUse
public boolean canUse()- Overrides:
canUse
in classMoveToBlockGoal
-
tryFindBlock
private boolean tryFindBlock() -
stop
public void stop() -
start
public void start()- Overrides:
start
in classMoveToBlockGoal
-
playDestroyProgressSound
-
playBreakSound
-
tick
public void tick()- Overrides:
tick
in classMoveToBlockGoal
-
getPosWithBlock
-
isValidTarget
- Specified by:
isValidTarget
in classMoveToBlockGoal
-