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
FieldsModifier and TypeFieldDescriptionprivate final Blockprivate final Mobprivate intprivate static final intFields inherited from class net.minecraft.world.entity.ai.goal.MoveToBlockGoal
blockPos, mob, nextStartTick, speedModifier, tryTicks, verticalSearchStart -
Constructor Summary
ConstructorsConstructorDescriptionRemoveBlockGoal(Block p_25840_, PathfinderMob p_25841_, double p_25842_, int p_25843_) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanUse()private BlockPosgetPosWithBlock(BlockPos p_25853_, BlockGetter p_25854_) protected booleanisValidTarget(LevelReader p_25850_, BlockPos p_25851_) voidplayBreakSound(Level p_25845_, BlockPos p_25846_) voidplayDestroyProgressSound(LevelAccessor p_25847_, BlockPos p_25848_) voidstart()voidstop()voidtick()private booleanMethods inherited from class net.minecraft.world.entity.ai.goal.MoveToBlockGoal
acceptedDistance, canContinueToUse, findNearestBlock, getMoveToTarget, isReachedTarget, moveMobToBlock, nextStartTick, requiresUpdateEveryTick, shouldRecalculatePathMethods 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:
canUsein classMoveToBlockGoal
-
tryFindBlock
private boolean tryFindBlock() -
stop
public void stop() -
start
public void start()- Overrides:
startin classMoveToBlockGoal
-
playDestroyProgressSound
-
playBreakSound
-
tick
public void tick()- Overrides:
tickin classMoveToBlockGoal
-
getPosWithBlock
-
isValidTarget
- Specified by:
isValidTargetin classMoveToBlockGoal
-