Class RemoveBlockGoal
java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.MoveToBlockGoal
net.minecraft.world.entity.ai.goal.RemoveBlockGoal
- Direct Known Subclasses:
Zombie.ZombieAttackTurtleEggGoal
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Block
private final Mob
private int
private static final int
Fields inherited from class net.minecraft.world.entity.ai.goal.MoveToBlockGoal
blockPos, mob, nextStartTick, speedModifier, tryTicks, verticalSearchStart
-
Constructor Summary
ConstructorDescriptionRemoveBlockGoal
(Block p_25840_, PathfinderMob p_25841_, double p_25842_, int p_25843_) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canUse()
private BlockPos
getPosWithBlock
(BlockPos p_25853_, BlockGetter p_25854_) protected boolean
isValidTarget
(LevelReader p_25850_, BlockPos p_25851_) void
playBreakSound
(Level p_25845_, BlockPos p_25846_) void
playDestroyProgressSound
(LevelAccessor p_25847_, BlockPos p_25848_) void
start()
void
stop()
void
tick()
Methods inherited from class net.minecraft.world.entity.ai.goal.MoveToBlockGoal
acceptedDistance, canContinueToUse, findNearestBlock, getMoveToTarget, isReachedTarget, moveMobToBlock, nextStartTick, requiresUpdateEveryTick, shouldRecalculatePath
Methods inherited from class net.minecraft.world.entity.ai.goal.Goal
adjustedTickDelay, getFlags, isInterruptable, reducedTickDelay, setFlags, toString
-
Field Details
-
blockToRemove
-
removerMob
-
ticksSinceReachedGoal
private int ticksSinceReachedGoal -
WAIT_AFTER_BLOCK_FOUND
private static final int WAIT_AFTER_BLOCK_FOUND- See Also:
-
-
Constructor Details
-
RemoveBlockGoal
-
-
Method Details
-
canUse
public boolean canUse()- Overrides:
canUse
in classMoveToBlockGoal
-
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
-