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 pContainerId, Inventory pPlayerInventory) CrafterMenu
(int pContainerId, Inventory pPlayerInventory, CraftingContainer pContainer, ContainerData pContainerData) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
void
dataChanged
(AbstractContainerMenu pContainerMenu, int pDataSlotIndex, int pValue) boolean
boolean
isSlotDisabled
(int pSlot) quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.private void
void
setSlotState
(int pSlot, boolean pEnabled) void
slotChanged
(AbstractContainerMenu pContainerToSend, int pDataSlotIndex, ItemStack pStack) Sends the contents of an inventory slot to the client-side Container.boolean
stillValid
(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, 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 pContainerId, Inventory pPlayerInventory, CraftingContainer pContainer, ContainerData pContainerData)
-
-
Method Details
-
addSlots
-
setSlotState
public void setSlotState(int pSlot, boolean pEnabled) -
isSlotDisabled
public boolean isSlotDisabled(int pSlot) -
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
public void slotChanged(AbstractContainerMenu pContainerToSend, int pDataSlotIndex, ItemStack pStack) 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
-