protected override void Serialize(ValuedSlimeTrait <T> trait, CompoundDataPiece piece) { piece.SetValue("value", trait.Value); }
protected override bool TraitNeedsToBeSaved(ValuedSlimeTrait <T> trait) => true;
protected override void Deserialize(ValuedSlimeTrait <T> trait, CompoundDataPiece piece) { trait.Value = piece.GetValue <T>("value"); }