Package org.geysermc.geyser.inventory
Class Container
java.lang.Object
org.geysermc.geyser.inventory.Inventory
org.geysermc.geyser.inventory.Container
- Direct Known Subclasses:
AnvilContainer
,BeaconContainer
,CartographyContainer
,EnchantingContainer
,Generic3X3Container
,LecternContainer
,MerchantContainer
,StonecutterContainer
Combination of
Inventory
and PlayerInventory
-
Field Summary
Fields inherited from class org.geysermc.geyser.inventory.Inventory
containerType, holderId, holderPosition, id, items, size, title
-
Constructor Summary
ConstructorDescriptionContainer(String title, int id, int size, com.github.steveice10.mc.protocol.data.game.inventory.ContainerType containerType, PlayerInventory playerInventory)
-
Method Summary
Modifier and TypeMethodDescriptionint
getItem(int slot)
int
getSize()
boolean
Whether we are using a real block when opening this inventory.void
setItem(int slot, @NonNull GeyserItemStack newItem, GeyserSession session)
void
setUsingRealBlock(boolean usingRealBlock, String javaBlockId)
Will be overwritten for droppers.Methods inherited from class org.geysermc.geyser.inventory.Inventory
getContainerType, getHolderId, getHolderPosition, getId, getStateId, getTitle, isPending, setHolderId, setHolderPosition, setPending, setStateId, setTitle, toString, updateItemNetId
-
Constructor Details
-
Container
public Container(String title, int id, int size, com.github.steveice10.mc.protocol.data.game.inventory.ContainerType containerType, PlayerInventory playerInventory)
-
-
Method Details
-
getItem
-
setItem
-
getSize
public int getSize() -
setUsingRealBlock
Will be overwritten for droppers.- Parameters:
usingRealBlock
- whether this container is using a real container or notjavaBlockId
- the Java block string of the block, if real
-
getPlayerInventory
-
getContainerSize
public int getContainerSize() -
isUsingRealBlock
public boolean isUsingRealBlock()Whether we are using a real block when opening this inventory.
-