net.minecraft.world.entity.player

public class Inventory

implements Container, Nameable

cmw
net.minecraft.world.entity.player.Inventory
net.minecraft.class_1661
net.minecraft.entity.player.PlayerInventory
net.minecraft.src.C_1140_
net.minecraft.world.entity.player.PlayerInventory

Field summary

Modifier and TypeField
public static final int
b
POP_TIME_DURATION
field_30637
ITEM_USAGE_COOLDOWN
f_150064_
public static final int
c
INVENTORY_SIZE
field_30638
MAIN_SIZE
f_150065_
private static final int
m
SELECTION_SIZE
field_30641
HOTBAR_SIZE
f_150070_
public static final int
d
SLOT_OFFHAND
field_30639
OFF_HAND_SLOT
f_150066_
public static final int
e
NOT_FOUND_INDEX
field_30640
NOT_FOUND
f_150067_
public static final int[]
f
ALL_ARMOR_SLOTS
field_33767
ARMOR_SLOTS
f_150068_
public static final int[]
g
HELMET_SLOT_ONLY
field_33768
HELMET_SLOTS
f_150069_
public final NonNullList<ItemStack>
h
items
field_7547
main
f_35974_
public final NonNullList<ItemStack>
i
armor
field_7548
armor
f_35975_
public final NonNullList<ItemStack>
j
offhand
field_7544
offHand
f_35976_
private final List<NonNullList<ItemStack>>
n
compartments
field_7543
combinedInventory
f_35979_
public int
k
selected
field_7545
selectedSlot
f_35977_
public final Player
l
player
field_7546
player
f_35978_
private int
o
timesChanged
field_7542
changeCount
f_35981_

Constructor summary

ModifierConstructor
public (Player player)

Method summary

