Package btw.block.tileentity
Class MillstoneTileEntity
java.lang.Object
net.minecraft.src.TileEntity
btw.block.tileentity.MillstoneTileEntity
- All Implemented Interfaces:
IInventory
-
Field Summary
FieldsFields inherited from class net.minecraft.src.TileEntity
blockMetadata, blockType, tileEntityInvalid, worldObj, xCoord, yCoord, zCoord -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidbooleandecrStackSize(int iSlot, int iAmount) Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a new stack.voidejectContents(int iFacing) voidejectStackOnMilled(ItemStack stack) intgetGrindProgressScaled(int iScale) intReturns the maximum stack size for a inventory slot.Returns the name of the inventory.intReturns the number of slots in the inventory.getStackInSlot(int iSlot) Returns the stack in slot igetStackInSlotOnClosing(int iSlot) When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem - like when you close a workbench GUI.booleanbooleanIf this returns false, the inventory name will be used as an unlocalized name, and translated into the player's language.booleanisItemValidForSlot(int iSlot, ItemStack stack) Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot.booleanisUseableByPlayer(EntityPlayer entityplayer) Do not make give this method the name canInteractWith because it clashes with ContainervoidCalled when an the contents of an Inventory change, usuallyvoidvoidReads a tile entity from NBT.voidsetInventorySlotContents(int iSlot, ItemStack stack) Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).voidAllows the entity to update its state.voidwriteToNBT(NBTTagCompound tag) Writes a tile entity to NBT.Methods inherited from class net.minecraft.src.TileEntity
addMapping, createAndLoadEntity, func_85027_a, getBlockMetadata, getBlockType, getDescriptionPacket, getDistanceFrom, getMaxRenderDistanceSquared, getWorldObj, hasWorldObj, invalidate, isInvalid, receiveClientEvent, setWorldObj, updateContainingBlockInfo, validate
-
Field Details
-
stackMilling
-
UNLOCALIZED_NAME
- See Also:
-
grindCounter
public int grindCounter
-
-
Constructor Details
-
MillstoneTileEntity
public MillstoneTileEntity()
-
-
Method Details
-
readFromNBT
Description copied from class:TileEntityReads a tile entity from NBT.- Overrides:
readFromNBTin classTileEntity
-
writeToNBT
Description copied from class:TileEntityWrites a tile entity to NBT.- Overrides:
writeToNBTin classTileEntity
-
updateEntity
public void updateEntity()Description copied from class:TileEntityAllows the entity to update its state. Overridden in most subclasses, e.g. the mob spawner uses this to count ticks and creates a new spawn inside its implementation.- Overrides:
updateEntityin classTileEntity
-
getSizeInventory
public int getSizeInventory()Description copied from interface:IInventoryReturns the number of slots in the inventory.- Specified by:
getSizeInventoryin interfaceIInventory
-
getStackInSlot
Description copied from interface:IInventoryReturns the stack in slot i- Specified by:
getStackInSlotin interfaceIInventory
-
decrStackSize
Description copied from interface:IInventoryRemoves from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a new stack.- Specified by:
decrStackSizein interfaceIInventory
-
getStackInSlotOnClosing
Description copied from interface:IInventoryWhen some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem - like when you close a workbench GUI.- Specified by:
getStackInSlotOnClosingin interfaceIInventory
-
setInventorySlotContents
Description copied from interface:IInventorySets the given item stack to the specified slot in the inventory (can be crafting or armor sections).- Specified by:
setInventorySlotContentsin interfaceIInventory
-
getInvName
Description copied from interface:IInventoryReturns the name of the inventory.- Specified by:
getInvNamein interfaceIInventory
-
getInventoryStackLimit
public int getInventoryStackLimit()Description copied from interface:IInventoryReturns the maximum stack size for a inventory slot. Seems to always be 64, possibly will be extended. *Isn't this more of a set than a get?*- Specified by:
getInventoryStackLimitin interfaceIInventory
-
onInventoryChanged
public void onInventoryChanged()Description copied from class:TileEntityCalled when an the contents of an Inventory change, usually- Specified by:
onInventoryChangedin interfaceIInventory- Overrides:
onInventoryChangedin classTileEntity
-
isUseableByPlayer
Description copied from interface:IInventoryDo not make give this method the name canInteractWith because it clashes with Container- Specified by:
isUseableByPlayerin interfaceIInventory
-
openChest
public void openChest()- Specified by:
openChestin interfaceIInventory
-
closeChest
public void closeChest()- Specified by:
closeChestin interfaceIInventory
-
isItemValidForSlot
Description copied from interface:IInventoryReturns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot.- Specified by:
isItemValidForSlotin interfaceIInventory
-
isInvNameLocalized
public boolean isInvNameLocalized()Description copied from interface:IInventoryIf this returns false, the inventory name will be used as an unlocalized name, and translated into the player's language. Otherwise it will be used directly.- Specified by:
isInvNameLocalizedin interfaceIInventory
-
ejectStackOnMilled
-
getGrindProgressScaled
public int getGrindProgressScaled(int iScale) -
isGrinding
public boolean isGrinding() -
containsWholeCompanionCube
public boolean containsWholeCompanionCube() -
ejectContents
public void ejectContents(int iFacing) -
attemptToAddSingleItemFromStack
-