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 ContainerLevelAccessprotected final Containerprivate static final intprivate static final intprotected final Playerprivate final intprotected final ResultContainerFields 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, slots -
Constructor Summary
ConstructorsConstructorDescriptionItemCombinerMenu(MenuType<?> pType, int pContainerId, Inventory pPlayerInventory, ContainerLevelAccess pAccess) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanMoveIntoInputSlots(ItemStack pStack) private SimpleContainercreateContainer(int pSize) protected abstract ItemCombinerMenuSlotDefinitionprivate voidcreateInputSlots(ItemCombinerMenuSlotDefinition pSlotDefinition) private voidcreateInventorySlots(Inventory pInventory) abstract voidprivate voidcreateResultSlot(ItemCombinerMenuSlotDefinition pSlotDefinition) private intprivate intintintgetSlotToQuickMoveTo(ItemStack pStack) private intprivate intprotected abstract booleanisValidBlock(BlockState pState) protected abstract booleanprotected abstract voidquickMoveStack(Player pPlayer, int pIndex) Handle when the stack in slotindexis shift-clicked.voidCalled when the container is closed.voidslotsChanged(Container pInventory) Callback for when the crafting matrix is changed.booleanstillValid(Player pPlayer) Determines whether supplied player can use this containerMethods inherited from class net.minecraft.world.inventory.AbstractContainerMenu
addDataSlot, addDataSlots, addSlot, addSlotListener, 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, setRemoteSlotNoCopy, setSynchronizer, stillValid, suppressRemoteUpdates, transferState
-
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
-
player
-
inputSlots
-
inputSlotIndexes
-
resultSlots
-
resultSlotIndex
private final int resultSlotIndex
-
-
Constructor Details
-
ItemCombinerMenu
public ItemCombinerMenu(@Nullable MenuType<?> pType, int pContainerId, Inventory pPlayerInventory, ContainerLevelAccess pAccess)
-
-
Method Details
-
mayPickup
-
onTake
-
isValidBlock
-
createInputSlots
-
createResultSlot
-
createInventorySlots
-
createResult
public abstract void createResult() -
createInputSlotDefinitions
-
createContainer
-
slotsChanged
Callback for when the crafting matrix is changed.- Overrides:
slotsChangedin classAbstractContainerMenu
-
removed
Called when the container is closed.- Overrides:
removedin classAbstractContainerMenu
-
stillValid
Determines whether supplied player can use this container- Specified by:
stillValidin classAbstractContainerMenu
-
quickMoveStack
Handle when the stack in slotindexis shift-clicked. Normally this moves the stack between the player inventory and the other inventory(s).- Specified by:
quickMoveStackin classAbstractContainerMenu
-
canMoveIntoInputSlots
-
getSlotToQuickMoveTo
-
getResultSlot
public int getResultSlot() -
getInventorySlotStart
private int getInventorySlotStart() -
getInventorySlotEnd
private int getInventorySlotEnd() -
getUseRowStart
private int getUseRowStart() -
getUseRowEnd
private int getUseRowEnd()
-