Modifier and TypeMethod
public ItemStack
f()
getSelected()
method_7391()
getMainHandStack()
m_36056_()
public static int
g()
getSelectionSize()
method_7368()
getHotbarSize()
m_36059_()
private boolean
a(cuq arg0, cuq arg1)
hasRemainingSpaceForItem(ItemStack arg0, ItemStack arg1)
method_7393(class_1799 arg0, class_1799 arg1)
canStackAddMore(ItemStack existingStack, ItemStack stack)
m_36014_(C_1391_ p_36016_, C_1391_ arg1)
public int
h()
getFreeSlot()
method_7376()
getEmptySlot()
m_36062_()
public void
b(cuq arg0)
setPickedItem(ItemStack arg0)
method_7374(class_1799 arg0)
addPickBlock(ItemStack stack)
m_36012_(C_1391_ arg0)
public void
c(int arg0)
pickSlot(int arg0)
method_7365(int arg0)
swapSlotWithHotbar(int slot)
m_36038_(int arg0)
public static boolean
d(int arg0)
isHotbarSlot(int arg0)
method_7380(int arg0)
isValidHotbarIndex(int slot)
m_36045_(int p_36046_)
public int
c(cuq arg0)
findSlotMatchingItem(ItemStack arg0)
method_7395(class_1799 arg0)
getSlotWithStack(ItemStack stack)
m_36030_(C_1391_ arg0)
public int
d(cuq arg0)
findSlotMatchingUnusedItem(ItemStack arg0)
method_7371(class_1799 arg0)
indexOf(ItemStack stack)
m_36043_(C_1391_ arg0)
public int
i()
getSuitableHotbarSlot()
method_7386()
getSwappableHotbarSlot()
m_36065_()
public void
a(double arg0)
swapPaint(double arg0)
method_7373(double arg0)
scrollInHotbar(double scrollAmount)
m_35988_(double arg0)
public int
a(Predicate<cuq> arg0, int arg1, bqk arg2)
clearOrCountMatchingItems(Predicate<ItemStack> arg0, int arg1, Container arg2)
method_29280(Predicate<class_1799> arg0, int arg1, class_1263 arg2)
remove(Predicate<ItemStack> shouldRemove, int maxCount, Inventory craftingInventory)
m_36022_(Predicate<C_1391_> p_36024_, int p_36025_, C_464_ arg2)
private int
j(cuq arg0)
addResource(ItemStack arg0)
method_7366(class_1799 arg0)
addStack(ItemStack stack)
m_36066_(C_1391_ arg0)
private int
d(int arg0, cuq arg1)
addResource(int arg0, ItemStack arg1)
method_7385(int arg0, class_1799 arg1)
addStack(int slot, ItemStack stack)
m_36047_(int p_36049_, C_1391_ arg1)
public int
e(cuq arg0)
getSlotWithRemainingSpace(ItemStack arg0)
method_7390(class_1799 arg0)
getOccupiedSlotWithRoomForStack(ItemStack stack)
m_36050_(C_1391_ arg0)
public void
j()
tick()
method_7381()
updateItems()
m_36068_()
public boolean
f(cuq arg0)
add(ItemStack arg0)
method_7394(class_1799 arg0)
insertStack(ItemStack stack)
m_36054_(C_1391_ arg0)
public boolean
c(int arg0, cuq arg1)
add(int arg0, ItemStack arg1)
method_7367(int arg0, class_1799 arg1)
insertStack(int slot, ItemStack stack)
m_36040_(int p_36042_, C_1391_ arg1)
public void
g(cuq arg0)
placeItemBackInInventory(ItemStack arg0)
method_7398(class_1799 arg0)
offerOrDrop(ItemStack stack)
m_150079_(C_1391_ arg0)
public void
a(cuq arg0, boolean arg1)
placeItemBackInInventory(ItemStack arg0, boolean arg1)
method_32338(class_1799 arg0, boolean arg1)
offer(ItemStack stack, boolean notifiesClient)
m_150076_(C_1391_ p_150078_, boolean arg1)
public ItemStack
a(int arg0, int arg1)
removeItem(int arg0, int arg1)
method_5434(int arg0, int arg1)
removeStack(int arg0, int arg1)
m_7407_(int p_35994_, int arg1)
public void
h(cuq arg0)
removeItem(ItemStack arg0)
method_7378(class_1799 arg0)
removeOne(ItemStack stack)
m_36057_(C_1391_ arg0)
public ItemStack
b(int arg0)
removeItemNoUpdate(int arg0)
method_5441(int arg0)
removeStack(int arg0)
m_8016_(int arg0)
public void
a(int arg0, cuq arg1)
setItem(int arg0, ItemStack arg1)
method_5447(int arg0, class_1799 arg1)
setStack(int arg0, ItemStack arg1)
m_6836_(int p_36000_, C_1391_ arg1)
public float
a(dtc arg0)
getDestroySpeed(BlockState arg0)
method_7370(class_2680 arg0)
getBlockBreakingSpeed(BlockState block)
m_36020_(C_2064_ arg0)
public ListTag
a(uh arg0)
save(ListTag arg0)
method_7384(class_2499 arg0)
writeNbt(NbtList nbtList)
m_36026_(C_4930_ arg0)
public void
b(uh arg0)
load(ListTag arg0)
method_7397(class_2499 arg0)
readNbt(NbtList nbtList)
m_36035_(C_4930_ arg0)
public int
b()
getContainerSize()
method_5439()
size()
m_6643_()
public boolean
c()
isEmpty()
method_5442()
isEmpty()
m_7983_()
public ItemStack
a(int arg0)
getItem(int arg0)
method_5438(int arg0)
getStack(int arg0)
m_8020_(int arg0)
public Component
ah()
getName()
method_5477()
getName()
m_7755_()
public ItemStack
e(int arg0)
getArmor(int arg0)
method_7372(int arg0)
getArmorStack(int slot)
m_36052_(int arg0)
public void
k()
dropAll()
method_7388()
dropAll()
m_36071_()
public void
e()
setChanged()
method_5431()
markDirty()
m_6596_()
public int
l()
getTimesChanged()
method_7364()
getChangeCount()
m_36072_()
public boolean
a(cmx arg0)
stillValid(Player arg0)
method_5443(class_1657 arg0)
canPlayerUse(PlayerEntity arg0)
m_6542_(C_1141_ arg0)
public boolean
i(cuq arg0)
contains(ItemStack arg0)
method_7379(class_1799 arg0)
contains(ItemStack stack)
m_36063_(C_1391_ arg0)
public boolean
a(awu<cul> arg0)
contains(TagKey<Item> arg0)
method_7382(class_6862<class_1792> arg0)
contains(TagKey<Item> tag)
m_204075_(C_203208_<C_1381_> arg0)
public boolean
b(Predicate<cuq> arg0)
contains(Predicate<ItemStack> arg0)
method_55753(Predicate<class_1799> arg0)
contains(Predicate<ItemStack> predicate)
m_321814_(Predicate<C_1391_> arg0)
public void
a(cmw arg0)
replaceWith(Inventory arg0)
method_7377(class_1661 arg0)
clone(PlayerInventory other)
m_36006_(C_1140_ arg0)
public void
a()
clearContent()
method_5448()
clear()
m_6211_()
public void
a(cnb arg0)
fillStackedContents(StackedContents arg0)
method_7387(class_1662 arg0)
populateRecipeFinder(RecipeMatcher finder)
m_36010_(C_1145_ arg0)
public ItemStack
a(boolean arg0)
removeFromSelected(boolean arg0)
method_37417(boolean arg0)
dropSelectedItem(boolean entireStack)
m_182403_(boolean arg0)