public override void NetRecieve(BinaryReader reader) { TurtleInfo tInfo = new TurtleInfo // The reason I have to create a new object is because it's a struct, and so we're operating on a copy of the object rather than a reference. { Width = reader.ReadUInt16(), Height = reader.ReadUInt16(), Direction = reader.ReadByte(), PickaxePower = reader.ReadInt32(), PickaxeSpeed = reader.ReadInt32() }; TurtleInfo = tInfo; }
public override void Load(TagCompound tag) { TurtleInfo = tag.Get <TurtleInfo>("TurtleInfo"); }