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 ClassesModifier and TypeClassDescriptionstatic classstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected final net.minecraft.world.Containerprotected final intprotected final intFields 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
ConstructorsModifierConstructorDescriptionprotectedEngineMenu(@Nullable net.minecraft.world.inventory.MenuType<?> menuType, int containerId, net.minecraft.world.entity.player.Inventory playerInventory, EngineMenu.Builder builder) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddPlayerInventory(net.minecraft.world.entity.player.Inventory playerInventory, int startX, int startY) Adds the standard 3-row + hotbar player inventory block at the given origin.static EngineMenu.Builderbuilder()intnet.minecraft.world.ContainerintintgetRows()net.minecraft.world.item.ItemStackquickMoveStack(net.minecraft.world.entity.player.Player player, int index) booleanstillValid(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
-
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
-
Method Details
-
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:
stillValidin classnet.minecraft.world.inventory.AbstractContainerMenu
-
quickMoveStack
public net.minecraft.world.item.ItemStack quickMoveStack(net.minecraft.world.entity.player.Player player, int index) - Specified by:
quickMoveStackin classnet.minecraft.world.inventory.AbstractContainerMenu
-