Fix 1.15->1.16 wolf anger

This commit is contained in:
kennytv 2021-08-14 10:37:21 +02:00
parent 9ee548b967
commit 7ffcff7a7b
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
2 changed files with 9 additions and 1 deletions

View File

@ -66,6 +66,14 @@ public class MetadataRewriter1_16To1_15_2 extends EntityRewriter<Protocol1_16To1
metadata.setId(metadata.id() - 1);
}
}
if (type == Entity1_16Types.WOLF) {
if (metadata.id() == 16) {
byte mask = metadata.value();
int angerTime = (mask & 0x02) != 0 ? Integer.MAX_VALUE : 0;
metadatas.add(new Metadata(20, MetaType1_16.VAR_INT, angerTime));
}
}
}
@Override

View File

@ -130,7 +130,7 @@ public abstract class EntityRewriter<T extends Protocol> extends RewriterBase<T>
}
if (event != null && event.extraMeta() != null) {
// Finally add newly created meta
// Finally, add newly created meta
metadataList.addAll(event.extraMeta());
}
i++;