Package net.minecraft.src
Class ItemInWorldManager
java.lang.Object
net.minecraft.src.ItemInWorldManager
- Direct Known Subclasses:
DemoWorldManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe world object that this object is connected to.The EntityPlayerMP object that this object is connected to. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanactivateBlockOrUseItem(EntityPlayer par1EntityPlayer, World par2World, ItemStack par3ItemStack, int par4, int par5, int par6, int par7, float par8, float par9, float par10) Activate the clicked on block, otherwise use the held item.voidcancelDestroyingBlock(int par1, int par2, int par3) note: this ignores the pars passed in and continues to destroy the onClickedBlockvoidinitializeGameType(EnumGameType par1EnumGameType) if the gameType is currently NOT_SET then change it to par1booleanGet if we are in creative game mode.voidonBlockClicked(int par1, int par2, int par3, int par4) if not creative, it calls destroyBlockInWorldPartially untill the block is broken first. par4 is the specific side. tryHarvestBlock can also be the result of this callvoidsetGameType(EnumGameType par1EnumGameType) voidsetWorld(WorldServer par1WorldServer) Sets the world instance.booleansurvivalTryHarvestBlock(int i, int j, int k, int iFromSide) booleantryHarvestBlock(int i, int j, int k) booleantryHarvestBlock(int i, int j, int k, int iFromSide) booleantryUseItem(EntityPlayer player, World world, ItemStack stack) Attempts to right-click use an item by the given EntityPlayer in the given WorldvoiduncheckedTryHarvestBlock(int par1, int par2, int par3) voiduncheckedTryHarvestBlock(int par1, int par2, int par3, int iFromFacing) void
-
Field Details
-
theWorld
The world object that this object is connected to. -
thisPlayerMP
The EntityPlayerMP object that this object is connected to.
-
-
Constructor Details
-
ItemInWorldManager
-
-
Method Details
-
setGameType
-
getGameType
-
isCreative
public boolean isCreative()Get if we are in creative game mode. -
initializeGameType
if the gameType is currently NOT_SET then change it to par1 -
updateBlockRemoving
public void updateBlockRemoving() -
onBlockClicked
public void onBlockClicked(int par1, int par2, int par3, int par4) if not creative, it calls destroyBlockInWorldPartially untill the block is broken first. par4 is the specific side. tryHarvestBlock can also be the result of this call -
uncheckedTryHarvestBlock
public void uncheckedTryHarvestBlock(int par1, int par2, int par3) -
uncheckedTryHarvestBlock
public void uncheckedTryHarvestBlock(int par1, int par2, int par3, int iFromFacing) -
cancelDestroyingBlock
public void cancelDestroyingBlock(int par1, int par2, int par3) note: this ignores the pars passed in and continues to destroy the onClickedBlock -
tryUseItem
Attempts to right-click use an item by the given EntityPlayer in the given World -
activateBlockOrUseItem
public boolean activateBlockOrUseItem(EntityPlayer par1EntityPlayer, World par2World, ItemStack par3ItemStack, int par4, int par5, int par6, int par7, float par8, float par9, float par10) Activate the clicked on block, otherwise use the held item. Args: player, world, itemStack, x, y, z, side, xOffset, yOffset, zOffset -
setWorld
Sets the world instance. -
tryHarvestBlock
public boolean tryHarvestBlock(int i, int j, int k) -
tryHarvestBlock
public boolean tryHarvestBlock(int i, int j, int k, int iFromSide) -
survivalTryHarvestBlock
public boolean survivalTryHarvestBlock(int i, int j, int k, int iFromSide)
-