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 CraftingContainer
private final ContainerData
private static final int
private static final int
private final Player
private final ResultContainer
protected static final int
private static final int
private static 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, slots
-
Constructor Summary
ConstructorsConstructorDescriptionCrafterMenu
(int containerId, Inventory playerInventory) CrafterMenu
(int containerId, Inventory playerInventory, CraftingContainer container, ContainerData containerData) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
void
dataChanged
(AbstractContainerMenu containerMenu, int dataSlotIndex, int value) boolean
boolean
isSlotDisabled
(int slot) quickMoveStack
(Player player, int index) Handle when the stack in slotindex
is shift-clicked.private void
void
setSlotState
(int slot, boolean enabled) void
slotChanged
(AbstractContainerMenu containerToSend, int dataSlotIndex, ItemStack stack) Sends the contents of an inventory slot to the client-side Container.boolean
stillValid
(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 slotindex
is shift-clicked. Normally this moves the stack between the player inventory and the other inventory(s).- Specified by:
quickMoveStack
in classAbstractContainerMenu
-
stillValid
Determines whether supplied player can use this container- Specified by:
stillValid
in 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:
slotChanged
in interfaceContainerListener
-
dataChanged
- Specified by:
dataChanged
in interfaceContainerListener
-