Class AbstractBlockInventoryTranslator

Direct Known Subclasses:
AbstractFurnaceInventoryTranslator, AnvilInventoryTranslator, BeaconInventoryTranslator, BrewingInventoryTranslator, CartographyInventoryTranslator, CraftingInventoryTranslator, EnchantingInventoryTranslator, Generic3X3InventoryTranslator, GrindstoneInventoryTranslator, HopperInventoryTranslator, LoomInventoryTranslator, ShulkerInventoryTranslator, SmithingInventoryTranslator, StonecutterInventoryTranslator

public abstract class AbstractBlockInventoryTranslator extends BaseInventoryTranslator
Provided as a base for any inventory that requires a block for opening it
  • Constructor Details

    • AbstractBlockInventoryTranslator

      public AbstractBlockInventoryTranslator(int size, String javaBlockIdentifier, com.nukkitx.protocol.bedrock.data.inventory.ContainerType containerType, InventoryUpdater updater, String... additionalValidBlocks)
      Parameters:
      size - the amount of slots that the inventory adds alongside the base inventory slots
      javaBlockIdentifier - a Java block identifier that is used as a temporary block
      containerType - the container type of this inventory
      updater - updater
      additionalValidBlocks - any other block identifiers that can safely use this inventory without a fake block
    • AbstractBlockInventoryTranslator

      public AbstractBlockInventoryTranslator(int size, InventoryHolder holder, InventoryUpdater updater)
      Parameters:
      size - the amount of slots that the inventory adds alongside the base inventory slots
      holder - the custom block holder
      updater - updater
  • Method Details