From 126ee6e03f41e0488876734e14e31efe0bdd8a59 Mon Sep 17 00:00:00 2001 From: Myles Date: Tue, 8 Mar 2016 20:54:03 +0000 Subject: [PATCH] Formatting --- .../ViaVersion/metadata/MetadataRewriter.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/main/java/us/myles/ViaVersion/metadata/MetadataRewriter.java b/src/main/java/us/myles/ViaVersion/metadata/MetadataRewriter.java index bbc17cc52..a626dcc36 100644 --- a/src/main/java/us/myles/ViaVersion/metadata/MetadataRewriter.java +++ b/src/main/java/us/myles/ViaVersion/metadata/MetadataRewriter.java @@ -40,14 +40,16 @@ public class MetadataRewriter { if (metaIndex.getOldType() == Type.Int) { output.writeByte(((Integer) value).byteValue()); } - if (metaIndex == MetaIndex.ENTITY_STATUS && type == EntityType.PLAYER) { - output.writeByte(MetaIndex.PLAYER_HAND.getNewIndex()); - output.writeByte(MetaIndex.PLAYER_HAND.getNewType().getTypeID()); - if((((Byte)value) & 0x10) == 0x10) //Player eating/aiming/drinking - output.writeByte(1); //Using main hand - else - output.writeByte(0); //Not using any hand to stop animation - } + // After writing the last one + if (metaIndex == MetaIndex.ENTITY_STATUS && type == EntityType.PLAYER) { + output.writeByte(MetaIndex.PLAYER_HAND.getNewIndex()); + output.writeByte(MetaIndex.PLAYER_HAND.getNewType().getTypeID()); + if ((((Byte) value) & 0x10) == 0x10) { // Player eating/aiming/drinking + output.writeByte(1); // Using main hand + } else { + output.writeByte(0); // Not using any hand to stop animation + } + } break; case OptUUID: String owner = (String) value;