Package btw.block.tileentity
Class CookingVesselTileEntity
java.lang.Object
net.minecraft.src.TileEntity
btw.block.tileentity.CookingVesselTileEntity
- All Implemented Interfaces:
TileEntityDataPacketHandler,IInventory
- Direct Known Subclasses:
CauldronTileEntity,CrucibleTileEntity
public abstract class CookingVesselTileEntity
extends TileEntity
implements IInventory, TileEntityDataPacketHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected ItemStack[]protected intprotected intintprotected static final intintprotected static final intprotected intshortFields inherited from class net.minecraft.src.TileEntity
blockMetadata, blockType, tileEntityInvalid, worldObj, xCoord, yCoord, zCoord -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected booleanvoiddecrStackSize(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.protected booleanintgetCookProgressScaled(int iScale) protected abstract BulkCraftingManagergetCraftingManager(int iFireType) intOverriden in a sign to provide the text.intReturns the maximum stack size for a inventory slot.intReturns the number of slots in the inventory.getStackInSlot(int iSlot) Returns the stack in slot igetStackInSlotOnClosing(int par1) 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.booleanbooleanisUseableByPlayer(EntityPlayer entityPlayer) Do not make give this method the name canInteractWith because it clashes with ContainervoidCalled when an the contents of an Inventory change, usuallyvoidvoidreadFromNBT(NBTTagCompound nbttagcompound) Reads a tile entity from NBT.voidreadNBTFromPacket(NBTTagCompound nbttagcompound) voidsetInventorySlotContents(int iSlot, ItemStack itemstack) 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.abstract voidvoidvoidwriteToNBT(NBTTagCompound nbttagcompound) Writes a tile entity to NBT.Methods inherited from class net.minecraft.src.TileEntity
addMapping, createAndLoadEntity, func_85027_a, getBlockMetadata, getBlockType, getDistanceFrom, getMaxRenderDistanceSquared, getWorldObj, hasWorldObj, invalidate, isInvalid, receiveClientEvent, setWorldObj, updateContainingBlockInfo, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.src.IInventory
getInvName, isInvNameLocalized, isItemValidForSlot
-
Field Details
-
INVENTORY_SIZE
protected static final int INVENTORY_SIZE- See Also:
-
STACK_SIZE_TO_DROP_WHEN_TIPPED
protected static final int STACK_SIZE_TO_DROP_WHEN_TIPPED- See Also:
-
contents
-
cookCounter
protected int cookCounter -
stokedCooldownCounter
protected int stokedCooldownCounter -
containsValidIngredientsForState
protected boolean containsValidIngredientsForState -
fireUnderType
protected int fireUnderType -
scaledCookCounter
public int scaledCookCounter -
forceFacing
public int forceFacing -
storageSlotsOccupied
public short storageSlotsOccupied
-
-
Constructor Details
-
CookingVesselTileEntity
public CookingVesselTileEntity()
-
-
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
-
getDescriptionPacket
Description copied from class:TileEntityOverriden in a sign to provide the text.- Overrides:
getDescriptionPacketin classTileEntity
-
readNBTFromPacket
- Specified by:
readNBTFromPacketin interfaceTileEntityDataPacketHandler
-
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
-
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
-
validateContentsForState
public abstract void validateContentsForState() -
getCraftingManager
-
getCurrentFireFactor
public int getCurrentFireFactor() -
validateFireUnderType
public void validateFireUnderType() -
attemptToCookNormal
protected boolean attemptToCookNormal() -
attemptToCookStoked
protected boolean attemptToCookStoked() -
getCookProgressScaled
public int getCookProgressScaled(int iScale) -
isCooking
public boolean isCooking() -
doesContainExplosives
protected boolean doesContainExplosives()
-