3 using Vintagestory.API.Common;
4 using Vintagestory.API.Datastructures;
8 public class StatusData : IAttribute
10 public uint TotalUpdates { get; set; }
11 public uint VoidChunks { get; set; }
12 public uint Delta { get; set; }
15 public StatusData(uint totalUpdates, uint voidChunks, uint delta )
17 TotalUpdates = totalUpdates;
18 VoidChunks = voidChunks;
24 public void FromBytes(BinaryReader stream)
26 TotalUpdates = stream.ReadUInt32( );
27 VoidChunks = stream.ReadUInt32( );
28 Delta = stream.ReadUInt32( );
31 public int GetAttributeId( )
36 public object GetValue( )
41 public void ToBytes(BinaryWriter stream)
43 stream.Write(TotalUpdates);
44 stream.Write(VoidChunks);
48 public string ToJsonToken( )
50 return $"TotalUpdate:{TotalUpdates}, VoidChunks:{VoidChunks}, Delta:{Delta}";
53 public bool Equals(IWorldAccessor worldForResolve, IAttribute attr)
55 StatusData other = attr.GetValue( ) as StatusData;
57 if (this.TotalUpdates == other.TotalUpdates &&
58 this.VoidChunks == other.VoidChunks &&
59 this.Delta == other.Delta) {