public static class TurtleBlockEvent.Inspect extends TurtleBlockEvent
TurtleAction.INSPECT
TurtleBlockEvent.Dig, TurtleBlockEvent.Inspect, TurtleBlockEvent.Move, TurtleBlockEvent.Place
Constructor and Description |
---|
Inspect(ITurtleAccess turtle,
net.minecraftforge.common.util.FakePlayer player,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
java.util.Map<java.lang.String,java.lang.Object> data) |
Modifier and Type | Method and Description |
---|---|
void |
addData(java.util.Map<java.lang.String,?> newData)
Add new information to the inspection result.
|
java.util.Map<java.lang.String,java.lang.Object> |
getData()
Get the "inspection data" from this block, which will be returned to the user.
|
net.minecraft.block.state.IBlockState |
getState()
Get the block state which is being inspected.
|
getPos, getWorld
getPlayer
getAction, getFailureMessage, setCanceled, setCanceled
getTurtle
public Inspect(@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 state, @Nonnull java.util.Map<java.lang.String,java.lang.Object> data)
@Nonnull public net.minecraft.block.state.IBlockState getState()
@Nonnull public java.util.Map<java.lang.String,java.lang.Object> getData()
public void addData(@Nonnull java.util.Map<java.lang.String,?> newData)
newData
- The data to add. Note all values should be convertable to Lua (see
IPeripheral.callMethod(IComputerAccess, ILuaContext, int, Object[])
).