net.minecraft.world.entity.player

public class Inventory

implements Container, Nameable

cpw
net.minecraft.world.entity.player.Inventory
net.minecraft.class_1661
net.minecraft.entity.player.PlayerInventory
net.minecraft.world.entity.player.PlayerInventory

Field summary

Modifier and TypeField
public static final int
b
POP_TIME_DURATION
field_30637
ITEM_USAGE_COOLDOWN
public static final int
c
INVENTORY_SIZE
field_30638
MAIN_SIZE
public static final int
d
SELECTION_SIZE
field_30641
HOTBAR_SIZE
public static final int
e
SLOT_OFFHAND
field_30639
OFF_HAND_SLOT
public static final int
f
NOT_FOUND_INDEX
field_30640
NOT_FOUND
public final NonNullList<ItemStack>
g
items
field_7547
main
public final NonNullList<ItemStack>
h
armor
field_7548
armor
public final NonNullList<ItemStack>
i
offhand
field_7544
offHand
private final List<NonNullList<ItemStack>>
l
compartments
field_7543
combinedInventory
public int
j
selected
field_7545
selectedSlot
public final Player
k
player
field_7546
player
private int
m
timesChanged
field_7542
changeCount

Constructor summary

ModifierConstructor
public (Player player)

Method summary

Modifier and TypeMethod
public ItemStack
f()
getSelected()
method_7391()
getMainHandStack()
public static int
g()
getSelectionSize()
method_7368()
getHotbarSize()
private boolean
a(cxp arg0, cxp arg1)
hasRemainingSpaceForItem(ItemStack arg0, ItemStack arg1)
method_7393(class_1799 arg0, class_1799 arg1)
canStackAddMore(ItemStack existingStack, ItemStack stack)
public int
h()
getFreeSlot()
method_7376()
getEmptySlot()
public void
b(cxp arg0)
setPickedItem(ItemStack arg0)
method_7374(class_1799 arg0)
addPickBlock(ItemStack stack)
public void
c(int arg0)
pickSlot(int arg0)
method_7365(int arg0)
swapSlotWithHotbar(int slot)
public static boolean
d(int arg0)
isHotbarSlot(int arg0)
method_7380(int arg0)
isValidHotbarIndex(int slot)
public int
c(cxp arg0)
findSlotMatchingItem(ItemStack arg0)
method_7395(class_1799 arg0)
getSlotWithStack(ItemStack stack)
public static boolean
d(cxp arg0)
isUsableForCrafting(ItemStack arg0)
method_61495(class_1799 arg0)
usableWhenFillingSlot(ItemStack stack)
public int
a(jq<cxl> arg0)
findSlotMatchingCraftingIngredient(Holder<Item> arg0)
method_61494(class_6880<class_1792> arg0)
getMatchingSlot(RegistryEntry<Item> item)
public int
i()
getSuitableHotbarSlot()
method_7386()
getSwappableHotbarSlot()
public void
e(int arg0)
setSelectedHotbarSlot(int arg0)
method_61496(int arg0)
setSelectedSlot(int slot)
public int
a(Predicate<cxp> arg0, int arg1, btc 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)
private int
j(cxp arg0)
addResource(ItemStack arg0)
method_7366(class_1799 arg0)
addStack(ItemStack stack)
private int
d(int arg0, cxp arg1)
addResource(int arg0, ItemStack arg1)
method_7385(int arg0, class_1799 arg1)
addStack(int slot, ItemStack stack)
public int
e(cxp arg0)
getSlotWithRemainingSpace(ItemStack arg0)
method_7390(class_1799 arg0)
getOccupiedSlotWithRoomForStack(ItemStack stack)
public void
j()
tick()
method_7381()
updateItems()
public boolean
f(cxp arg0)
add(ItemStack arg0)
method_7394(class_1799 arg0)
insertStack(ItemStack stack)
public boolean
c(int arg0, cxp arg1)
add(int arg0, ItemStack arg1)
method_7367(int arg0, class_1799 arg1)
insertStack(int slot, ItemStack stack)
public void
g(cxp arg0)
placeItemBackInInventory(ItemStack arg0)
method_7398(class_1799 arg0)
offerOrDrop(ItemStack stack)
public void
a(cxp arg0, boolean arg1)
placeItemBackInInventory(ItemStack arg0, boolean arg1)
method_32338(class_1799 arg0, boolean arg1)
offer(ItemStack stack, boolean notifiesClient)
public ClientboundSetPlayerInventoryPacket
f(int arg0)
createInventoryUpdatePacket(int arg0)
method_61497(int arg0)
createSlotSetPacket(int slot)
public ItemStack
a(int arg0, int arg1)
removeItem(int arg0, int arg1)
method_5434(int arg0, int arg1)
removeStack(int arg0, int arg1)
public void
h(cxp arg0)
removeItem(ItemStack arg0)
method_7378(class_1799 arg0)
removeOne(ItemStack stack)
public ItemStack
b(int arg0)
removeItemNoUpdate(int arg0)
method_5441(int arg0)
removeStack(int arg0)
public void
a(int arg0, cxp arg1)
setItem(int arg0, ItemStack arg1)
method_5447(int arg0, class_1799 arg1)
setStack(int arg0, ItemStack arg1)
public float
a(dxv arg0)
getDestroySpeed(BlockState arg0)
method_7370(class_2680 arg0)
getBlockBreakingSpeed(BlockState block)
public ListTag
a(vd arg0)
save(ListTag arg0)
method_7384(class_2499 arg0)
writeNbt(NbtList nbtList)
public void
b(vd arg0)
load(ListTag arg0)
method_7397(class_2499 arg0)
readNbt(NbtList nbtList)
public int
b()
getContainerSize()
method_5439()
size()
public boolean
c()
isEmpty()
method_5442()
isEmpty()
public ItemStack
a(int arg0)
getItem(int arg0)
method_5438(int arg0)
getStack(int arg0)
public Component
al()
getName()
method_5477()
getName()
public ItemStack
g(int arg0)
getArmor(int arg0)
method_7372(int arg0)
getArmorStack(int slot)
public void
k()
dropAll()
method_7388()
dropAll()
public void
e()
setChanged()
method_5431()
markDirty()
public int
l()
getTimesChanged()
method_7364()
getChangeCount()
public boolean
a(cpx arg0)
stillValid(Player arg0)
method_5443(class_1657 arg0)
canPlayerUse(PlayerEntity arg0)
public boolean
i(cxp arg0)
contains(ItemStack arg0)
method_7379(class_1799 arg0)
contains(ItemStack stack)
public boolean
a(ayk<cxl> arg0)
contains(TagKey<Item> arg0)
method_7382(class_6862<class_1792> arg0)
contains(TagKey<Item> tag)
public boolean
b(Predicate<cxp> arg0)
contains(Predicate<ItemStack> arg0)
method_55753(Predicate<class_1799> arg0)
contains(Predicate<ItemStack> predicate)
public void
a(cpw arg0)
replaceWith(Inventory arg0)
method_7377(class_1661 arg0)
clone(PlayerInventory other)
public void
a()
clearContent()
method_5448()
clear()
public void
a(cqc arg0)
fillStackedContents(StackedItemContents arg0)
method_7387(class_9875 arg0)
populateRecipeFinder(RecipeFinder finder)
public ItemStack
a(boolean arg0)
removeFromSelected(boolean arg0)
method_37417(boolean arg0)
dropSelectedItem(boolean entireStack)