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, survivalOrAdventure
public DemoWorldManager(World worldIn)
public void updateBlockRemoving()
updateBlockRemoving
in class ItemInWorldManager
public void onBlockClicked(BlockPos pos, EnumFacing side)
onBlockClicked
in class ItemInWorldManager
public void blockRemoving(BlockPos pos)
blockRemoving
in class ItemInWorldManager
public boolean tryHarvestBlock(BlockPos pos)
tryHarvestBlock
in class ItemInWorldManager
public boolean tryUseItem(EntityPlayer player, World worldIn, ItemStack stack)
tryUseItem
in class ItemInWorldManager
public boolean activateBlockOrUseItem(EntityPlayer player, World worldIn, ItemStack stack, BlockPos pos, EnumFacing side, float offsetX, float offsetY, float offsetZ)
activateBlockOrUseItem
in class ItemInWorldManager