public abstract class AbstractBlockInventoryTranslator extends BaseInventoryTranslator
InventoryTranslator.CraftStateINVENTORY_TRANSLATORS, PLAYER_INVENTORY_OFFSET, PLAYER_INVENTORY_SIZE, PLAYER_INVENTORY_TRANSLATOR, size| Constructor and Description |
|---|
AbstractBlockInventoryTranslator(int size,
InventoryHolder holder,
InventoryUpdater updater) |
AbstractBlockInventoryTranslator(int size,
String javaBlockIdentifier,
com.nukkitx.protocol.bedrock.data.inventory.ContainerType containerType,
InventoryUpdater updater,
String... additionalValidBlocks) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeInventory(GeyserSession session,
Inventory inventory) |
void |
openInventory(GeyserSession session,
Inventory inventory) |
void |
prepareInventory(GeyserSession session,
Inventory inventory) |
void |
updateInventory(GeyserSession session,
Inventory inventory) |
void |
updateSlot(GeyserSession session,
Inventory inventory,
int slot) |
bedrockSlotToJava, createInventory, getSlotType, javaSlotToBedrock, javaSlotToBedrockContainer, updatePropertyacceptRequest, checkNetId, dumpStackRequestDetails, isCursor, makeContainerEntries, makeItemEntry, rejectRequest, rejectRequest, shouldHandleRequestFirst, shouldRejectItemPlace, translateAutoCraftingRequest, translateCraftingRequest, translateCreativeRequest, translateRequest, translateRequests, translateSpecialRequestpublic AbstractBlockInventoryTranslator(int size,
String javaBlockIdentifier,
com.nukkitx.protocol.bedrock.data.inventory.ContainerType containerType,
InventoryUpdater updater,
String... additionalValidBlocks)
size - the amount of slots that the inventory adds alongside the base inventory slotsjavaBlockIdentifier - a Java block identifier that is used as a temporary blockcontainerType - the container type of this inventoryupdater - updateradditionalValidBlocks - any other block identifiers that can safely use this inventory without a fake blockpublic AbstractBlockInventoryTranslator(int size,
InventoryHolder holder,
InventoryUpdater updater)
size - the amount of slots that the inventory adds alongside the base inventory slotsholder - the custom block holderupdater - updaterpublic void prepareInventory(GeyserSession session, Inventory inventory)
prepareInventory in class InventoryTranslatorpublic void openInventory(GeyserSession session, Inventory inventory)
openInventory in class InventoryTranslatorpublic void closeInventory(GeyserSession session, Inventory inventory)
closeInventory in class InventoryTranslatorpublic void updateInventory(GeyserSession session, Inventory inventory)
updateInventory in class InventoryTranslatorpublic void updateSlot(GeyserSession session, Inventory inventory, int slot)
updateSlot in class InventoryTranslatorCopyright © 2021 GeyserMC. All rights reserved.