Class CartographyInventoryTranslator
java.lang.Object
org.geysermc.geyser.translator.inventory.InventoryTranslator
org.geysermc.geyser.translator.inventory.BaseInventoryTranslator
org.geysermc.geyser.translator.inventory.AbstractBlockInventoryTranslator
org.geysermc.geyser.translator.inventory.CartographyInventoryTranslator
-
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)createInventory(String name, int windowId, com.github.steveice10.mc.protocol.data.game.inventory.ContainerType containerType, PlayerInventory playerInventory)intjavaSlotToBedrock(int slot)javaSlotToBedrockContainer(int slot)booleanshouldRejectItemPlace(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.Methods inherited from class org.geysermc.geyser.translator.inventory.AbstractBlockInventoryTranslator
closeInventory, openInventory, prepareInventory, updateInventory, updateSlotMethods inherited from class org.geysermc.geyser.translator.inventory.BaseInventoryTranslator
getSlotType, updatePropertyMethods inherited from class org.geysermc.geyser.translator.inventory.InventoryTranslator
acceptRequest, checkNetId, dumpStackRequestDetails, isCursor, makeContainerEntries, makeItemEntry, rejectRequest, rejectRequest, shouldHandleRequestFirst, translateAutoCraftingRequest, translateCraftingRequest, translateCreativeRequest, translateRequest, translateRequests, translateSpecialRequest
-
Constructor Details
-
CartographyInventoryTranslator
public CartographyInventoryTranslator()
-
-
Method Details
-
shouldRejectItemPlace
public 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)Description copied from class:InventoryTranslatorShould be overwritten in cases where specific inventories should reject an item being in a specific spot. For examples, looms use this to reject items that are dyes in Bedrock but not in Java. The source/destination slot will be -1 if the cursor is the slot- Overrides:
shouldRejectItemPlacein classInventoryTranslator- Returns:
- true if this transfer should be rejected
-
bedrockSlotToJava
public int bedrockSlotToJava(com.nukkitx.protocol.bedrock.data.inventory.StackRequestSlotInfoData slotInfoData)- Overrides:
bedrockSlotToJavain classBaseInventoryTranslator
-
javaSlotToBedrockContainer
- Overrides:
javaSlotToBedrockContainerin classBaseInventoryTranslator
-
javaSlotToBedrock
public int javaSlotToBedrock(int slot)- Overrides:
javaSlotToBedrockin classBaseInventoryTranslator
-
createInventory
public Inventory createInventory(String name, int windowId, com.github.steveice10.mc.protocol.data.game.inventory.ContainerType containerType, PlayerInventory playerInventory)- Overrides:
createInventoryin classBaseInventoryTranslator
-