This commit is contained in:
creeper123123321 2019-04-21 15:57:40 -03:00
parent b2352105e6
commit 3a4db0a675
No known key found for this signature in database
GPG Key ID: 0AC57D54786721D1

View File

@ -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)));
}