Class ChestedHorseInventoryTranslator
java.lang.Object
org.geysermc.geyser.translator.inventory.InventoryTranslator<Type>
org.geysermc.geyser.translator.inventory.BaseInventoryTranslator<Container>
org.geysermc.geyser.translator.inventory.horse.AbstractMountInventoryTranslator
org.geysermc.geyser.translator.inventory.horse.ChestedHorseInventoryTranslator
- Direct Known Subclasses:
DonkeyInventoryTranslator,LlamaInventoryTranslator
-
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.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 slotvoidupdateInventory(GeyserSession session, Container container) Updates the inventory by re-sending items for all slots of the inventory.Methods inherited from class org.geysermc.geyser.translator.inventory.horse.AbstractMountInventoryTranslator
closeInventory, openInventory, prepareInventory, updateSlotMethods inherited from class org.geysermc.geyser.translator.inventory.BaseInventoryTranslator
createInventory, getSlotType, 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
-
ChestedHorseInventoryTranslator
public ChestedHorseInventoryTranslator(int size, int equipSlot) - Parameters:
size- the total Java size of the inventoryequipSlot- the Java equipment slot. Java always has two slots - one for armor and one for saddle. Chested horses on Bedrock only acknowledge one slot.
-
-
Method Details
-
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>
-
javaSlotToBedrockContainer
Description copied from class:InventoryTranslatorConverts a Java slot to the corresponding Bedrock container and slot- Overrides:
javaSlotToBedrockContainerin 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>
-
updateInventory
Description copied from class:InventoryTranslatorUpdates the inventory by re-sending items for all slots of the inventory.- Overrides:
updateInventoryin classAbstractMountInventoryTranslator
-