Package net.minecraft.world.inventory
Class CrafterMenu
java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
net.minecraft.world.inventory.CrafterMenu
- All Implemented Interfaces:
ContainerListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CraftingContainerprivate final ContainerDataprivate static final intprivate static final intprivate final Playerprivate final ResultContainerprotected static final intprivate static final intprivate static 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, slots -
Constructor Summary
ConstructorsConstructorDescriptionCrafterMenu(int containerId, Inventory playerInventory) CrafterMenu(int containerId, Inventory playerInventory, CraftingContainer container, ContainerData containerData) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidvoiddataChanged(AbstractContainerMenu containerMenu, int dataSlotIndex, int value) booleanbooleanisSlotDisabled(int slot) quickMoveStack(Player player, int index) Handle when the stack in slotindexis shift-clicked.private voidvoidsetSlotState(int slot, boolean enabled) voidslotChanged(AbstractContainerMenu containerToSend, int dataSlotIndex, ItemStack stack) Sends the contents of an inventory slot to the client-side Container.booleanstillValid(Player player) 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, removed, removeSlotListener, resetQuickCraft, resumeRemoteUpdates, sendAllDataToRemote, setCarried, setData, setItem, setRemoteCarried, setRemoteSlot, setRemoteSlotNoCopy, setSynchronizer, slotsChanged, stillValid, suppressRemoteUpdates, transferState
-
Field Details
-
SLOT_COUNT
protected static final int SLOT_COUNT- See Also:
-
INV_SLOT_START
private static final int INV_SLOT_START- See Also:
-
INV_SLOT_END
private static final int INV_SLOT_END- See Also:
-
USE_ROW_SLOT_START
private static final int USE_ROW_SLOT_START- See Also:
-
USE_ROW_SLOT_END
private static final int USE_ROW_SLOT_END- See Also:
-
resultContainer
-
containerData
-
player
-
container
-
-
Constructor Details
-
CrafterMenu
-
CrafterMenu
public CrafterMenu(int containerId, Inventory playerInventory, CraftingContainer container, ContainerData containerData)
-
-
Method Details
-
addSlots
-
setSlotState
public void setSlotState(int slot, boolean enabled) -
isSlotDisabled
public boolean isSlotDisabled(int slot) -
isPowered
public boolean isPowered() -
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
-
stillValid
Determines whether supplied player can use this container- Specified by:
stillValidin classAbstractContainerMenu
-
refreshRecipeResult
private void refreshRecipeResult() -
getContainer
-
slotChanged
Sends the contents of an inventory slot to the client-side Container. This doesn't have to match the actual contents of that slot.- Specified by:
slotChangedin interfaceContainerListener
-
dataChanged
- Specified by:
dataChangedin interfaceContainerListener
-