Package net.minecraft.world.inventory
Class AbstractContainerMenu
java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
- Direct Known Subclasses:
BeaconMenu
,BrewingStandMenu
,CartographyTableMenu
,ChestMenu
,ContainerTypeTest.TestContainer
,CreativeModeInventoryScreen.ItemPickerMenu
,DispenserMenu
,EnchantmentMenu
,GrindstoneMenu
,HopperMenu
,HorseInventoryMenu
,ItemCombinerMenu
,LecternMenu
,LoomMenu
,MerchantMenu
,RecipeBookMenu
,ShulkerBoxMenu
,StonecutterMenu
-
Field Summary
Modifier and TypeFieldDescriptionprivate ItemStack
static int
int
private List<ContainerListener>
private NonNullList<ItemStack>
private MenuType<?>
static int
static int
static int
static int
static int
static int
private int
private int
private ItemStack
private it.unimi.dsi.fastutil.ints.IntList
private NonNullList<ItemStack>
static int
private int
private boolean
private ContainerSynchronizer
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractContainerMenu(MenuType<?> p_38851_, int p_38852_)
-
Method Summary
Modifier and TypeMethodDescriptionprotected DataSlot
addDataSlot(DataSlot p_38896_)
protected void
addDataSlots(ContainerData p_38885_)
protected Slot
void
addSlotListener(ContainerListener p_38894_)
void
void
boolean
static boolean
canItemQuickReplace(Slot p_38900_, ItemStack p_38901_, boolean p_38902_)
boolean
canTakeItemForPickAll(ItemStack p_38908_, Slot p_38909_)
protected static void
checkContainerDataCount(ContainerData p_38887_, int p_38888_)
protected static void
checkContainerSize(Container p_38870_, int p_38871_)
protected void
clearContainer(Player p_150412_, Container p_150413_)
void
boolean
clickMenuButton(Player p_38875_, int p_38876_)
private SlotAccess
private void
getItems()
static int
getQuickcraftHeader(int p_38948_)
static int
getQuickcraftMask(int p_38931_, int p_38932_)
static void
getQuickCraftSlotCount(Set<Slot> p_38923_, int p_38924_, ItemStack p_38925_, int p_38926_)
static int
getQuickcraftType(int p_38929_)
static int
getRedstoneSignalFromBlockEntity(BlockEntity p_38919_)
static int
getRedstoneSignalFromContainer(Container p_38939_)
getSlot(int p_38854_)
int
MenuType<?>
getType()
int
void
initializeContents(int p_182411_, List<ItemStack> p_182412_, ItemStack p_182413_)
static boolean
isValidQuickcraftType(int p_38863_, Player p_38864_)
protected boolean
moveItemStackTo(ItemStack p_38904_, int p_38905_, int p_38906_, boolean p_38907_)
quickMoveStack(Player p_38941_, int p_38942_)
void
void
removeSlotListener(ContainerListener p_38944_)
protected void
void
void
void
setCarried(ItemStack p_150439_)
void
setData(int p_38855_, int p_38856_)
void
void
setRemoteCarried(ItemStack p_150423_)
void
setRemoteSlot(int p_150405_, ItemStack p_150406_)
void
setRemoteSlotNoCopy(int p_182415_, ItemStack p_182416_)
void
setSynchronizer(ContainerSynchronizer p_150417_)
void
slotsChanged(Container p_38868_)
abstract boolean
stillValid(Player p_38874_)
protected static boolean
stillValid(ContainerLevelAccess p_38890_, Player p_38891_, Block p_38892_)
void
private void
private void
synchronizeDataSlotToRemote(int p_150441_, int p_150442_)
private void
synchronizeSlotToRemote(int p_150436_, ItemStack p_150437_, Supplier<ItemStack> p_150438_)
void
transferState(AbstractContainerMenu p_150415_)
private void
triggerSlotListeners(int p_150408_, ItemStack p_150409_, Supplier<ItemStack> p_150410_)
private void
updateDataSlotListeners(int p_182421_, int p_182422_)
-
Field Details
-
SLOT_CLICKED_OUTSIDE
public static final int SLOT_CLICKED_OUTSIDE- See Also:
- Constant Field Values
-
QUICKCRAFT_TYPE_CHARITABLE
public static final int QUICKCRAFT_TYPE_CHARITABLE- See Also:
- Constant Field Values
-
QUICKCRAFT_TYPE_GREEDY
public static final int QUICKCRAFT_TYPE_GREEDY- See Also:
- Constant Field Values
-
QUICKCRAFT_TYPE_CLONE
public static final int QUICKCRAFT_TYPE_CLONE- See Also:
- Constant Field Values
-
QUICKCRAFT_HEADER_START
public static final int QUICKCRAFT_HEADER_START- See Also:
- Constant Field Values
-
QUICKCRAFT_HEADER_CONTINUE
public static final int QUICKCRAFT_HEADER_CONTINUE- See Also:
- Constant Field Values
-
QUICKCRAFT_HEADER_END
public static final int QUICKCRAFT_HEADER_END- See Also:
- Constant Field Values
-
CARRIED_SLOT_SIZE
public static final int CARRIED_SLOT_SIZE- See Also:
- Constant Field Values
-
lastSlots
-
slots
-
dataSlots
-
carried
-
remoteSlots
-
remoteDataSlots
private final it.unimi.dsi.fastutil.ints.IntList remoteDataSlots -
remoteCarried
-
stateId
private int stateId -
containerId
public final int containerId -
quickcraftType
private int quickcraftType -
quickcraftStatus
private int quickcraftStatus -
quickcraftSlots
-
containerListeners
-
synchronizer
-
suppressRemoteUpdates
private boolean suppressRemoteUpdates
-
-
Constructor Details
-
AbstractContainerMenu
-
-
Method Details
-
stillValid
protected static boolean stillValid(ContainerLevelAccess p_38890_, Player p_38891_, Block p_38892_) -
getType
-
checkContainerSize
-
checkContainerDataCount
-
addSlot
-
addDataSlot
-
addDataSlots
-
addSlotListener
-
setSynchronizer
-
sendAllDataToRemote
public void sendAllDataToRemote() -
removeSlotListener
-
getItems
-
broadcastChanges
public void broadcastChanges() -
broadcastFullState
public void broadcastFullState() -
updateDataSlotListeners
private void updateDataSlotListeners(int p_182421_, int p_182422_) -
triggerSlotListeners
-
synchronizeSlotToRemote
-
synchronizeDataSlotToRemote
private void synchronizeDataSlotToRemote(int p_150441_, int p_150442_) -
synchronizeCarriedToRemote
private void synchronizeCarriedToRemote() -
setRemoteSlot
-
setRemoteSlotNoCopy
-
setRemoteCarried
-
clickMenuButton
-
getSlot
-
quickMoveStack
-
clicked
-
doClick
-
createCarriedSlotAccess
-
canTakeItemForPickAll
-
removed
-
clearContainer
-
slotsChanged
-
setItem
-
initializeContents
-
setData
public void setData(int p_38855_, int p_38856_) -
stillValid
-
moveItemStackTo
protected boolean moveItemStackTo(ItemStack p_38904_, int p_38905_, int p_38906_, boolean p_38907_) -
getQuickcraftType
public static int getQuickcraftType(int p_38929_) -
getQuickcraftHeader
public static int getQuickcraftHeader(int p_38948_) -
getQuickcraftMask
public static int getQuickcraftMask(int p_38931_, int p_38932_) -
isValidQuickcraftType
-
resetQuickCraft
protected void resetQuickCraft() -
canItemQuickReplace
-
getQuickCraftSlotCount
-
canDragTo
-
getRedstoneSignalFromBlockEntity
-
getRedstoneSignalFromContainer
-
setCarried
-
getCarried
-
suppressRemoteUpdates
public void suppressRemoteUpdates() -
resumeRemoteUpdates
public void resumeRemoteUpdates() -
transferState
-
findSlot
-
getStateId
public int getStateId() -
incrementStateId
public int incrementStateId()
-