Package net.minecraft.world.inventory
Class ItemCombinerMenu
java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
net.minecraft.world.inventory.ItemCombinerMenu
- Direct Known Subclasses:
AnvilMenu
,SmithingMenu
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ContainerLevelAccess
private static final int
protected final Container
private static final int
private static final int
protected final Player
private final int
protected final ResultContainer
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
ConstructorsConstructorDescriptionItemCombinerMenu
(MenuType<?> pMenuType, int pContainerId, Inventory pInventory, ContainerLevelAccess pAccess, ItemCombinerMenuSlotDefinition pSlotDefinition) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canMoveIntoInputSlots
(ItemStack pStack) private SimpleContainer
createContainer
(int pSize) private void
createInputSlots
(ItemCombinerMenuSlotDefinition pSlotDefinition) abstract void
private void
createResultSlot
(ItemCombinerMenuSlotDefinition pSlotDefinition) private int
private int
int
private int
private int
protected abstract boolean
isValidBlock
(BlockState pState) protected boolean
protected abstract void
quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.void
Called when the container is closed.void
slotsChanged
(Container pInventory) Callback for when the crafting matrix is changed.boolean
stillValid
(Player pPlayer) Determines whether supplied player can use this containerMethods 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, removeSlotListener, resetQuickCraft, resumeRemoteUpdates, sendAllDataToRemote, setCarried, setData, setItem, setRemoteCarried, setRemoteSlot, setRemoteSlotUnsafe, setSelectedBundleItemIndex, setSynchronizer, stillValid, suppressRemoteUpdates, transferState
-
Field Details
-
INVENTORY_SLOTS_PER_ROW
private static final int INVENTORY_SLOTS_PER_ROW- See Also:
-
INVENTORY_ROWS
private static final int INVENTORY_ROWS- See Also:
-
INPUT_SLOT_START
private static final int INPUT_SLOT_START- See Also:
-
access
-
player
-
inputSlots
-
resultSlots
-
resultSlotIndex
private final int resultSlotIndex
-
-
Constructor Details
-
ItemCombinerMenu
public ItemCombinerMenu(@Nullable MenuType<?> pMenuType, int pContainerId, Inventory pInventory, ContainerLevelAccess pAccess, ItemCombinerMenuSlotDefinition pSlotDefinition)
-
-
Method Details
-
mayPickup
-
onTake
-
isValidBlock
-
createInputSlots
-
createResultSlot
-
createResult
public abstract void createResult() -
createContainer
-
slotsChanged
Callback for when the crafting matrix is changed.- Overrides:
slotsChanged
in classAbstractContainerMenu
-
removed
Called when the container is closed.- Overrides:
removed
in classAbstractContainerMenu
-
stillValid
Determines whether supplied player can use this container- Specified by:
stillValid
in classAbstractContainerMenu
-
quickMoveStack
Handle when the stack in slotindex
is shift-clicked. Normally this moves the stack between the player inventory and the other inventory(s).- Specified by:
quickMoveStack
in classAbstractContainerMenu
-
canMoveIntoInputSlots
-
getResultSlot
public int getResultSlot() -
getInventorySlotStart
private int getInventorySlotStart() -
getInventorySlotEnd
private int getInventorySlotEnd() -
getUseRowStart
private int getUseRowStart() -
getUseRowEnd
private int getUseRowEnd()
-