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, validate
public void setCommand(String par1Str)
public int executeCommandOnPowered(World par1World)
public String getCommand()
public String getCommandSenderName()
getCommandSenderName
in interface ICommandSender
public void setCommandSenderName(String par1Str)
public void sendChatToPlayer(ChatMessageComponent par1ChatMessageComponent)
sendChatToPlayer
in interface ICommandSender
public boolean canCommandSenderUseCommand(int par1, String par2Str)
canCommandSenderUseCommand
in interface ICommandSender
public void writeToNBT(NBTTagCompound par1NBTTagCompound)
writeToNBT
in class TileEntity
public void readFromNBT(NBTTagCompound par1NBTTagCompound)
readFromNBT
in class TileEntity
public ChunkCoordinates getPlayerCoordinates()
getPlayerCoordinates
in interface ICommandSender
public World getEntityWorld()
getEntityWorld
in interface ICommandSender
public Packet getDescriptionPacket()
getDescriptionPacket
in class TileEntity
public int getSignalStrength()
public void setSignalStrength(int par1)