From 4066a7b5b6a835ab52400e66ca74bba7822a88d0 Mon Sep 17 00:00:00 2001 From: FlorianMichael Date: Sat, 19 Oct 2024 14:43:43 +0200 Subject: [PATCH] Mark serializer versions in ComponentRewriter as nullable --- .../viaversion/viaversion/rewriter/ComponentRewriter.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 0deb42101..853e0bc4f 100644 --- a/common/src/main/java/com/viaversion/viaversion/rewriter/ComponentRewriter.java +++ b/common/src/main/java/com/viaversion/viaversion/rewriter/ComponentRewriter.java @@ -486,16 +486,16 @@ public class ComponentRewriter implements com.v } } - protected SerializerVersion inputSerializerVersion() { + protected @Nullable SerializerVersion inputSerializerVersion() { return null; } - protected SerializerVersion outputSerializerVersion() { + protected @Nullable SerializerVersion outputSerializerVersion() { return inputSerializerVersion(); // Only matters if the nbt serializer changed } private void convertLegacyContents(final CompoundTag hoverEvent) { - if (inputSerializerVersion() == null || outputSerializerVersion() == null) { + if (inputSerializerVersion() == null) { return; }