Add logic for retrieving and mutating villager+house pairs

This commit is contained in:
Kurt
2021-02-06 15:10:41 -08:00
parent 6fc686c910
commit 9638ea6f45
5 changed files with 104 additions and 1 deletions

View File

@@ -10,7 +10,11 @@ public class GSaveMemory : IVillagerOrigin
public GSaveMemory(byte[] data) => Data = data;
public GSavePlayerId PlayerId => Data.Slice(0, GSavePlayerId.SIZE).ToStructure<GSavePlayerId>();
public GSavePlayerId PlayerId
{
get => Data.Slice(0, GSavePlayerId.SIZE).ToStructure<GSavePlayerId>();
set => value.ToBytes().CopyTo(Data, 0);
}
public uint TownID
{