Class PlayerInventoryTranslator
java.lang.Object
org.geysermc.geyser.translator.inventory.InventoryTranslator
org.geysermc.geyser.translator.inventory.PlayerInventoryTranslator
-
Nested Class Summary
Nested classes/interfaces inherited from class org.geysermc.geyser.translator.inventory.InventoryTranslator
InventoryTranslator.CraftState -
Field Summary
Fields inherited from class org.geysermc.geyser.translator.inventory.InventoryTranslator
INVENTORY_TRANSLATORS, PLAYER_INVENTORY_OFFSET, PLAYER_INVENTORY_SIZE, PLAYER_INVENTORY_TRANSLATOR, size -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbedrockSlotToJava(com.nukkitx.protocol.bedrock.data.inventory.StackRequestSlotInfoData slotInfoData)voidcloseInventory(GeyserSession session, Inventory inventory)createInventory(String name, int windowId, com.github.steveice10.mc.protocol.data.game.inventory.ContainerType containerType, PlayerInventory playerInventory)getSlotType(int javaSlot)intjavaSlotToBedrock(int slot)javaSlotToBedrockContainer(int slot)voidopenInventory(GeyserSession session, Inventory inventory)voidprepareInventory(GeyserSession session, Inventory inventory)com.nukkitx.protocol.bedrock.packet.ItemStackResponsePacket.ResponsetranslateCreativeRequest(GeyserSession session, Inventory inventory, com.nukkitx.protocol.bedrock.data.inventory.ItemStackRequest request)Handled inPlayerInventoryTranslatorcom.nukkitx.protocol.bedrock.packet.ItemStackResponsePacket.ResponsetranslateRequest(GeyserSession session, Inventory inventory, com.nukkitx.protocol.bedrock.data.inventory.ItemStackRequest request)static voidupdateCraftingGrid(GeyserSession session, Inventory inventory)Update the crafting grid for the player to hide/show the barriers in the creative inventoryvoidupdateInventory(GeyserSession session, Inventory inventory)voidupdateProperty(GeyserSession session, Inventory inventory, int key, int value)voidupdateSlot(GeyserSession session, Inventory inventory, int slot)Methods inherited from class org.geysermc.geyser.translator.inventory.InventoryTranslator
acceptRequest, checkNetId, dumpStackRequestDetails, isCursor, makeContainerEntries, makeItemEntry, rejectRequest, rejectRequest, shouldHandleRequestFirst, shouldRejectItemPlace, translateAutoCraftingRequest, translateCraftingRequest, translateRequests, translateSpecialRequest
-
Constructor Details
-
PlayerInventoryTranslator
public PlayerInventoryTranslator()
-
-
Method Details
-
updateInventory
- Specified by:
updateInventoryin classInventoryTranslator
-
updateCraftingGrid
Update the crafting grid for the player to hide/show the barriers in the creative inventory- Parameters:
session- Connection of the playerinventory- Inventory of the player
-
updateSlot
- Specified by:
updateSlotin classInventoryTranslator
-
bedrockSlotToJava
public int bedrockSlotToJava(com.nukkitx.protocol.bedrock.data.inventory.StackRequestSlotInfoData slotInfoData)- Specified by:
bedrockSlotToJavain classInventoryTranslator
-
javaSlotToBedrock
public int javaSlotToBedrock(int slot)- Specified by:
javaSlotToBedrockin classInventoryTranslator
-
javaSlotToBedrockContainer
- Specified by:
javaSlotToBedrockContainerin classInventoryTranslator
-
getSlotType
- Specified by:
getSlotTypein classInventoryTranslator
-
translateRequest
public com.nukkitx.protocol.bedrock.packet.ItemStackResponsePacket.Response translateRequest(GeyserSession session, Inventory inventory, com.nukkitx.protocol.bedrock.data.inventory.ItemStackRequest request)- Overrides:
translateRequestin classInventoryTranslator
-
translateCreativeRequest
public com.nukkitx.protocol.bedrock.packet.ItemStackResponsePacket.Response translateCreativeRequest(GeyserSession session, Inventory inventory, com.nukkitx.protocol.bedrock.data.inventory.ItemStackRequest request)Description copied from class:InventoryTranslatorHandled inPlayerInventoryTranslator- Overrides:
translateCreativeRequestin classInventoryTranslator
-
createInventory
public Inventory createInventory(String name, int windowId, com.github.steveice10.mc.protocol.data.game.inventory.ContainerType containerType, PlayerInventory playerInventory)- Specified by:
createInventoryin classInventoryTranslator
-
prepareInventory
- Specified by:
prepareInventoryin classInventoryTranslator
-
openInventory
- Specified by:
openInventoryin classInventoryTranslator
-
closeInventory
- Specified by:
closeInventoryin classInventoryTranslator
-
updateProperty
- Specified by:
updatePropertyin classInventoryTranslator
-