Modding:TreeAttribute: Difference between revisions

From Vintage Story Wiki
m
formatting
No edit summary
m (formatting)
Line 1: Line 1:
A TreeAttribute is a nested data structure whose primary purpose is to store data. It can hold generic data for most primitives, such as int, string, float, as well as more complex types like ItemStacks and other TreeAttributes (hence a nested structure).  
A TreeAttribute is a nested data structure whose primary purpose is to store data. It can hold generic data for most primitives, such as int, string, float, as well as more complex types like ItemStacks and other TreeAttributes (hence a nested structure).  


Additionally you can store data as byte[] if it is not supported by the TreeAttribute itself (for this you could use <code>Vintagestory.API.Util.SerializerUtil</code>).
Additionally you can store data as <code>byte[]</code> if it is not supported by the TreeAttribute itself (for this you could use <code>Vintagestory.API.Util.SerializerUtil</code>).
Attributes are written and read via keys.  
Attributes are written and read via keys.  


Confirmedusers, Bureaucrats, editor, Administrators
1,522

edits