From 3a4db0a6750cd71893c20f024556b866e10fbb67 Mon Sep 17 00:00:00 2001 From: creeper123123321 Date: Sun, 21 Apr 2019 15:57:40 -0300 Subject: [PATCH] fixed --- .../protocols/protocol1_14to1_13_2/MetadataRewriter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/MetadataRewriter.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/MetadataRewriter.java index a5cb3dc46..330ee6887 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/MetadataRewriter.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/MetadataRewriter.java @@ -101,7 +101,7 @@ public class MetadataRewriter { metadata.setMetaType(MetaType1_14.OptVarInt); } } else if (type.isOrHasParent(Entity1_14Types.EntityType.ABSTRACT_SKELETON)) { - if (metadata.getId() == 12) { + if (metadata.getId() == 14) { tracker.setInsentientData(entityId, (byte) ((tracker.getInsentientData(entityId) & ~0x4) | ((boolean) metadata.getValue() ? 0x4 : 0))); // New attacking metadatas.remove(metadata); // "Is swinging arms" @@ -126,7 +126,7 @@ public class MetadataRewriter { if (type.isOrHasParent(Entity1_14Types.EntityType.ABSTRACT_ILLAGER_BASE)) { if (metadata.getId() == 14) { tracker.setInsentientData(entityId, (byte) ((tracker.getInsentientData(entityId) & ~0x4) - | ((boolean) metadata.getValue() ? 0x4 : 0))); // New attacking + | (((Number) metadata.getValue()).byteValue() != 0 ? 0x4 : 0))); // New attacking metadatas.remove(metadata); // "Has target (aggressive state)" metadatas.add(new Metadata(13, MetaType1_14.Byte, tracker.getInsentientData(entityId))); }