public class DemoWorldManager extends ItemInWorldManager
theWorld, thisPlayerMP| Constructor and Description |
|---|
DemoWorldManager(World worldIn) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
activateBlockOrUseItem(EntityPlayer player,
World worldIn,
ItemStack stack,
BlockPos pos,
EnumFacing side,
float offsetX,
float offsetY,
float offsetZ)
Activate the clicked on block, otherwise use the held item.
|
void |
blockRemoving(BlockPos pos) |
void |
onBlockClicked(BlockPos pos,
EnumFacing side)
If not creative, it calls sendBlockBreakProgress until the block is broken first. tryHarvestBlock can also be the
result of this call.
|
boolean |
tryHarvestBlock(BlockPos pos)
Attempts to harvest a block
|
boolean |
tryUseItem(EntityPlayer player,
World worldIn,
ItemStack stack)
Attempts to right-click use an item by the given EntityPlayer in the given World
|
void |
updateBlockRemoving() |
cancelDestroyingBlock, getBlockReachDistance, getGameType, initializeGameType, isCreative, setBlockReachDistance, setGameType, setWorld, survivalOrAdventurepublic DemoWorldManager(World worldIn)
public void updateBlockRemoving()
updateBlockRemoving in class ItemInWorldManagerpublic void onBlockClicked(BlockPos pos, EnumFacing side)
onBlockClicked in class ItemInWorldManagerpublic void blockRemoving(BlockPos pos)
blockRemoving in class ItemInWorldManagerpublic boolean tryHarvestBlock(BlockPos pos)
tryHarvestBlock in class ItemInWorldManagerpublic boolean tryUseItem(EntityPlayer player, World worldIn, ItemStack stack)
tryUseItem in class ItemInWorldManagerpublic boolean activateBlockOrUseItem(EntityPlayer player, World worldIn, ItemStack stack, BlockPos pos, EnumFacing side, float offsetX, float offsetY, float offsetZ)
activateBlockOrUseItem in class ItemInWorldManager