From d43ad37663c470ba56540c60c9fe8adcc4621bb1 Mon Sep 17 00:00:00 2001 From: EnZaXD Date: Thu, 6 Jun 2024 19:30:03 +0200 Subject: [PATCH] Add missing conditions to 1.20.5 item type writing (#3913) --- .../viaversion/api/type/types/item/ItemType1_20_5.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/com/viaversion/viaversion/api/type/types/item/ItemType1_20_5.java b/api/src/main/java/com/viaversion/viaversion/api/type/types/item/ItemType1_20_5.java index 021de65d4..2feef8b41 100644 --- a/api/src/main/java/com/viaversion/viaversion/api/type/types/item/ItemType1_20_5.java +++ b/api/src/main/java/com/viaversion/viaversion/api/type/types/item/ItemType1_20_5.java @@ -82,7 +82,7 @@ public class ItemType1_20_5 extends Type { @Override public void write(final ByteBuf buffer, @Nullable final Item object) { - if (object == null) { + if (object == null || object.identifier() == 0 || object.amount() <= 0) { Types.VAR_INT.writePrimitive(buffer, 0); return; }