Class LoomMenu
java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
net.minecraft.world.inventory.LoomMenu
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ContainerLevelAccessprivate final Slotprivate final Slotprivate final Containerprivate static final intprivate static final intprivate longprivate final Containerprivate static final intprivate final HolderGetter<BannerPattern> private final Slotprivate final Slotprivate List<Holder<BannerPattern>> private final DataSlotprivate Runnableprivate static final intprivate static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanclickMenuButton(Player player, int buttonId) Handles the given Button-click on the server, currently only used by enchanting.private List<Holder<BannerPattern>> getSelectablePatterns(ItemStack patternStack) intprivate static booleanprivate static booleanisPatternItem(ItemStack itemStack) private booleanisValidPatternIndex(int selectedPattern) quickMoveStack(Player player, int slotIndex) Handle when the stack in slotindexis shift-clicked.voidregisterUpdateListener(Runnable slotUpdateListener) voidCalled when the container is closed.private voidsetupResultSlot(Holder<BannerPattern> pattern) Creates an output banner ItemStack based on the patterns, dyes, etc. in the loom.voidslotsChanged(Container container) Callback for when the crafting matrix is changed.booleanstillValid(Player player) Determines whether supplied player can use this containerMethods inherited from class AbstractContainerMenu
addDataSlot, addDataSlots, addInventoryExtendedSlots, addInventoryHotbarSlots, addSlot, addSlotListener, addStandardInventorySlots, 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, setRemoteSlotUnsafe, setSelectedBundleItemIndex, 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
-
patternGetter
-
bannerSlot
-
dyeSlot
-
patternSlot
-
resultSlot
-
lastSoundTime
private long lastSoundTime -
inputContainer
-
outputContainer
-
-
Constructor Details
-
LoomMenu
-
LoomMenu
-
-
Method Details
-
isPatternItem
-
isDyeItem
-
stillValid
Determines whether supplied player can use this container- Specified by:
stillValidin classAbstractContainerMenu
-
clickMenuButton
Handles the given Button-click on the server, currently only used by enchanting. Name is for legacy.- Overrides:
clickMenuButtonin classAbstractContainerMenu
-
getSelectablePatterns
-
isValidPatternIndex
private boolean isValidPatternIndex(int selectedPattern) -
slotsChanged
Callback for when the crafting matrix is changed.- Overrides:
slotsChangedin classAbstractContainerMenu
-
getSelectablePatterns
-
getSelectedBannerPatternIndex
public int getSelectedBannerPatternIndex() -
registerUpdateListener
-
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
-
removed
Called when the container is closed.- Overrides:
removedin classAbstractContainerMenu
-
setupResultSlot
Creates an output banner ItemStack based on the patterns, dyes, etc. in the loom. -
getBannerSlot
-
getDyeSlot
-
getPatternSlot
-
getResultSlot
-