API reference Obsidian.API.Entities
EntityDataField class
A synced data field of a plugin's entity type, like a field of vanilla's SynchedEntityData: a value per entity that the server sends modded Obsidian clients, read there through IClientEntity.Metadata at EntityDataField.Index. Make one with EntityDataFields, list it in EntityProperties.DataFields, and read and write it with IEntity.GetData and IEntity.SetData.
public abstract class EntityDataField
In Obsidian.API.
Remarks
Fields aren't saved, like vanilla's synced data: keep what must last in an attachment or saved data and set the field from it.
Properties
Index
public int Index { get; }The field's metadata index: after the fields vanilla sends for the type's kind (16 for a mob, 8 otherwise), in the order of EntityProperties.DataFields. Set when a type with the field is registered; -1 before.
Serializer
public EntityMetadataType Serializer { get; }Vanilla's serializer the value is written with, which the client reads it with.