public class LoomInventoryTranslator extends AbstractBlockInventoryTranslator
InventoryTranslator.CraftStateINVENTORY_TRANSLATORS, PLAYER_INVENTORY_OFFSET, PLAYER_INVENTORY_SIZE, PLAYER_INVENTORY_TRANSLATOR, size| Constructor and Description |
|---|
LoomInventoryTranslator() |
| Modifier and Type | Method and Description |
|---|---|
int |
bedrockSlotToJava(com.nukkitx.protocol.bedrock.data.inventory.StackRequestSlotInfoData slotInfoData) |
SlotType |
getSlotType(int javaSlot) |
int |
javaSlotToBedrock(int slot) |
BedrockContainerSlot |
javaSlotToBedrockContainer(int slot) |
boolean |
shouldHandleRequestFirst(com.nukkitx.protocol.bedrock.data.inventory.stackrequestactions.StackRequestActionData action,
Inventory inventory)
Should be overrided if this request matches a certain criteria and shouldn't be treated normally.
|
boolean |
shouldRejectItemPlace(GeyserSession session,
Inventory inventory,
com.nukkitx.protocol.bedrock.data.inventory.ContainerSlotType bedrockSourceContainer,
int javaSourceSlot,
com.nukkitx.protocol.bedrock.data.inventory.ContainerSlotType bedrockDestinationContainer,
int javaDestinationSlot)
Should be overwritten in cases where specific inventories should reject an item being in a specific spot.
|
com.nukkitx.protocol.bedrock.packet.ItemStackResponsePacket.Response |
translateSpecialRequest(GeyserSession session,
Inventory inventory,
com.nukkitx.protocol.bedrock.data.inventory.ItemStackRequest request)
If
InventoryTranslator.shouldHandleRequestFirst(StackRequestActionData, Inventory) returns true, this will be called |
closeInventory, openInventory, prepareInventory, updateInventory, updateSlotcreateInventory, updatePropertyacceptRequest, checkNetId, dumpStackRequestDetails, isCursor, makeContainerEntries, makeItemEntry, rejectRequest, rejectRequest, translateAutoCraftingRequest, translateCraftingRequest, translateCreativeRequest, translateRequest, translateRequestspublic boolean shouldRejectItemPlace(GeyserSession session, Inventory inventory, com.nukkitx.protocol.bedrock.data.inventory.ContainerSlotType bedrockSourceContainer, int javaSourceSlot, com.nukkitx.protocol.bedrock.data.inventory.ContainerSlotType bedrockDestinationContainer, int javaDestinationSlot)
InventoryTranslatorshouldRejectItemPlace in class InventoryTranslatorpublic boolean shouldHandleRequestFirst(com.nukkitx.protocol.bedrock.data.inventory.stackrequestactions.StackRequestActionData action,
Inventory inventory)
InventoryTranslatorshouldHandleRequestFirst in class InventoryTranslatorpublic com.nukkitx.protocol.bedrock.packet.ItemStackResponsePacket.Response translateSpecialRequest(GeyserSession session, Inventory inventory, com.nukkitx.protocol.bedrock.data.inventory.ItemStackRequest request)
InventoryTranslatorInventoryTranslator.shouldHandleRequestFirst(StackRequestActionData, Inventory) returns true, this will be calledtranslateSpecialRequest in class InventoryTranslatorpublic int bedrockSlotToJava(com.nukkitx.protocol.bedrock.data.inventory.StackRequestSlotInfoData slotInfoData)
bedrockSlotToJava in class BaseInventoryTranslatorpublic BedrockContainerSlot javaSlotToBedrockContainer(int slot)
javaSlotToBedrockContainer in class BaseInventoryTranslatorpublic int javaSlotToBedrock(int slot)
javaSlotToBedrock in class BaseInventoryTranslatorpublic SlotType getSlotType(int javaSlot)
getSlotType in class BaseInventoryTranslatorCopyright © 2021 GeyserMC. All rights reserved.