Class DeckInventory
java.lang.Object
net.minecraft.world.entity.player.Inventory
com.pixelmonmod.tcg.client.container.DeckInventory
- All Implemented Interfaces:
net.minecraft.world.Clearable,net.minecraft.world.Container,net.minecraft.world.Nameable
public class DeckInventory
extends net.minecraft.world.entity.player.Inventory
-
Field Summary
FieldsFields inherited from class net.minecraft.world.entity.player.Inventory
ALL_ARMOR_SLOTS, armor, HELMET_SLOT_ONLY, INVENTORY_SIZE, items, NOT_FOUND_INDEX, offhand, POP_TIME_DURATION, selected, SLOT_OFFHANDFields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER -
Constructor Summary
ConstructorsConstructorDescriptionDeckInventory(net.minecraft.world.item.ItemStack item, net.minecraft.world.entity.player.Player player) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanPlaceItem(int index, net.minecraft.world.item.ItemStack itemStack) intnet.minecraft.world.item.ItemStackgetItem(int p_70301_1_) intnet.minecraft.world.entity.player.PlayervoidreadInventoryFromNBT(net.minecraft.nbt.CompoundTag nbtDeck, net.minecraft.core.HolderLookup.Provider registryAccess) net.minecraft.world.item.ItemStackremoveItem(int index, int count) net.minecraft.world.item.ItemStackremoveItemNoUpdate(int slot) voidsetItem(int index, net.minecraft.world.item.ItemStack stack) voidstartOpen(net.minecraft.world.entity.player.Player player) booleanstillValid(net.minecraft.world.entity.player.Player player) voidstopOpen(net.minecraft.world.entity.player.Player player) voidwriteInventoryToNBT(net.minecraft.nbt.CompoundTag nbtDeck, net.minecraft.core.HolderLookup.Provider registryAccess) voidwriteToBuffer(net.minecraft.network.FriendlyByteBuf buffer) Methods inherited from class net.minecraft.world.entity.player.Inventory
add, add, clearContent, clearOrCountMatchingItems, contains, contains, contains, dropAll, fillStackedContents, findSlotMatchingItem, findSlotMatchingUnusedItem, getArmor, getDestroySpeed, getFreeSlot, getName, getSelected, getSelectionSize, getSlotWithRemainingSpace, getSuitableHotbarSlot, getTimesChanged, isEmpty, isHotbarSlot, load, pickSlot, placeItemBackInInventory, placeItemBackInInventory, removeFromSelected, removeItem, replaceWith, save, setChanged, setPickedItem, swapPaint, tickMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.Container
canTakeItem, countItem, getMaxStackSize, hasAnyMatching, hasAnyOfMethods inherited from interface net.minecraft.world.Nameable
getCustomName, getDisplayName, hasCustomName
-
Field Details
-
INVENTORY_TAG_NAME
-
size
public static final int size- See Also:
-
isLocked
public boolean isLocked
-
-
Constructor Details
-
DeckInventory
public DeckInventory(net.minecraft.world.item.ItemStack item, net.minecraft.world.entity.player.Player player)
-
-
Method Details
-
writeInventoryToNBT
public void writeInventoryToNBT(net.minecraft.nbt.CompoundTag nbtDeck, net.minecraft.core.HolderLookup.Provider registryAccess) -
writeToBuffer
public void writeToBuffer(net.minecraft.network.FriendlyByteBuf buffer) -
readInventoryFromNBT
public void readInventoryFromNBT(net.minecraft.nbt.CompoundTag nbtDeck, net.minecraft.core.HolderLookup.Provider registryAccess) -
getContainerSize
public int getContainerSize()- Specified by:
getContainerSizein interfacenet.minecraft.world.Container- Overrides:
getContainerSizein classnet.minecraft.world.entity.player.Inventory
-
getItem
public net.minecraft.world.item.ItemStack getItem(int p_70301_1_) - Specified by:
getItemin interfacenet.minecraft.world.Container- Overrides:
getItemin classnet.minecraft.world.entity.player.Inventory
-
removeItem
public net.minecraft.world.item.ItemStack removeItem(int index, int count) - Specified by:
removeItemin interfacenet.minecraft.world.Container- Overrides:
removeItemin classnet.minecraft.world.entity.player.Inventory
-
removeItemNoUpdate
public net.minecraft.world.item.ItemStack removeItemNoUpdate(int slot) - Specified by:
removeItemNoUpdatein interfacenet.minecraft.world.Container- Overrides:
removeItemNoUpdatein classnet.minecraft.world.entity.player.Inventory
-
setItem
public void setItem(int index, net.minecraft.world.item.ItemStack stack) - Specified by:
setItemin interfacenet.minecraft.world.Container- Overrides:
setItemin classnet.minecraft.world.entity.player.Inventory
-
getMaxStackSize
public int getMaxStackSize() -
stillValid
public boolean stillValid(net.minecraft.world.entity.player.Player player) - Specified by:
stillValidin interfacenet.minecraft.world.Container- Overrides:
stillValidin classnet.minecraft.world.entity.player.Inventory
-
startOpen
public void startOpen(net.minecraft.world.entity.player.Player player) -
stopOpen
public void stopOpen(net.minecraft.world.entity.player.Player player) -
canPlaceItem
public boolean canPlaceItem(int index, net.minecraft.world.item.ItemStack itemStack) -
getPlayer
public net.minecraft.world.entity.player.Player getPlayer()
-