mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
Don't send advancement counter data to the client (it doesn't need it)
This commit is contained in:
parent
2ce52b3a0f
commit
3297480b3f
1 changed files with 2 additions and 2 deletions
|
@ -848,6 +848,7 @@ public class Pony extends Living<PlayerEntity> implements Copyable<Pony>, Update
|
||||||
compound.put("mana", mana.toNBT(lookup));
|
compound.put("mana", mana.toNBT(lookup));
|
||||||
compound.putInt("levels", levels.get());
|
compound.putInt("levels", levels.get());
|
||||||
compound.putInt("corruption", corruption.get());
|
compound.putInt("corruption", corruption.get());
|
||||||
|
compound.put("advancementTriggerCounts", NbtSerialisable.encode(TriggerCountTracker.CODEC, advancementProgress, lookup));
|
||||||
super.toNBT(compound, lookup);
|
super.toNBT(compound, lookup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -856,6 +857,7 @@ public class Pony extends Living<PlayerEntity> implements Copyable<Pony>, Update
|
||||||
levels.set(compound.getInt("levels"));
|
levels.set(compound.getInt("levels"));
|
||||||
corruption.set(compound.getInt("corruption"));
|
corruption.set(compound.getInt("corruption"));
|
||||||
mana.fromNBT(compound.getCompound("mana"), lookup);
|
mana.fromNBT(compound.getCompound("mana"), lookup);
|
||||||
|
advancementProgress = NbtSerialisable.decode(TriggerCountTracker.CODEC, compound.get("advancementTriggerCounts"), lookup).orElseGet(() -> new TriggerCountTracker(Map.of()));
|
||||||
super.fromNBT(compound, lookup);
|
super.fromNBT(compound, lookup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -874,7 +876,6 @@ public class Pony extends Living<PlayerEntity> implements Copyable<Pony>, Update
|
||||||
compound.put("discoveries", discoveries.toNBT(lookup));
|
compound.put("discoveries", discoveries.toNBT(lookup));
|
||||||
compound.putInt("ticksInvulnerable", ticksInvulnerable);
|
compound.putInt("ticksInvulnerable", ticksInvulnerable);
|
||||||
compound.putInt("ticksMetamorphising", ticksMetamorphising);
|
compound.putInt("ticksMetamorphising", ticksMetamorphising);
|
||||||
compound.put("advancementTriggerCounts", NbtSerialisable.encode(TriggerCountTracker.CODEC, advancementProgress, lookup));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -892,7 +893,6 @@ public class Pony extends Living<PlayerEntity> implements Copyable<Pony>, Update
|
||||||
ticksInSun = compound.getInt("ticksInSun");
|
ticksInSun = compound.getInt("ticksInSun");
|
||||||
hasShades = compound.getBoolean("hasShades");
|
hasShades = compound.getBoolean("hasShades");
|
||||||
ticksMetamorphising = compound.getInt("ticksMetamorphising");
|
ticksMetamorphising = compound.getInt("ticksMetamorphising");
|
||||||
advancementProgress = NbtSerialisable.decode(TriggerCountTracker.CODEC, compound.get("advancementTriggerCounts"), lookup).orElseGet(() -> new TriggerCountTracker(Map.of()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue