Fixed players' race not updating when it's disallowed

This commit is contained in:
Sollace 2023-05-24 19:19:53 +01:00
parent 8e76ac5db7
commit 56737c1c28

View file

@ -451,6 +451,16 @@ public class Pony extends Living<PlayerEntity> implements Copyable<Pony>, Update
@Override
public void tick() {
super.tick();
Race currentRace = getActualSpecies();
if (!currentRace.isUnset()) {
Race newRace = currentRace.validate(entity);
if (newRace != currentRace) {
setSpecies(newRace);
}
}
sendCapabilities();
}