public abstract class ChestInventoryTranslator extends BaseInventoryTranslator
InventoryTranslator.CraftStateINVENTORY_TRANSLATORS, PLAYER_INVENTORY_OFFSET, PLAYER_INVENTORY_SIZE, PLAYER_INVENTORY_TRANSLATOR, size| Constructor and Description |
|---|
ChestInventoryTranslator(int size,
int paddedSize) |
| Modifier and Type | Method and Description |
|---|---|
BedrockContainerSlot |
javaSlotToBedrockContainer(int javaSlot) |
boolean |
shouldRejectItemPlace(GeyserSession session,
Inventory inventory,
com.nukkitx.protocol.bedrock.data.inventory.ContainerSlotType bedrockSourceContainer,
int javaSourceSlot,
com.nukkitx.protocol.bedrock.data.inventory.ContainerSlotType bedrockDestinationContainer,
int javaDestinationSlot)
Should be overwritten in cases where specific inventories should reject an item being in a specific spot.
|
void |
updateInventory(GeyserSession session,
Inventory inventory) |
void |
updateSlot(GeyserSession session,
Inventory inventory,
int slot) |
bedrockSlotToJava, createInventory, getSlotType, javaSlotToBedrock, updatePropertyacceptRequest, checkNetId, closeInventory, dumpStackRequestDetails, isCursor, makeContainerEntries, makeItemEntry, openInventory, prepareInventory, rejectRequest, rejectRequest, shouldHandleRequestFirst, translateAutoCraftingRequest, translateCraftingRequest, translateCreativeRequest, translateRequest, translateRequests, translateSpecialRequestpublic ChestInventoryTranslator(int size,
int paddedSize)
public boolean shouldRejectItemPlace(GeyserSession session, Inventory inventory, com.nukkitx.protocol.bedrock.data.inventory.ContainerSlotType bedrockSourceContainer, int javaSourceSlot, com.nukkitx.protocol.bedrock.data.inventory.ContainerSlotType bedrockDestinationContainer, int javaDestinationSlot)
InventoryTranslatorshouldRejectItemPlace in class InventoryTranslatorpublic void updateInventory(GeyserSession session, Inventory inventory)
updateInventory in class InventoryTranslatorpublic void updateSlot(GeyserSession session, Inventory inventory, int slot)
updateSlot in class InventoryTranslatorpublic BedrockContainerSlot javaSlotToBedrockContainer(int javaSlot)
javaSlotToBedrockContainer in class BaseInventoryTranslatorCopyright © 2021 GeyserMC. All rights reserved.