Class ItemCombinerMenu

java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
net.minecraft.world.inventory.ItemCombinerMenu
Direct Known Subclasses:
AnvilMenu, SmithingMenu

public abstract class ItemCombinerMenu extends AbstractContainerMenu
  • Field Details

    • INVENTORY_SLOTS_PER_ROW

      private static final int INVENTORY_SLOTS_PER_ROW
      See Also:
    • INVENTORY_SLOTS_PER_COLUMN

      private static final int INVENTORY_SLOTS_PER_COLUMN
      See Also:
    • access

      protected final ContainerLevelAccess access
    • player

      protected final Player player
    • inputSlots

      protected final Container inputSlots
    • inputSlotIndexes

      private final List<Integer> inputSlotIndexes
    • resultSlots

      protected final ResultContainer resultSlots
    • resultSlotIndex

      private final int resultSlotIndex
  • Constructor Details

  • Method Details

    • mayPickup

      protected abstract boolean mayPickup(Player pPlayer, boolean pHasStack)
    • onTake

      protected abstract void onTake(Player pPlayer, ItemStack pStack)
    • isValidBlock

      protected abstract boolean isValidBlock(BlockState pState)
    • createInputSlots

      private void createInputSlots(ItemCombinerMenuSlotDefinition pSlotDefinition)
    • createResultSlot

      private void createResultSlot(ItemCombinerMenuSlotDefinition pSlotDefinition)
    • createInventorySlots

      private void createInventorySlots(Inventory pInventory)
    • createResult

      public abstract void createResult()
    • createInputSlotDefinitions

      protected abstract ItemCombinerMenuSlotDefinition createInputSlotDefinitions()
    • createContainer

      private SimpleContainer createContainer(int pSize)
    • slotsChanged

      public void slotsChanged(Container pInventory)
      Callback for when the crafting matrix is changed.
      Overrides:
      slotsChanged in class AbstractContainerMenu
    • removed

      public void removed(Player pPlayer)
      Called when the container is closed.
      Overrides:
      removed in class AbstractContainerMenu
    • stillValid

      public boolean stillValid(Player pPlayer)
      Determines whether supplied player can use this container
      Specified by:
      stillValid in class AbstractContainerMenu
    • quickMoveStack

      public ItemStack quickMoveStack(Player pPlayer, int pIndex)
      Handle when the stack in slot index is shift-clicked. Normally this moves the stack between the player inventory and the other inventory(s).
      Specified by:
      quickMoveStack in class AbstractContainerMenu
    • canMoveIntoInputSlots

      protected boolean canMoveIntoInputSlots(ItemStack pStack)
    • getSlotToQuickMoveTo

      public int getSlotToQuickMoveTo(ItemStack pStack)
    • getResultSlot

      public int getResultSlot()
    • getInventorySlotStart

      private int getInventorySlotStart()
    • getInventorySlotEnd

      private int getInventorySlotEnd()
    • getUseRowStart

      private int getUseRowStart()
    • getUseRowEnd

      private int getUseRowEnd()