Class AbstractMountInventoryTranslator
java.lang.Object
org.geysermc.geyser.translator.inventory.InventoryTranslator<Type>
org.geysermc.geyser.translator.inventory.BaseInventoryTranslator<Container>
org.geysermc.geyser.translator.inventory.horse.AbstractMountInventoryTranslator
- Direct Known Subclasses:
ChestedHorseInventoryTranslator,MountInventoryTranslator
-
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 TypeMethodDescriptionvoidcloseInventory(GeyserSession session, Container container, boolean force) Closes the inventory, and if necessary, cleans up the prepared inventory.voidopenInventory(GeyserSession session, Container container) Opens the previously prepared inventory.booleanprepareInventory(GeyserSession session, Container container) Prepares the inventory before opening it.voidupdateInventory(GeyserSession session, Container container) Updates the inventory by re-sending items for all slots of the inventory.voidupdateSlot(GeyserSession session, Container container, int slot) Updates a specific slot by re-sending the item.Methods inherited from class org.geysermc.geyser.translator.inventory.BaseInventoryTranslator
bedrockSlotToJava, createInventory, getSlotType, javaSlotToBedrock, javaSlotToBedrockContainer, updatePropertyMethods inherited from class org.geysermc.geyser.translator.inventory.InventoryTranslator
acceptRequest, canReuseInventory, checkNetId, dumpStackRequestDetails, getGridSize, inventoryTranslator, isCursor, makeContainerEntries, rejectRequest, rejectRequest, requiresOpeningDelay, shouldHandleRequestFirst, shouldRejectItemPlace, translateAutoCraftingRequest, translateCraftingRequest, translateCreativeRequest, translateRequest, translateRequests, translateSpecialRequest
-
Constructor Details
-
AbstractMountInventoryTranslator
public AbstractMountInventoryTranslator(int size)
-
-
Method Details
-
prepareInventory
Description copied from class:InventoryTranslatorPrepares the inventory before opening it. Bedrock requires the inventory to "exist" before opening it - that can be either a real block (e.g. chest), or an entity (e.g. horse)- Specified by:
prepareInventoryin classInventoryTranslator<Container>- Returns:
- whether the inventory was successfully prepared
-
openInventory
Description copied from class:InventoryTranslatorOpens the previously prepared inventory.- Specified by:
openInventoryin classInventoryTranslator<Container>
-
closeInventory
Description copied from class:InventoryTranslatorCloses the inventory, and if necessary, cleans up the prepared inventory.- Specified by:
closeInventoryin classInventoryTranslator<Container>
-
updateInventory
Description copied from class:InventoryTranslatorUpdates the inventory by re-sending items for all slots of the inventory.- Specified by:
updateInventoryin classInventoryTranslator<Container>
-
updateSlot
Description copied from class:InventoryTranslatorUpdates a specific slot by re-sending the item.- Specified by:
updateSlotin classInventoryTranslator<Container>
-