From e1ba6e07c2969e2a0404ed69fde625034450e31a Mon Sep 17 00:00:00 2001 From: HugoDaBosss Date: Thu, 3 Mar 2016 12:20:19 +0100 Subject: [PATCH 1/2] Fix animals appearing as babies instead of parent --- .../java/us/myles/ViaVersion/metadata/MetadataRewriter.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/us/myles/ViaVersion/metadata/MetadataRewriter.java b/src/main/java/us/myles/ViaVersion/metadata/MetadataRewriter.java index 7a4d6770d..93d307303 100644 --- a/src/main/java/us/myles/ViaVersion/metadata/MetadataRewriter.java +++ b/src/main/java/us/myles/ViaVersion/metadata/MetadataRewriter.java @@ -86,7 +86,10 @@ public class MetadataRewriter { PacketUtil.writeString((String) value, output); break; case Boolean: - output.writeBoolean(((Byte) value).byteValue() != 0); + if(metaIndex == MetaIndex.AGEABLE_AGE) + output.writeBoolean(((Byte) value).byteValue() < 0); + else + output.writeBoolean(((Byte) value).byteValue() != 0); break; case Slot: PacketUtil.writeItem(value, output); From cc813545d8774bfc44c39e3715b63cda5c565b21 Mon Sep 17 00:00:00 2001 From: HugoDaBosss Date: Thu, 3 Mar 2016 12:22:54 +0100 Subject: [PATCH 2/2] Formatting --- .../us/myles/ViaVersion/metadata/MetadataRewriter.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/us/myles/ViaVersion/metadata/MetadataRewriter.java b/src/main/java/us/myles/ViaVersion/metadata/MetadataRewriter.java index 93d307303..1dad62f05 100644 --- a/src/main/java/us/myles/ViaVersion/metadata/MetadataRewriter.java +++ b/src/main/java/us/myles/ViaVersion/metadata/MetadataRewriter.java @@ -86,10 +86,10 @@ public class MetadataRewriter { PacketUtil.writeString((String) value, output); break; case Boolean: - if(metaIndex == MetaIndex.AGEABLE_AGE) - output.writeBoolean(((Byte) value).byteValue() < 0); - else - output.writeBoolean(((Byte) value).byteValue() != 0); + if(metaIndex == MetaIndex.AGEABLE_AGE) + output.writeBoolean(((Byte) value).byteValue() < 0); + else + output.writeBoolean(((Byte) value).byteValue() != 0); break; case Slot: PacketUtil.writeItem(value, output);