Fix horse variant color

Our old method broke with the 1.17.10 update.
This commit is contained in:
Camotoy 2021-08-01 19:14:01 -04:00
parent 3d50155ee3
commit 20b183ddda
No known key found for this signature in database
GPG key ID: 7EEFB66FE798081F

View file

@ -40,7 +40,7 @@ public class HorseEntity extends AbstractHorseEntity {
@Override @Override
public void updateBedrockMetadata(EntityMetadata entityMetadata, GeyserSession session) { public void updateBedrockMetadata(EntityMetadata entityMetadata, GeyserSession session) {
if (entityMetadata.getId() == 19) { if (entityMetadata.getId() == 19) {
metadata.put(EntityData.VARIANT, entityMetadata.getValue()); metadata.put(EntityData.VARIANT, ((int) entityMetadata.getValue()) & 255);
metadata.put(EntityData.MARK_VARIANT, (((int) entityMetadata.getValue()) >> 8) % 5); metadata.put(EntityData.MARK_VARIANT, (((int) entityMetadata.getValue()) >> 8) % 5);
} }
super.updateBedrockMetadata(entityMetadata, session); super.updateBedrockMetadata(entityMetadata, session);