public class TileEntityCommandBlock extends TileEntity implements ICommandSender
blockMetadata, blockType, INFINITE_EXTENT_AABB, worldObj, xCoord, yCoord, zCoord| Constructor and Description |
|---|
TileEntityCommandBlock() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCommandSenderUseCommand(int par1,
String par2Str)
Returns true if the command sender is allowed to use the given command.
|
int |
executeCommandOnPowered(World par1World)
Execute the command, called when the command block is powered.
|
String |
getCommand() |
String |
getCommandSenderName()
Gets the name of this command sender (usually username, but possibly "Rcon")
|
Packet |
getDescriptionPacket()
Overriden in a sign to provide the text.
|
World |
getEntityWorld() |
ChunkCoordinates |
getPlayerCoordinates()
Return the position for this command sender.
|
int |
getSignalStrength() |
void |
readFromNBT(NBTTagCompound par1NBTTagCompound)
Reads a tile entity from NBT.
|
void |
sendChatToPlayer(ChatMessageComponent par1ChatMessageComponent) |
void |
setCommand(String par1Str)
Sets the command this block will execute when powered.
|
void |
setCommandSenderName(String par1Str)
Sets the name of the command sender
|
void |
setSignalStrength(int par1) |
void |
writeToNBT(NBTTagCompound par1NBTTagCompound)
Writes a tile entity to NBT.
|
addMapping, canUpdate, createAndLoadEntity, func_85027_a, getBlockMetadata, getBlockType, getDistanceFrom, getMaxRenderDistanceSquared, getRenderBoundingBox, getWorldObj, hasWorldObj, invalidate, isInvalid, onChunkUnload, onDataPacket, onInventoryChanged, receiveClientEvent, setWorldObj, shouldRefresh, shouldRenderInPass, updateContainingBlockInfo, updateEntity, validatepublic void setCommand(String par1Str)
public int executeCommandOnPowered(World par1World)
public String getCommand()
public String getCommandSenderName()
getCommandSenderName in interface ICommandSenderpublic void setCommandSenderName(String par1Str)
public void sendChatToPlayer(ChatMessageComponent par1ChatMessageComponent)
sendChatToPlayer in interface ICommandSenderpublic boolean canCommandSenderUseCommand(int par1,
String par2Str)
canCommandSenderUseCommand in interface ICommandSenderpublic void writeToNBT(NBTTagCompound par1NBTTagCompound)
writeToNBT in class TileEntitypublic void readFromNBT(NBTTagCompound par1NBTTagCompound)
readFromNBT in class TileEntitypublic ChunkCoordinates getPlayerCoordinates()
getPlayerCoordinates in interface ICommandSenderpublic World getEntityWorld()
getEntityWorld in interface ICommandSenderpublic Packet getDescriptionPacket()
getDescriptionPacket in class TileEntitypublic int getSignalStrength()
public void setSignalStrength(int par1)