public abstract class MixinItemStack extends Object implements org.spongepowered.api.item.inventory.ItemStack, IMixinItemStack, IMixinCustomDataHolder
Modifier and Type | Field and Description |
---|---|
int |
stackSize |
Constructor and Description |
---|
MixinItemStack() |
Modifier and Type | Method and Description |
---|---|
org.spongepowered.api.item.inventory.ItemStack |
copy() |
org.spongepowered.api.item.inventory.ItemStackSnapshot |
createSnapshot() |
Collection<org.spongepowered.api.data.manipulator.DataManipulator<?,?>> |
getContainers() |
<T extends org.spongepowered.api.data.manipulator.DataManipulator<?,?>> |
getCustom(Class<T> customClass) |
List<org.spongepowered.api.data.manipulator.DataManipulator<?,?>> |
getCustomManipulators() |
org.spongepowered.api.item.ItemType |
getItem() |
abstract int |
getItemDamage() |
int |
getMaxStackQuantity() |
abstract int |
getMaxStackSize() |
int |
getQuantity() |
abstract net.minecraft.nbt.NBTTagCompound |
getSubCompound(String key,
boolean create) |
abstract net.minecraft.nbt.NBTTagCompound |
getTagCompound() |
org.spongepowered.api.text.translation.Translation |
getTranslation() |
boolean |
hasManipulators() |
abstract boolean |
hasTagCompound() |
org.spongepowered.api.data.DataTransactionResult |
offerCustom(org.spongepowered.api.data.manipulator.DataManipulator<?,?> manipulator,
org.spongepowered.api.data.merge.MergeFunction function) |
<E> org.spongepowered.api.data.DataTransactionResult |
offerCustom(org.spongepowered.api.data.key.Key<? extends org.spongepowered.api.data.value.BaseValue<E>> key,
E value) |
void |
readFromNbt(net.minecraft.nbt.NBTTagCompound compound)
Read extra data (SpongeData) from the entity's NBT tag.
|
org.spongepowered.api.data.DataTransactionResult |
removeCustom(Class<? extends org.spongepowered.api.data.manipulator.DataManipulator<?,?>> customClass) |
org.spongepowered.api.data.DataTransactionResult |
removeCustom(org.spongepowered.api.data.key.Key<?> key) |
abstract void |
setItemDamage(int meta) |
void |
setQuantity(int quantity) |
void |
setRawData(org.spongepowered.api.data.DataContainer container) |
abstract void |
setTagCompound(net.minecraft.nbt.NBTTagCompound compound) |
abstract void |
setTagInfo(String key,
net.minecraft.nbt.NBTBase nbtBase) |
abstract net.minecraft.item.ItemStack |
shadow$copy() |
abstract net.minecraft.item.Item |
shadow$getItem() |
org.spongepowered.api.data.DataContainer |
toContainer() |
org.spongepowered.api.text.Text |
toText() |
boolean |
validateRawData(org.spongepowered.api.data.DataContainer container) |
void |
writeToNbt(net.minecraft.nbt.NBTTagCompound compound)
Write extra data (SpongeData) to the entity's NBT tag.
|
abstract net.minecraft.nbt.NBTTagCompound |
writeToNBT(net.minecraft.nbt.NBTTagCompound compound) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getApplicableProperties, getProperty
public abstract void setItemDamage(int meta)
public abstract void setTagCompound(net.minecraft.nbt.NBTTagCompound compound)
public abstract void setTagInfo(String key, net.minecraft.nbt.NBTBase nbtBase)
public abstract int getItemDamage()
public abstract int getMaxStackSize()
public abstract boolean hasTagCompound()
public abstract net.minecraft.nbt.NBTTagCompound getTagCompound()
public abstract net.minecraft.nbt.NBTTagCompound getSubCompound(String key, boolean create)
public abstract net.minecraft.nbt.NBTTagCompound writeToNBT(net.minecraft.nbt.NBTTagCompound compound)
public abstract net.minecraft.item.ItemStack shadow$copy()
public abstract net.minecraft.item.Item shadow$getItem()
public org.spongepowered.api.item.ItemType getItem()
getItem
in interface org.spongepowered.api.item.inventory.ItemStack
public int getQuantity()
getQuantity
in interface org.spongepowered.api.item.inventory.ItemStack
public void setQuantity(int quantity) throws IllegalArgumentException
setQuantity
in interface org.spongepowered.api.item.inventory.ItemStack
IllegalArgumentException
public int getMaxStackQuantity()
getMaxStackQuantity
in interface org.spongepowered.api.item.inventory.ItemStack
public boolean validateRawData(org.spongepowered.api.data.DataContainer container)
validateRawData
in interface org.spongepowered.api.data.DataHolder
public void setRawData(org.spongepowered.api.data.DataContainer container) throws org.spongepowered.api.service.persistence.InvalidDataException
setRawData
in interface org.spongepowered.api.data.DataHolder
org.spongepowered.api.service.persistence.InvalidDataException
public org.spongepowered.api.item.inventory.ItemStack copy()
copy
in interface org.spongepowered.api.data.value.ValueContainer<org.spongepowered.api.data.DataHolder>
copy
in interface org.spongepowered.api.item.inventory.ItemStack
public org.spongepowered.api.data.DataContainer toContainer()
toContainer
in interface org.spongepowered.api.data.DataSerializable
public org.spongepowered.api.text.translation.Translation getTranslation()
getTranslation
in interface org.spongepowered.api.text.translation.Translatable
public org.spongepowered.api.text.Text toText()
toText
in interface org.spongepowered.api.text.TextRepresentable
public org.spongepowered.api.item.inventory.ItemStackSnapshot createSnapshot()
createSnapshot
in interface org.spongepowered.api.item.inventory.ItemStack
public Collection<org.spongepowered.api.data.manipulator.DataManipulator<?,?>> getContainers()
getContainers
in interface org.spongepowered.api.data.value.mutable.CompositeValueStore<org.spongepowered.api.data.DataHolder,org.spongepowered.api.data.manipulator.DataManipulator<?,?>>
public void readFromNbt(net.minecraft.nbt.NBTTagCompound compound)
IMixinItemStack
readFromNbt
in interface IMixinItemStack
compound
- The SpongeData compound to read frompublic void writeToNbt(net.minecraft.nbt.NBTTagCompound compound)
IMixinItemStack
writeToNbt
in interface IMixinItemStack
compound
- The SpongeData compound to write topublic org.spongepowered.api.data.DataTransactionResult offerCustom(org.spongepowered.api.data.manipulator.DataManipulator<?,?> manipulator, org.spongepowered.api.data.merge.MergeFunction function)
offerCustom
in interface IMixinCustomDataHolder
public <T extends org.spongepowered.api.data.manipulator.DataManipulator<?,?>> Optional<T> getCustom(Class<T> customClass)
getCustom
in interface IMixinCustomDataHolder
public org.spongepowered.api.data.DataTransactionResult removeCustom(Class<? extends org.spongepowered.api.data.manipulator.DataManipulator<?,?>> customClass)
removeCustom
in interface IMixinCustomDataHolder
public boolean hasManipulators()
hasManipulators
in interface IMixinCustomDataHolder
public List<org.spongepowered.api.data.manipulator.DataManipulator<?,?>> getCustomManipulators()
getCustomManipulators
in interface IMixinCustomDataHolder
public <E> org.spongepowered.api.data.DataTransactionResult offerCustom(org.spongepowered.api.data.key.Key<? extends org.spongepowered.api.data.value.BaseValue<E>> key, E value)
offerCustom
in interface IMixinCustomDataHolder
public org.spongepowered.api.data.DataTransactionResult removeCustom(org.spongepowered.api.data.key.Key<?> key)
removeCustom
in interface IMixinCustomDataHolder