Package net.minecraft.world.inventory
Class LoomMenu
java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
net.minecraft.world.inventory.LoomMenu
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ContainerLevelAccess
(package private) final Slot
(package private) final Slot
private final Container
private static final int
private static final int
(package private) long
private final Container
private static final int
private final HolderGetter
<BannerPattern> private final Slot
private final Slot
private List
<Holder<BannerPattern>> (package private) final DataSlot
(package private) Runnable
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
ConstructorsConstructorDescriptionLoomMenu
(int pContainerId, Inventory pPlayerInventory, ContainerLevelAccess pAccess) -
Method Summary
Modifier and TypeMethodDescriptionboolean
clickMenuButton
(Player pPlayer, int pId) Handles the given Button-click on the server, currently only used by enchanting.private List
<Holder<BannerPattern>> getSelectablePatterns
(ItemStack pStack) int
private boolean
isValidPatternIndex
(int pIndex) quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.void
registerUpdateListener
(Runnable pListener) void
Called when the container is closed.private void
setupResultSlot
(Holder<BannerPattern> pPattern) Creates an output banner ItemStack based on the patterns, dyes, etc. in the loom.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, addSlot, addSlotListener, broadcastChanges, broadcastFullState, canDragTo, canItemQuickReplace, canTakeItemForPickAll, checkContainerDataCount, checkContainerSize, clearContainer, clicked, 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
-
PATTERN_NOT_SET
private static final int PATTERN_NOT_SET- 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:
-
access
-
selectedBannerPatternIndex
-
selectablePatterns
-
slotUpdateListener
Runnable slotUpdateListener -
patternGetter
-
bannerSlot
-
dyeSlot
-
patternSlot
-
resultSlot
-
lastSoundTime
long lastSoundTime -
inputContainer
-
outputContainer
-
-
Constructor Details
-
LoomMenu
-
LoomMenu
-
-
Method Details
-
stillValid
Determines whether supplied player can use this container- Specified by:
stillValid
in classAbstractContainerMenu
-
clickMenuButton
Handles the given Button-click on the server, currently only used by enchanting. Name is for legacy.- Overrides:
clickMenuButton
in classAbstractContainerMenu
-
getSelectablePatterns
-
isValidPatternIndex
private boolean isValidPatternIndex(int pIndex) -
slotsChanged
Callback for when the crafting matrix is changed.- Overrides:
slotsChanged
in classAbstractContainerMenu
-
getSelectablePatterns
-
getSelectedBannerPatternIndex
public int getSelectedBannerPatternIndex() -
registerUpdateListener
-
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
-
removed
Called when the container is closed.- Overrides:
removed
in classAbstractContainerMenu
-
setupResultSlot
Creates an output banner ItemStack based on the patterns, dyes, etc. in the loom. -
getBannerSlot
-
getDyeSlot
-
getPatternSlot
-
getResultSlot
-