public static class TurtleBlockEvent.Dig extends TurtleBlockEvent
ITurtleUpgrade.useTool(ITurtleAccess, TurtleSide, TurtleVerb, EnumFacing)
,
as the base turtle.dig()
command does not fire it.
Note that such commands should also fire BlockEvent.BreakEvent
, so you do not need to listen to both.TurtleAction.DIG
TurtleBlockEvent.Dig, TurtleBlockEvent.Inspect, TurtleBlockEvent.Move, TurtleBlockEvent.Place
Constructor and Description |
---|
Dig(ITurtleAccess turtle,
net.minecraftforge.common.util.FakePlayer player,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState block,
ITurtleUpgrade upgrade,
TurtleSide side) |
Modifier and Type | Method and Description |
---|---|
net.minecraft.block.state.IBlockState |
getBlock()
Get the block which is about to be broken.
|
TurtleSide |
getSide()
Get the side the upgrade doing the digging is on.
|
ITurtleUpgrade |
getUpgrade()
Get the upgrade doing the digging
|
getPos, getWorld
getPlayer
getAction, getFailureMessage, setCanceled, setCanceled
getTurtle
public Dig(@Nonnull ITurtleAccess turtle, @Nonnull net.minecraftforge.common.util.FakePlayer player, @Nonnull net.minecraft.world.World world, @Nonnull net.minecraft.util.math.BlockPos pos, @Nonnull net.minecraft.block.state.IBlockState block, @Nonnull ITurtleUpgrade upgrade, @Nonnull TurtleSide side)
@Nonnull public net.minecraft.block.state.IBlockState getBlock()
@Nonnull public ITurtleUpgrade getUpgrade()
@Nonnull public TurtleSide getSide()