类 ItemStackWrapper

java.lang.Object
committee.nova.mods.avaritia.api.common.wrapper.ItemStackWrapper
所有已实现的接口:
BaseItemWrapper, net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>, net.minecraftforge.items.IItemHandler, net.minecraftforge.items.IItemHandlerModifiable

public class ItemStackWrapper extends Object implements BaseItemWrapper
  • 字段详细资料

    • stacks

      protected net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> stacks
  • 构造器详细资料

    • ItemStackWrapper

      public ItemStackWrapper(int size)
    • ItemStackWrapper

      public ItemStackWrapper(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> size)
    • ItemStackWrapper

      public ItemStackWrapper(int size, Runnable onContentsChanged)
    • ItemStackWrapper

      public ItemStackWrapper(int size, int maxStackSize)
    • ItemStackWrapper

      public ItemStackWrapper(int size, int maxStackSize, Runnable onContentsChanged)
    • ItemStackWrapper

      public ItemStackWrapper(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> stacks, Runnable onContentsChanged)
    • ItemStackWrapper

      public ItemStackWrapper(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> stacks, int maxStackSize, Runnable onContentsChanged)
  • 方法详细资料

    • setSize

      public void setSize(int size)
    • getSlots

      public int getSlots()
      指定者:
      getSlots 在接口中 net.minecraftforge.items.IItemHandler
    • getStackInSlot

      @NotNull public @NotNull net.minecraft.world.item.ItemStack getStackInSlot(int slot)
      指定者:
      getStackInSlot 在接口中 net.minecraftforge.items.IItemHandler
    • setStackInSlot

      public void setStackInSlot(int slot, @NotNull @NotNull net.minecraft.world.item.ItemStack stack)
      指定者:
      setStackInSlot 在接口中 net.minecraftforge.items.IItemHandlerModifiable
    • serializeNBT

      public net.minecraft.nbt.CompoundTag serializeNBT()
      指定者:
      serializeNBT 在接口中 net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
    • deserializeNBT

      public void deserializeNBT(net.minecraft.nbt.CompoundTag nbt)
      指定者:
      deserializeNBT 在接口中 net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
    • insertItem

      @NotNull public @NotNull net.minecraft.world.item.ItemStack insertItem(int slot, @NotNull @NotNull net.minecraft.world.item.ItemStack stack, boolean simulate)
      指定者:
      insertItem 在接口中 net.minecraftforge.items.IItemHandler
    • extractItem

      @NotNull public @NotNull net.minecraft.world.item.ItemStack extractItem(int slot, int amount, boolean simulate)
      指定者:
      extractItem 在接口中 net.minecraftforge.items.IItemHandler
    • getSlotLimit

      public int getSlotLimit(int slot)
      指定者:
      getSlotLimit 在接口中 net.minecraftforge.items.IItemHandler
    • isItemValid

      public boolean isItemValid(int slot, @NotNull @NotNull net.minecraft.world.item.ItemStack stack)
      指定者:
      isItemValid 在接口中 net.minecraftforge.items.IItemHandler
    • onContentsChanged

      protected void onContentsChanged(int slot)
    • getStacks

      @NotNull public @NotNull net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getStacks()
    • setOutputSlots

      public void setOutputSlots(int... slots)
    • setDefaultSlotLimit

      public void setDefaultSlotLimit(int size)
    • addSlotLimit

      public void addSlotLimit(int slot, int size)
    • toIInventory

      public net.minecraft.world.Container toIInventory()
    • copy

      public ItemStackWrapper copy()
    • insertItemSuper

      public net.minecraft.world.item.ItemStack insertItemSuper(int slot, net.minecraft.world.item.ItemStack stack, boolean simulate)
    • extractItemSuper

      public net.minecraft.world.item.ItemStack extractItemSuper(int slot, int amount, boolean simulate)
    • getStackLimit

      protected int getStackLimit(int slot, @NotNull @NotNull net.minecraft.world.item.ItemStack stack)
    • validateSlotIndex

      protected void validateSlotIndex(int slot)