public interface Rack extends SidedEnvironment, EnvironmentHost, Rotatable, net.minecraft.inventory.IInventory
RackMountable
s installed in the rack to flag
themselves as having changed, so their data gets resent to clients.
Server racks do not serve as environment for the computer nodes of
servers. That's what the Server
s are for,
which are mountables that can be placed in the rack.
Another purpose is to allow identifying tile entities as racks via the API,
i.e. without having to link against internal classes. This also means that
you should not implement this.Modifier and Type | Method and Description |
---|---|
RackMountable |
getMountable(int slot)
The mountable in the specified slot.
|
net.minecraft.nbt.NBTTagCompound |
getMountableData(int slot)
Get the last data state provided by the mountable in the specified slot.
|
int |
indexOfMountable(RackMountable mountable)
Determine the index of the specified mountable.
|
void |
markChanged(int slot)
Mark the mountable in the specified slot as changed.
|
canConnect, sidedNode
markChanged, world, xPosition, yPosition, zPosition
closeInventory, decrStackSize, getInventoryName, getInventoryStackLimit, getSizeInventory, getStackInSlot, getStackInSlotOnClosing, hasCustomInventoryName, isItemValidForSlot, isUseableByPlayer, markDirty, openInventory, setInventorySlotContents
int indexOfMountable(RackMountable mountable)
mountable
- the mountable in this rack to get the index of.RackMountable getMountable(int slot)
slot
- the slot in which to get the mountable.net.minecraft.nbt.NBTTagCompound getMountableData(int slot)
slot
- the slot of the mountable to get the data for.void markChanged(int slot)
RackMountable.getData()
method
to be called in the next tick and the updated data to be sent to the
clients, where it can be used for state based rendering of the mountable
for example.slot
- the slot of the mountable to queue for updating.