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
PLAYER_INVENTORY_OFFSET, PLAYER_INVENTORY_SIZE, PLAYER_INVENTORY_TRANSLATOR, size -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbedrockSlotToJava(org.cloudburstmc.protocol.bedrock.data.inventory.itemstack.request.ItemStackRequestSlotData slotInfoData) voidcloseInventory(GeyserSession session, Inventory inventory) createInventory(String name, int windowId, org.geysermc.mcprotocollib.protocol.data.game.inventory.ContainerType containerType, PlayerInventory playerInventory) intUsed for crafting-related transactions.getSlotType(int javaSlot) intjavaSlotToBedrock(int slot) javaSlotToBedrockContainer(int slot) voidopenInventory(GeyserSession session, Inventory inventory) booleanprepareInventory(GeyserSession session, Inventory inventory) protected org.cloudburstmc.protocol.bedrock.data.inventory.itemstack.response.ItemStackResponsetranslateCreativeRequest(GeyserSession session, Inventory inventory, org.cloudburstmc.protocol.bedrock.data.inventory.itemstack.request.ItemStackRequest request) Handled inPlayerInventoryTranslatororg.cloudburstmc.protocol.bedrock.data.inventory.itemstack.response.ItemStackResponsetranslateRequest(GeyserSession session, Inventory inventory, org.cloudburstmc.protocol.bedrock.data.inventory.itemstack.request.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, inventoryTranslator, isCursor, makeContainerEntries, rejectRequest, rejectRequest, shouldHandleRequestFirst, shouldRejectItemPlace, translateAutoCraftingRequest, translateCraftingRequest, translateRequests, translateSpecialRequest
-
Constructor Details
-
PlayerInventoryTranslator
public PlayerInventoryTranslator()
-
-
Method Details
-
getGridSize
public int getGridSize()Description copied from class:InventoryTranslatorUsed for crafting-related transactions. Will override in PlayerInventoryTranslator and CraftingInventoryTranslator.- Overrides:
getGridSizein classInventoryTranslator
-
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(org.cloudburstmc.protocol.bedrock.data.inventory.itemstack.request.ItemStackRequestSlotData 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 org.cloudburstmc.protocol.bedrock.data.inventory.itemstack.response.ItemStackResponse translateRequest(GeyserSession session, Inventory inventory, org.cloudburstmc.protocol.bedrock.data.inventory.itemstack.request.ItemStackRequest request) - Overrides:
translateRequestin classInventoryTranslator
-
translateCreativeRequest
protected org.cloudburstmc.protocol.bedrock.data.inventory.itemstack.response.ItemStackResponse translateCreativeRequest(GeyserSession session, Inventory inventory, org.cloudburstmc.protocol.bedrock.data.inventory.itemstack.request.ItemStackRequest request) Description copied from class:InventoryTranslatorHandled inPlayerInventoryTranslator- Overrides:
translateCreativeRequestin classInventoryTranslator
-
createInventory
public Inventory createInventory(String name, int windowId, org.geysermc.mcprotocollib.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
-