Class EngineMenu

java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
de.luckymcdev.foundryengine.common.builder.menu.EngineMenu

public class EngineMenu extends net.minecraft.world.inventory.AbstractContainerMenu
A flexible, easily customizable AbstractContainerMenu.

Configure with builder(). Default layout matches a vanilla chest (container slots at (8, 18) with 18px spacing; player inventory below).

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
    static interface 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final int
     
    protected final net.minecraft.world.Container
     
    protected final int
     
    protected final int
     

    Fields inherited from class net.minecraft.world.inventory.AbstractContainerMenu

    CARRIED_SLOT_SIZE, containerId, QUICKCRAFT_HEADER_CONTINUE, QUICKCRAFT_HEADER_END, QUICKCRAFT_HEADER_START, QUICKCRAFT_TYPE_CHARITABLE, QUICKCRAFT_TYPE_CLONE, QUICKCRAFT_TYPE_GREEDY, SLOT_CLICKED_OUTSIDE, SLOT_SIZE, slots, SLOTS_PER_ROW
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    EngineMenu(@Nullable net.minecraft.world.inventory.MenuType<?> menuType, int containerId, net.minecraft.world.entity.player.Inventory playerInventory, EngineMenu.Builder builder)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addPlayerInventory(net.minecraft.world.entity.player.Inventory playerInventory, int startX, int startY)
    Adds the standard 3-row + hotbar player inventory block at the given origin.
     
    int
     
    net.minecraft.world.Container
     
    int
     
    int
     
    net.minecraft.world.item.ItemStack
    quickMoveStack(net.minecraft.world.entity.player.Player player, int index)
     
    boolean
    stillValid(net.minecraft.world.entity.player.Player player)
     

    Methods inherited from class net.minecraft.world.inventory.AbstractContainerMenu

    addDataSlot, addDataSlots, addInventoryExtendedSlots, addInventoryHotbarSlots, addSlot, addSlotListener, addStandardInventorySlots, broadcastChanges, broadcastFullState, canDragTo, canItemQuickReplace, canTakeItemForPickAll, checkContainerDataCount, checkContainerSize, clearContainer, clicked, clickMenuButton, findSlot, getCarried, getItems, getQuickcraftHeader, getQuickcraftMask, getQuickCraftPlaceCount, getQuickcraftType, getRedstoneSignalFromBlockEntity, getRedstoneSignalFromContainer, getSlot, getStateId, getType, incrementStateId, initializeContents, isValidQuickcraftType, isValidSlotIndex, moveItemStackTo, removed, removeSlotListener, resetQuickCraft, resumeRemoteUpdates, sendAllDataToRemote, setCarried, setData, setItem, setRemoteCarried, setRemoteSlot, setRemoteSlotUnsafe, setSelectedBundleItemIndex, setSynchronizer, slotsChanged, stillValid, suppressRemoteUpdates, transferState

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • container

      protected final net.minecraft.world.Container container
    • rows

      protected final int rows
    • columns

      protected final int columns
    • containerSlotCount

      protected final int containerSlotCount
  • Constructor Details

    • EngineMenu

      protected EngineMenu(@Nullable @Nullable net.minecraft.world.inventory.MenuType<?> menuType, int containerId, net.minecraft.world.entity.player.Inventory playerInventory, EngineMenu.Builder builder)
  • Method Details

    • builder

      public static EngineMenu.Builder builder()
    • getContainer

      public net.minecraft.world.Container getContainer()
    • getRows

      public int getRows()
    • getColumns

      public int getColumns()
    • getContainerSlotCount

      public int getContainerSlotCount()
    • addPlayerInventory

      protected void addPlayerInventory(net.minecraft.world.entity.player.Inventory playerInventory, int startX, int startY)
      Adds the standard 3-row + hotbar player inventory block at the given origin.
    • stillValid

      public boolean stillValid(net.minecraft.world.entity.player.Player player)
      Specified by:
      stillValid in class net.minecraft.world.inventory.AbstractContainerMenu
    • quickMoveStack

      public net.minecraft.world.item.ItemStack quickMoveStack(net.minecraft.world.entity.player.Player player, int index)
      Specified by:
      quickMoveStack in class net.minecraft.world.inventory.AbstractContainerMenu