Class BeaconInventoryTranslator
java.lang.Object
org.geysermc.geyser.translator.inventory.InventoryTranslator<BeaconContainer>
org.geysermc.geyser.translator.inventory.BaseInventoryTranslator<BeaconContainer>
org.geysermc.geyser.translator.inventory.AbstractBlockInventoryTranslator<BeaconContainer>
org.geysermc.geyser.translator.inventory.BeaconInventoryTranslator
-
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(BeaconContainer container) createInventory(GeyserSession session, String name, int windowId, org.geysermc.mcprotocollib.protocol.data.game.inventory.ContainerType containerType) Creates a new inventory.intjavaSlotToBedrock(int slot) Converts a Java slot to the corresponding Bedrock slot.javaSlotToBedrockContainer(int slot, BeaconContainer container) Converts a Java slot to the corresponding Bedrock container and slotprotected booleanshouldHandleRequestFirst(org.cloudburstmc.protocol.bedrock.data.inventory.itemstack.request.action.ItemStackRequestAction action, BeaconContainer container) Should be overrided if this request matches a certain criteria and shouldn't be treated normally.org.cloudburstmc.protocol.bedrock.data.inventory.itemstack.response.ItemStackResponsetranslateSpecialRequest(GeyserSession session, BeaconContainer container, org.cloudburstmc.protocol.bedrock.data.inventory.itemstack.request.ItemStackRequest request) IfInventoryTranslator.shouldHandleRequestFirst(ItemStackRequestAction, Inventory)returns true, this will be calledvoidupdateProperty(GeyserSession session, BeaconContainer container, int key, int value) Updates a property in the inventory.Methods 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
getSlotTypeMethods inherited from class org.geysermc.geyser.translator.inventory.InventoryTranslator
acceptRequest, checkNetId, dumpStackRequestDetails, getGridSize, inventoryTranslator, isCursor, makeContainerEntries, rejectRequest, rejectRequest, shouldRejectItemPlace, translateAutoCraftingRequest, translateCraftingRequest, translateCreativeRequest, translateRequest, translateRequests
-
Constructor Details
-
BeaconInventoryTranslator
public BeaconInventoryTranslator()
-
-
Method Details
-
updateProperty
Description copied from class:InventoryTranslatorUpdates a property in the inventory.- Overrides:
updatePropertyin classBaseInventoryTranslator<BeaconContainer>
-
shouldHandleRequestFirst
protected boolean shouldHandleRequestFirst(org.cloudburstmc.protocol.bedrock.data.inventory.itemstack.request.action.ItemStackRequestAction action, BeaconContainer container) Description copied from class:InventoryTranslatorShould be overrided if this request matches a certain criteria and shouldn't be treated normally. E.G. anvil renaming or enchanting- Overrides:
shouldHandleRequestFirstin classInventoryTranslator<BeaconContainer>
-
translateSpecialRequest
public org.cloudburstmc.protocol.bedrock.data.inventory.itemstack.response.ItemStackResponse translateSpecialRequest(GeyserSession session, BeaconContainer container, org.cloudburstmc.protocol.bedrock.data.inventory.itemstack.request.ItemStackRequest request) Description copied from class:InventoryTranslatorIfInventoryTranslator.shouldHandleRequestFirst(ItemStackRequestAction, Inventory)returns true, this will be called- Overrides:
translateSpecialRequestin classInventoryTranslator<BeaconContainer>
-
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<BeaconContainer>
-
javaSlotToBedrockContainer
Description copied from class:InventoryTranslatorConverts a Java slot to the corresponding Bedrock container and slot- Overrides:
javaSlotToBedrockContainerin classBaseInventoryTranslator<BeaconContainer>
-
javaSlotToBedrock
public int javaSlotToBedrock(int slot) Description copied from class:InventoryTranslatorConverts a Java slot to the corresponding Bedrock slot.- Overrides:
javaSlotToBedrockin classBaseInventoryTranslator<BeaconContainer>
-
createInventory
public BeaconContainer createInventory(GeyserSession session, String name, int windowId, org.geysermc.mcprotocollib.protocol.data.game.inventory.ContainerType containerType) Description copied from class:InventoryTranslatorCreates a new inventory.- Overrides:
createInventoryin classBaseInventoryTranslator<BeaconContainer>
-
closeContainerType
public org.cloudburstmc.protocol.bedrock.data.inventory.ContainerType closeContainerType(BeaconContainer container) - Specified by:
closeContainerTypein classAbstractBlockInventoryTranslator<BeaconContainer>
-