Package org.geysermc.geyser.inventory
Class Inventory
java.lang.Object
org.geysermc.geyser.inventory.Inventory
- Direct Known Subclasses:
Container,PlayerInventory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.github.steveice10.mc.protocol.data.game.inventory.ContainerTypeUsed for smooth transitions between two windows of the same type.protected longprotected com.nukkitx.math.vector.Vector3iThe location of the inventory block.protected intprotected GeyserItemStack[]protected intprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetItem(int slot)voidincrementStateId(int count)SeeClickPlan.execute(boolean)for more details.voidvoidsetItem(int slot, @NonNull GeyserItemStack newItem, GeyserSession session)protected voidupdateItemNetId(GeyserItemStack oldItem, GeyserItemStack newItem, GeyserSession session)
-
Field Details
-
id
protected final int id -
size
protected final int size -
containerType
protected final com.github.steveice10.mc.protocol.data.game.inventory.ContainerType containerTypeUsed for smooth transitions between two windows of the same type. -
title
-
items
-
holderPosition
protected com.nukkitx.math.vector.Vector3i holderPositionThe location of the inventory block. Will either be a fake block above the player's head, or the actual block location -
holderId
protected long holderId
-
-
Constructor Details
-
Inventory
protected Inventory(int id, int size, com.github.steveice10.mc.protocol.data.game.inventory.ContainerType containerType) -
Inventory
protected Inventory(String title, int id, int size, com.github.steveice10.mc.protocol.data.game.inventory.ContainerType containerType)
-
-
Method Details
-
getItem
-
setItem
-
updateItemNetId
protected void updateItemNetId(GeyserItemStack oldItem, GeyserItemStack newItem, GeyserSession session) -
incrementStateId
public void incrementStateId(int count)SeeClickPlan.execute(boolean)for more details. -
resetNextStateId
public void resetNextStateId()
-