9
0
mirror of https://github.com/GeyserExtensionists/GeyserUtils.git synced 2025-12-19 15:09:24 +00:00

add variant data

This commit is contained in:
zimzaza4
2024-07-22 01:38:11 +08:00
parent 8e2b5cd1fc
commit 2973fad195
3 changed files with 12 additions and 2 deletions

View File

@@ -470,6 +470,8 @@ public class GeyserUtils implements Extension {
if (customEntityDataPacket.getScale() != null) entity.getDirtyMetadata().put(EntityDataTypes.SCALE, customEntityDataPacket.getScale());
if (customEntityDataPacket.getColor() != null)
entity.getDirtyMetadata().put(EntityDataTypes.COLOR, Byte.parseByte(String.valueOf(getColor(customEntityDataPacket.getColor()))));
if (customEntityDataPacket.getVariant() != null)
entity.getDirtyMetadata().put(EntityDataTypes.VARIANT, customEntityDataPacket.getVariant());
entity.updateBedrockMetadata();
}
} else if (customPacket instanceof EntityPropertyPacket entityPropertyPacket) {