From b77d0fedd9dcf3306a30f5a3f95e2121d9fac9c9 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Sun, 9 Jun 2024 13:05:52 +0200 Subject: [PATCH] Remove no longer needed empty item check in entity data Also fixes bad null values being set there --- .../rewriter/EntityPacketRewriter1_20_5.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/v1_20_3to1_20_5/rewriter/EntityPacketRewriter1_20_5.java b/common/src/main/java/com/viaversion/viaversion/protocols/v1_20_3to1_20_5/rewriter/EntityPacketRewriter1_20_5.java index 464025442..5bb12877c 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/v1_20_3to1_20_5/rewriter/EntityPacketRewriter1_20_5.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/v1_20_3to1_20_5/rewriter/EntityPacketRewriter1_20_5.java @@ -419,14 +419,6 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter protocol.getComponentRewriter().processTag(event.user(), meta.value())); filter().dataType(Types1_20_5.ENTITY_DATA_TYPES.optionalComponentType).handler((event, meta) -> protocol.getComponentRewriter().processTag(event.user(), meta.value())); - filter().dataType(Types1_20_5.ENTITY_DATA_TYPES.itemType).handler((event, meta) -> { - final Item item = meta.value(); - if (item != null && item.amount() <= 0) { - // No longer accepted by the client, needs to be properly empty - meta.setValue(null); - } - }); - filter().type(EntityTypes1_20_5.LIVING_ENTITY).index(10).handler((event, meta) -> { final int effectColor = meta.value(); if (effectColor == 0) {