public class PlayerInventoryTranslator extends InventoryTranslator
InventoryTranslator.CraftStateINVENTORY_TRANSLATORS, PLAYER_INVENTORY_OFFSET, PLAYER_INVENTORY_SIZE, PLAYER_INVENTORY_TRANSLATOR, size| Constructor and Description |
|---|
PlayerInventoryTranslator() |
| Modifier and Type | Method and Description |
|---|---|
int |
bedrockSlotToJava(com.nukkitx.protocol.bedrock.data.inventory.StackRequestSlotInfoData slotInfoData) |
void |
closeInventory(GeyserSession session,
Inventory inventory) |
Inventory |
createInventory(String name,
int windowId,
com.github.steveice10.mc.protocol.data.game.window.WindowType windowType,
PlayerInventory playerInventory) |
SlotType |
getSlotType(int javaSlot) |
int |
javaSlotToBedrock(int slot) |
BedrockContainerSlot |
javaSlotToBedrockContainer(int slot) |
void |
openInventory(GeyserSession session,
Inventory inventory) |
void |
prepareInventory(GeyserSession session,
Inventory inventory) |
com.nukkitx.protocol.bedrock.packet.ItemStackResponsePacket.Response |
translateCreativeRequest(GeyserSession session,
Inventory inventory,
com.nukkitx.protocol.bedrock.data.inventory.ItemStackRequest request)
Handled in
PlayerInventoryTranslator |
com.nukkitx.protocol.bedrock.packet.ItemStackResponsePacket.Response |
translateRequest(GeyserSession session,
Inventory inventory,
com.nukkitx.protocol.bedrock.data.inventory.ItemStackRequest request) |
static void |
updateCraftingGrid(GeyserSession session,
Inventory inventory)
Update the crafting grid for the player to hide/show the barriers in the creative inventory
|
void |
updateInventory(GeyserSession session,
Inventory inventory) |
void |
updateProperty(GeyserSession session,
Inventory inventory,
int key,
int value) |
void |
updateSlot(GeyserSession session,
Inventory inventory,
int slot) |
acceptRequest, checkNetId, dumpStackRequestDetails, isCursor, makeContainerEntries, makeItemEntry, rejectRequest, rejectRequest, shouldHandleRequestFirst, shouldRejectItemPlace, translateAutoCraftingRequest, translateCraftingRequest, translateRequests, translateSpecialRequestpublic void updateInventory(GeyserSession session, Inventory inventory)
updateInventory in class InventoryTranslatorpublic static void updateCraftingGrid(GeyserSession session, Inventory inventory)
session - Session of the playerinventory - Inventory of the playerpublic void updateSlot(GeyserSession session, Inventory inventory, int slot)
updateSlot in class InventoryTranslatorpublic int bedrockSlotToJava(com.nukkitx.protocol.bedrock.data.inventory.StackRequestSlotInfoData slotInfoData)
bedrockSlotToJava in class InventoryTranslatorpublic int javaSlotToBedrock(int slot)
javaSlotToBedrock in class InventoryTranslatorpublic BedrockContainerSlot javaSlotToBedrockContainer(int slot)
javaSlotToBedrockContainer in class InventoryTranslatorpublic SlotType getSlotType(int javaSlot)
getSlotType in class InventoryTranslatorpublic com.nukkitx.protocol.bedrock.packet.ItemStackResponsePacket.Response translateRequest(GeyserSession session, Inventory inventory, com.nukkitx.protocol.bedrock.data.inventory.ItemStackRequest request)
translateRequest in class InventoryTranslatorpublic com.nukkitx.protocol.bedrock.packet.ItemStackResponsePacket.Response translateCreativeRequest(GeyserSession session, Inventory inventory, com.nukkitx.protocol.bedrock.data.inventory.ItemStackRequest request)
InventoryTranslatorPlayerInventoryTranslatortranslateCreativeRequest in class InventoryTranslatorpublic Inventory createInventory(String name, int windowId, com.github.steveice10.mc.protocol.data.game.window.WindowType windowType, PlayerInventory playerInventory)
createInventory in class InventoryTranslatorpublic void prepareInventory(GeyserSession session, Inventory inventory)
prepareInventory in class InventoryTranslatorpublic void openInventory(GeyserSession session, Inventory inventory)
openInventory in class InventoryTranslatorpublic void closeInventory(GeyserSession session, Inventory inventory)
closeInventory in class InventoryTranslatorpublic void updateProperty(GeyserSession session, Inventory inventory, int key, int value)
updateProperty in class InventoryTranslatorCopyright © 2021 GeyserMC. All rights reserved.