Class Container
java.lang.Object
net.minecraft.inventory.container.Container
- Direct Known Subclasses:
AbstractRepairContainer
,BeaconContainer
,BrewingStandContainer
,CartographyContainer
,ChestContainer
,ContainerTypeTest.TestContainer
,CreativeScreen.CreativeContainer
,DispenserContainer
,EnchantmentContainer
,GrindstoneContainer
,HopperContainer
,HorseInventoryContainer
,LecternContainer
,LoomContainer
,MerchantContainer
,RecipeBookContainer
,ShulkerBoxContainer
,StonecutterContainer
-
Field Summary
Modifier and TypeFieldDescriptionprivate short
final int
private final List<IContainerListener>
private final List<IntReferenceHolder>
private final NonNullList<ItemStack>
private final ContainerType<?>
private int
private int
private final Set<PlayerEntity>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected IntReferenceHolder
addDataSlot
(IntReferenceHolder p_216958_1_) protected void
addDataSlots
(IIntArray p_216961_1_) protected Slot
void
addSlotListener
(IContainerListener p_75132_1_) short
backup
(PlayerInventory p_75136_1_) void
boolean
static boolean
canItemQuickReplace
(Slot p_94527_0_, ItemStack p_94527_1_, boolean p_94527_2_) boolean
canTakeItemForPickAll
(ItemStack p_94530_1_, Slot p_94530_2_) protected static void
checkContainerDataCount
(IIntArray p_216959_0_, int p_216959_1_) protected static void
checkContainerSize
(IInventory p_216962_0_, int p_216962_1_) protected void
clearContainer
(PlayerEntity p_193327_1_, World p_193327_2_, IInventory p_193327_3_) clicked
(int p_184996_1_, int p_184996_2_, ClickType p_184996_3_, PlayerEntity p_184996_4_) boolean
clickMenuButton
(PlayerEntity p_75140_1_, int p_75140_2_) static boolean
consideredTheSameItem
(ItemStack p_195929_0_, ItemStack p_195929_1_) private ItemStack
doClick
(int p_241440_1_, int p_241440_2_, ClickType p_241440_3_, PlayerEntity p_241440_4_) getItems()
static int
getQuickcraftHeader
(int p_94532_0_) static int
getQuickcraftMask
(int p_94534_0_, int p_94534_1_) static void
getQuickCraftSlotCount
(Set<Slot> p_94525_0_, int p_94525_1_, ItemStack p_94525_2_, int p_94525_3_) static int
getQuickcraftType
(int p_94529_0_) static int
getRedstoneSignalFromBlockEntity
(TileEntity p_178144_0_) static int
getRedstoneSignalFromContainer
(IInventory p_94526_0_) getSlot
(int p_75139_1_) getType()
boolean
isSynched
(PlayerEntity p_75129_1_) static boolean
isValidQuickcraftType
(int p_180610_0_, PlayerEntity p_180610_1_) protected boolean
moveItemStackTo
(ItemStack p_75135_1_, int p_75135_2_, int p_75135_3_, boolean p_75135_4_) quickMoveStack
(PlayerEntity p_82846_1_, int p_82846_2_) void
removed
(PlayerEntity p_75134_1_) void
removeSlotListener
(IContainerListener p_82847_1_) protected void
void
void
setData
(int p_75137_1_, int p_75137_2_) void
void
setSynched
(PlayerEntity p_75128_1_, boolean p_75128_2_) void
slotsChanged
(IInventory p_75130_1_) abstract boolean
stillValid
(PlayerEntity p_75145_1_) protected static boolean
stillValid
(IWorldPosCallable p_216963_0_, PlayerEntity p_216963_1_, Block p_216963_2_)
-
Field Details
-
lastSlots
-
slots
-
dataSlots
-
containerId
public final int containerId -
changeUid
private short changeUid -
quickcraftType
private int quickcraftType -
quickcraftStatus
private int quickcraftStatus -
quickcraftSlots
-
containerListeners
-
unSynchedPlayers
-
-
Constructor Details
-
Container
-
-
Method Details
-
stillValid
protected static boolean stillValid(IWorldPosCallable p_216963_0_, PlayerEntity p_216963_1_, Block p_216963_2_) -
getType
-
checkContainerSize
-
checkContainerDataCount
-
addSlot
-
addDataSlot
-
addDataSlots
-
addSlotListener
-
removeSlotListener
-
getItems
-
broadcastChanges
public void broadcastChanges() -
clickMenuButton
-
getSlot
-
quickMoveStack
-
clicked
public ItemStack clicked(int p_184996_1_, int p_184996_2_, ClickType p_184996_3_, PlayerEntity p_184996_4_) -
doClick
private ItemStack doClick(int p_241440_1_, int p_241440_2_, ClickType p_241440_3_, PlayerEntity p_241440_4_) -
consideredTheSameItem
-
canTakeItemForPickAll
-
removed
-
clearContainer
-
slotsChanged
-
setItem
-
setAll
-
setData
public void setData(int p_75137_1_, int p_75137_2_) -
backup
-
isSynched
-
setSynched
-
stillValid
-
moveItemStackTo
protected boolean moveItemStackTo(ItemStack p_75135_1_, int p_75135_2_, int p_75135_3_, boolean p_75135_4_) -
getQuickcraftType
public static int getQuickcraftType(int p_94529_0_) -
getQuickcraftHeader
public static int getQuickcraftHeader(int p_94532_0_) -
getQuickcraftMask
public static int getQuickcraftMask(int p_94534_0_, int p_94534_1_) -
isValidQuickcraftType
-
resetQuickCraft
protected void resetQuickCraft() -
canItemQuickReplace
-
getQuickCraftSlotCount
-
canDragTo
-
getRedstoneSignalFromBlockEntity
-
getRedstoneSignalFromContainer
-