From 1c339e8b54c81669836f278e83051c34a58f46d1 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Fri, 11 Oct 2024 19:37:35 +0200 Subject: [PATCH] Null check input serializer version Fixes ViaVersion/ViaBackwards#896 --- .../com/viaversion/viaversion/rewriter/ComponentRewriter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/com/viaversion/viaversion/rewriter/ComponentRewriter.java b/common/src/main/java/com/viaversion/viaversion/rewriter/ComponentRewriter.java index 59dd5a010..0070a0e74 100644 --- a/common/src/main/java/com/viaversion/viaversion/rewriter/ComponentRewriter.java +++ b/common/src/main/java/com/viaversion/viaversion/rewriter/ComponentRewriter.java @@ -360,7 +360,9 @@ public class ComponentRewriter implements com.v handleShowItem(connection, contentsTag, componentsTag); if (componentsTag != null) { handleContainerContents(connection, componentsTag); - handleWrittenBookContents(connection, componentsTag); + if (inputSerializerVersion() != null) { + handleWrittenBookContents(connection, componentsTag); + } handleItemArrayContents(connection, componentsTag, "bundle_contents"); handleItemArrayContents(connection, componentsTag, "charged_projectiles");