Package net.minecraft.src
Class TileEntityBeacon
java.lang.Object
net.minecraft.src.TileEntity
net.minecraft.src.TileEntityBeacon
- All Implemented Interfaces:
IInventory
-
Field Summary
FieldsModifier and TypeFieldDescriptionintintstatic final Potion[][]List of effects that Beacon can applybooleanbooleanbooleancan use this for slow ticking things, like refreshing potion effectsFields inherited from class net.minecraft.src.TileEntity
blockMetadata, blockType, tileEntityInvalid, worldObj, xCoord, yCoord, zCoord -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddecrStackSize(int par1, int par2) Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a new stack.floatvoidfunc_94047_a(String par1Str) Overriden in a sign to provide the text.intReturns the maximum stack size for a inventory slot.Returns the name of the inventory.intReturn the levels of this beacon's pyramid.doubleintReturn the primary potion effect given by this beacon.intReturn the secondary potion effect given by this beacon.intReturns the number of slots in the inventory.getStackInSlot(int par1) 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.longbooleanbooleanIf this returns false, the inventory name will be used as an unlocalized name, and translated into the player's language.booleanisItemValidForSlot(int par1, ItemStack par2ItemStack) Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot.protected booleanisOn()booleanisUseableByPlayer(EntityPlayer par1EntityPlayer) Do not make give this method the name canInteractWith because it clashes with ContainervoidvoidreadFromNBT(NBTTagCompound par1NBTTagCompound) Reads a tile entity from NBT.voidsetInventorySlotContents(int par1, ItemStack par2ItemStack) Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).protected voidsetIsOn(boolean bOn) voidsetLevels(int par1) Set the levels of this beacon's pyramid.voidsetLevelsServerSafe(int par1) voidsetPowerState(boolean isOn, int newPowerLevel, BeaconEffect effectClass) voidsetPrimaryEffect(int par1) voidsetSecondaryEffect(int par1) voidAllows the entity to update its state.voidwriteToNBT(NBTTagCompound par1NBTTagCompound) Writes a tile entity to NBT.Methods inherited from class net.minecraft.src.TileEntity
addMapping, createAndLoadEntity, func_85027_a, getBlockMetadata, getBlockType, getDistanceFrom, getWorldObj, hasWorldObj, invalidate, isInvalid, onInventoryChanged, 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
onInventoryChanged
-
Field Details
-
effectsList
List of effects that Beacon can apply -
isBeaconActive
public boolean isBeaconActive -
updatedPowerState
public boolean updatedPowerStatecan use this for slow ticking things, like refreshing potion effects -
playerRespawnedAtBeacon
public boolean playerRespawnedAtBeacon -
belowBlockID
public int belowBlockID -
belowMetadata
public int belowMetadata -
beaconEffect
-
-
Constructor Details
-
TileEntityBeacon
public TileEntityBeacon()
-
-
Method Details
-
func_82125_v_
public float func_82125_v_() -
getPrimaryEffect
public int getPrimaryEffect()Return the primary potion effect given by this beacon. -
getSecondaryEffect
public int getSecondaryEffect()Return the secondary potion effect given by this beacon. -
getLevels
public int getLevels()Return the levels of this beacon's pyramid. -
setLevels
public void setLevels(int par1) Set the levels of this beacon's pyramid. -
setPrimaryEffect
public void setPrimaryEffect(int par1) -
setSecondaryEffect
public void setSecondaryEffect(int par1) -
getDescriptionPacket
Overriden in a sign to provide the text.- Overrides:
getDescriptionPacketin classTileEntity
-
getMaxRenderDistanceSquared
public double getMaxRenderDistanceSquared()- Overrides:
getMaxRenderDistanceSquaredin classTileEntity
-
readFromNBT
Reads a tile entity from NBT.- Overrides:
readFromNBTin classTileEntity
-
writeToNBT
Writes a tile entity to NBT.- Overrides:
writeToNBTin classTileEntity
-
getSizeInventory
public int getSizeInventory()Returns the number of slots in the inventory.- Specified by:
getSizeInventoryin interfaceIInventory
-
getStackInSlot
Returns the stack in slot i- Specified by:
getStackInSlotin interfaceIInventory
-
decrStackSize
Removes 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
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.- Specified by:
getStackInSlotOnClosingin interfaceIInventory
-
setInventorySlotContents
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).- Specified by:
setInventorySlotContentsin interfaceIInventory
-
getInvName
Returns the name of the inventory.- Specified by:
getInvNamein interfaceIInventory
-
isInvNameLocalized
public boolean isInvNameLocalized()If 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
-
func_94047_a
-
getInventoryStackLimit
public int getInventoryStackLimit()Returns 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
-
isUseableByPlayer
Do 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
Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot.- Specified by:
isItemValidForSlotin interfaceIInventory
-
isOn
protected boolean isOn() -
setIsOn
protected void setIsOn(boolean bOn) -
setLevelsServerSafe
public void setLevelsServerSafe(int par1) -
isHomeBeacon
public boolean isHomeBeacon() -
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
-
setPowerState
-
getActiveEffect
-
getUpdateOffset
public long getUpdateOffset()
-