Class ItemstackAttribute
- Namespace
- Vintagestory.API.Datastructures
- Assembly
- VintagestoryAPI.dll
public class ItemstackAttribute : IAttribute, IHashWithIgnoredAttributes
- Inheritance
-
ItemstackAttribute
- Implements
- Inherited Members
- Extension Methods
Constructors
ItemstackAttribute()
public ItemstackAttribute()
ItemstackAttribute(ItemStack?)
public ItemstackAttribute(ItemStack? value)
Parameters
valueItemStack
Fields
value
public ItemStack value
Field Value
Methods
Clone()
public IAttribute Clone()
Returns
Equals(IWorldAccessor, IAttribute?)
public bool Equals(IWorldAccessor worldForResolve, IAttribute? attr)
Parameters
worldForResolveIWorldAccessorattrIAttribute
Returns
FromBytes(BinaryReader)
[Obsolete("Use the BinarySpanReader overload.", true)]
public void FromBytes(BinaryReader reader)
Parameters
readerBinaryReader
FromBytes(ref BinarySpanReader)
public void FromBytes(ref BinarySpanReader reader)
Parameters
readerBinarySpanReader
Remarks
Do not call this default implementation when overriding this method, it only exists for backwards compat.
GetAttributeId()
public int GetAttributeId()
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
GetHashCode(string[])
public int GetHashCode(string[] ignoredAttributes)
Parameters
ignoredAttributesstring[]
Returns
GetValue()
public object? GetValue()
Returns
SetValue(ItemStack)
public void SetValue(ItemStack newval)
Parameters
newvalItemStack
ToBytes(BinaryWriter)
public void ToBytes(BinaryWriter stream)
Parameters
streamBinaryWriter
ToJsonToken()
public string ToJsonToken()