类 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
-
字段概要
字段 -
构造器概要
构造器构造器说明ItemStackWrapper(int size) ItemStackWrapper(int size, int maxStackSize) ItemStackWrapper(int size, int maxStackSize, Runnable onContentsChanged) ItemStackWrapper(int size, Runnable onContentsChanged) ItemStackWrapper(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> size) ItemStackWrapper(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> stacks, int maxStackSize, Runnable onContentsChanged) ItemStackWrapper(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> stacks, Runnable onContentsChanged) -
方法概要
修饰符和类型方法说明voidaddSlotLimit(int slot, int size) copy()voiddeserializeNBT(net.minecraft.nbt.CompoundTag nbt) @NotNull net.minecraft.world.item.ItemStackextractItem(int slot, int amount, boolean simulate) net.minecraft.world.item.ItemStackextractItemSuper(int slot, int amount, boolean simulate) intgetSlotLimit(int slot) intgetSlots()@NotNull net.minecraft.world.item.ItemStackgetStackInSlot(int slot) protected intgetStackLimit(int slot, @NotNull net.minecraft.world.item.ItemStack stack) @NotNull net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack>@NotNull net.minecraft.world.item.ItemStackinsertItem(int slot, @NotNull net.minecraft.world.item.ItemStack stack, boolean simulate) net.minecraft.world.item.ItemStackinsertItemSuper(int slot, net.minecraft.world.item.ItemStack stack, boolean simulate) booleanisItemValid(int slot, @NotNull net.minecraft.world.item.ItemStack stack) protected voidonContentsChanged(int slot) net.minecraft.nbt.CompoundTagvoidsetDefaultSlotLimit(int size) voidsetOutputSlots(int... slots) voidsetSize(int size) voidsetStackInSlot(int slot, @NotNull net.minecraft.world.item.ItemStack stack) net.minecraft.world.Containerprotected voidvalidateSlotIndex(int slot)
-
字段详细资料
-
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
-
ItemStackWrapper
public ItemStackWrapper(int size, int maxStackSize) -
ItemStackWrapper
-
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
-
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)
-