diff --git a/src/main/java/com/minelittlepony/unicopia/entity/player/Pony.java b/src/main/java/com/minelittlepony/unicopia/entity/player/Pony.java index 6d7e81ae..7479e037 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/player/Pony.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/player/Pony.java @@ -848,6 +848,7 @@ public class Pony extends Living implements Copyable, Update compound.put("mana", mana.toNBT(lookup)); compound.putInt("levels", levels.get()); compound.putInt("corruption", corruption.get()); + compound.put("advancementTriggerCounts", NbtSerialisable.encode(TriggerCountTracker.CODEC, advancementProgress, lookup)); super.toNBT(compound, lookup); } @@ -856,6 +857,7 @@ public class Pony extends Living implements Copyable, Update levels.set(compound.getInt("levels")); corruption.set(compound.getInt("corruption")); mana.fromNBT(compound.getCompound("mana"), lookup); + advancementProgress = NbtSerialisable.decode(TriggerCountTracker.CODEC, compound.get("advancementTriggerCounts"), lookup).orElseGet(() -> new TriggerCountTracker(Map.of())); super.fromNBT(compound, lookup); } @@ -874,7 +876,6 @@ public class Pony extends Living implements Copyable, Update compound.put("discoveries", discoveries.toNBT(lookup)); compound.putInt("ticksInvulnerable", ticksInvulnerable); compound.putInt("ticksMetamorphising", ticksMetamorphising); - compound.put("advancementTriggerCounts", NbtSerialisable.encode(TriggerCountTracker.CODEC, advancementProgress, lookup)); } @Override @@ -892,7 +893,6 @@ public class Pony extends Living implements Copyable, Update ticksInSun = compound.getInt("ticksInSun"); hasShades = compound.getBoolean("hasShades"); ticksMetamorphising = compound.getInt("ticksMetamorphising"); - advancementProgress = NbtSerialisable.decode(TriggerCountTracker.CODEC, compound.get("advancementTriggerCounts"), lookup).orElseGet(() -> new TriggerCountTracker(Map.of())); } @Override