Class CraftingInventoryTranslator
java.lang.Object
org.geysermc.geyser.translator.inventory.InventoryTranslator<Type>
org.geysermc.geyser.translator.inventory.BaseInventoryTranslator<Type>
org.geysermc.geyser.translator.inventory.AbstractBlockInventoryTranslator<Container>
org.geysermc.geyser.translator.inventory.CraftingInventoryTranslator
-
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) Converts the Bedrock slot to the corresponding Java slot.org.cloudburstmc.protocol.bedrock.data.inventory.ContainerTypecloseContainerType(Container container) intUsed for crafting-related transactions.getSlotType(int javaSlot) Returns the slot type for a Java slot idstatic booleanisCraftingGrid(int slot) intjavaSlotToBedrock(int slot) Converts a Java slot to the corresponding Bedrock slot.javaSlotToBedrockContainer(int slot, Container container) Converts a Java slot to the corresponding Bedrock container and slotMethods inherited from class org.geysermc.geyser.translator.inventory.AbstractBlockInventoryTranslator
canReuseInventory, closeInventory, openInventory, prepareInventory, requiresOpeningDelay, updateInventory, updateSlotMethods inherited from class org.geysermc.geyser.translator.inventory.BaseInventoryTranslator
createInventory, updatePropertyMethods inherited from class org.geysermc.geyser.translator.inventory.InventoryTranslator
acceptRequest, checkNetId, dumpStackRequestDetails, inventoryTranslator, isCursor, makeContainerEntries, rejectRequest, rejectRequest, shouldHandleRequestFirst, shouldRejectItemPlace, translateAutoCraftingRequest, translateCraftingRequest, translateCreativeRequest, translateRequest, translateRequests, translateSpecialRequest
-
Constructor Details
-
CraftingInventoryTranslator
public CraftingInventoryTranslator()
-
-
Method Details
-
getGridSize
public int getGridSize()Description copied from class:InventoryTranslatorUsed for crafting-related transactions. Will override in PlayerInventoryTranslator and CraftingInventoryTranslator.- Overrides:
getGridSizein classInventoryTranslator<Container>
-
getSlotType
Description copied from class:InventoryTranslatorReturns the slot type for a Java slot id- Overrides:
getSlotTypein classBaseInventoryTranslator<Container>
-
javaSlotToBedrockContainer
Description copied from class:InventoryTranslatorConverts a Java slot to the corresponding Bedrock container and slot- Overrides:
javaSlotToBedrockContainerin classBaseInventoryTranslator<Container>
-
bedrockSlotToJava
public int bedrockSlotToJava(org.cloudburstmc.protocol.bedrock.data.inventory.itemstack.request.ItemStackRequestSlotData slotInfoData) Description copied from class:InventoryTranslatorConverts the Bedrock slot to the corresponding Java slot.- Overrides:
bedrockSlotToJavain classBaseInventoryTranslator<Container>
-
javaSlotToBedrock
public int javaSlotToBedrock(int slot) Description copied from class:InventoryTranslatorConverts a Java slot to the corresponding Bedrock slot.- Overrides:
javaSlotToBedrockin classBaseInventoryTranslator<Container>
-
isCraftingGrid
public static boolean isCraftingGrid(int slot) -
closeContainerType
public org.cloudburstmc.protocol.bedrock.data.inventory.ContainerType closeContainerType(Container container) - Specified by:
closeContainerTypein classAbstractBlockInventoryTranslator<Container>
-