From 56737c1c28e4b52bf8404922021b957a5128314b Mon Sep 17 00:00:00 2001 From: Sollace Date: Wed, 24 May 2023 19:19:53 +0100 Subject: [PATCH] Fixed players' race not updating when it's disallowed --- .../minelittlepony/unicopia/entity/player/Pony.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 4d1822cb..2e87ae8e 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/player/Pony.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/player/Pony.java @@ -451,6 +451,16 @@ public class Pony extends Living implements Copyable, Update @Override public void tick() { super.tick(); + + Race currentRace = getActualSpecies(); + if (!currentRace.isUnset()) { + Race newRace = currentRace.validate(entity); + + if (newRace != currentRace) { + setSpecies(newRace); + } + } + sendCapabilities(); }