Class CartographyInventoryTranslator


public class CartographyInventoryTranslator extends AbstractBlockInventoryTranslator
  • Constructor Details

    • CartographyInventoryTranslator

      public CartographyInventoryTranslator()
  • Method Details

    • shouldRejectItemPlace

      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)
      Description copied from class: InventoryTranslator
      Should be overwritten in cases where specific inventories should reject an item being in a specific spot. For examples, looms use this to reject items that are dyes in Bedrock but not in Java. The source/destination slot will be -1 if the cursor is the slot
      Overrides:
      shouldRejectItemPlace in class InventoryTranslator
      Returns:
      true if this transfer should be rejected
    • bedrockSlotToJava

      public int bedrockSlotToJava(com.nukkitx.protocol.bedrock.data.inventory.StackRequestSlotInfoData slotInfoData)
      Overrides:
      bedrockSlotToJava in class BaseInventoryTranslator
    • javaSlotToBedrockContainer

      public BedrockContainerSlot javaSlotToBedrockContainer(int slot)
      Overrides:
      javaSlotToBedrockContainer in class BaseInventoryTranslator
    • javaSlotToBedrock

      public int javaSlotToBedrock(int slot)
      Overrides:
      javaSlotToBedrock in class BaseInventoryTranslator
    • createInventory

      public Inventory createInventory(String name, int windowId, com.github.steveice10.mc.protocol.data.game.inventory.ContainerType containerType, PlayerInventory playerInventory)
      Overrides:
      createInventory in class BaseInventoryTranslator