Constructs a new ItemContainer object
Constructs a new ItemContainer object from given deprecated UI.Container object
Clears slot's contents
slot name
Closes UI for all clients
Closes UI for client
client in which UI will be open
Drops slot's contents on the specified coordinates and clears the slot
slot name
TileEntity if the following container is part of it, and null otherwise
Gets the slot by its name. If a slot with specified name doesn't exists, creates an empty one with specified name
slot name
contents of the slot in a ItemContainerSlot object. You can modify it to change the contents of the slot
element name
"text" binding value, usually the text displayed on the element, or null if no element with specified name exist
element name
"value" binding value, e.g. scale value, or null if no element with specified name exist
false if container supports multiplayer, true otherwise. For ItemContainer, it returns false
Opens UI for client
client in which UI will be open
name of the screen to open
Sends changes in container to all clients. Needs to be used every time when something changes in container.
Sends packet from client container copy to server.
Sends packet from server container copy to client.
Sends event to move specified amount of items from the player inventory slot by given index to container slot by given name. This event is sent from client to server, so you should use it only on the client side, for example, in custom slot element touch events etc.
numeric index of the inventory slot, from where to retrieve the item
string name of the container slot, where to put taken item
item count to be retrieved from inventory slot
Sends packet from server container. ONLY AVAILABLE IN SERVER CONTAINER EVENTS
Sends event to move specified amount of items from the container slot by given name to player's inventory. The index of the inventory slot, where to put item, can't be specified, because it's decided by ItemContainer automatically, and you just don't need to do this. This event is sent from client to server, so you should use it only on the client side, for example, in custom slot element touch events etc.
string name of the container slot, from where to retrieve item
item count to be retrieved from container slot
Sends event to move specified amount of items from one container slot to another by given names. This event is sent from client to server, so you should use it only on the client side, for example, in custom slot element touch events etc.
string name of the container slot, from where to retrieve item
string name of the container slot, where to put taken item
item count to be retrieved from container slot
Sets container's parent object, for TileEntity's container it should be a TileEntity reference, otherwise you can pass any value to be used in your code later
an object to be set as container's parent
Sets "value" binding value for the element. Used to set scales values
element name
value to be set for the element
Sets slot's content by its name from given slot object. If a slot with specified name doesn't exist, a new slot with specified name and item will be created.
slot name
ItemContainerSlot object to specify slot contents
Set slot's content by its name. If a slot with specified name doesn't exists, creates new with specified name and item
slot name
Sets "text" binding value for the element. Used to set element's text
element name
value to be set for the element
Validates all the slots in the container
Validates slot contents. If the data value is less then 0, it becomes 0, if id is 0 or count is less then or equals to zero, slot is reset to an empty one
slot name
Generated using TypeDoc
New type of TileEntity container that supports multiplayer