3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-07-03 22:18:04 +02:00

Simplify raider check in 1.13->1.14 entity data handler

Dieser Commit ist enthalten in:
Nassim Jahnke 2024-05-06 09:42:49 +02:00
Ursprung 994bc8eefc
Commit 71313b4753
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F

Datei anzeigen

@ -167,14 +167,7 @@ public class MetadataRewriter1_14To1_13_2 extends EntityRewriter<ClientboundPack
filter().type(EntityTypes1_14.OCELOT).removeIndex(16); // owner uuid
filter().type(EntityTypes1_14.OCELOT).removeIndex(15); // data
filter().handler((event, meta) -> {
EntityType type = event.entityType();
if (type.is(EntityTypes1_14.WITCH) || type.is(EntityTypes1_14.RAVAGER) || type.isOrHasParent(EntityTypes1_14.ABSTRACT_ILLAGER_BASE)) {
if (meta.id() >= 14) { // 19w13 added a new boolean (raid participant - is celebrating) with id 14
meta.setId(meta.id() + 1);
}
}
});
filter().type(EntityTypes1_14.ABSTRACT_RAIDER).addIndex(14); // celebrating
}
@Override