Expose EntityRewriterBase#alwaysShowOriginalMobName (#705)

This commit is contained in:
EnZaXD 2024-03-27 16:48:35 +01:00 committed by GitHub
parent 4e856ef396
commit 9d1a5a05f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -103,12 +103,16 @@ public abstract class EntityRewriterBase<C extends ClientboundPacketType, T exte
}
private void addDisplayVisibilityMeta(List<Metadata> metadataList) {
if (ViaBackwards.getConfig().alwaysShowOriginalMobName()) {
if (alwaysShowOriginalMobName()) {
removeMeta(displayVisibilityIndex, metadataList);
metadataList.add(new Metadata(displayVisibilityIndex, displayVisibilityMetaType, true));
}
}
protected boolean alwaysShowOriginalMobName() {
return ViaBackwards.getConfig().alwaysShowOriginalMobName();
}
protected @Nullable Metadata getMeta(int metaIndex, List<Metadata> metadataList) {
for (Metadata metadata : metadataList) {
if (metadata.id() == metaIndex) {