From 71313b475308d6a85a9f8b6274eaad93121ae3cd Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Mon, 6 May 2024 09:42:49 +0200 Subject: [PATCH] Simplify raider check in 1.13->1.14 entity data handler --- .../metadata/MetadataRewriter1_14To1_13_2.java | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_14to1_13_2/metadata/MetadataRewriter1_14To1_13_2.java b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_14to1_13_2/metadata/MetadataRewriter1_14To1_13_2.java index 2d0805da6..58126668e 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_14to1_13_2/metadata/MetadataRewriter1_14To1_13_2.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_14to1_13_2/metadata/MetadataRewriter1_14To1_13_2.java @@ -59,7 +59,7 @@ public class MetadataRewriter1_14To1_13_2 extends EntityRewriter 16) { @@ -143,7 +143,7 @@ public class MetadataRewriter1_14To1_13_2 extends EntityRewriter { - 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