From f91a25cba7fa2725b6ebe69ca6065076a8394603 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Sun, 16 Jun 2024 10:22:37 +0200 Subject: [PATCH] Make sure we have block mappings before trying to apply them --- .../BackwardsStructuredItemRewriter.java | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/com/viaversion/viabackwards/api/rewriters/BackwardsStructuredItemRewriter.java b/common/src/main/java/com/viaversion/viabackwards/api/rewriters/BackwardsStructuredItemRewriter.java index fe65e04a..b941ce31 100644 --- a/common/src/main/java/com/viaversion/viabackwards/api/rewriters/BackwardsStructuredItemRewriter.java +++ b/common/src/main/java/com/viaversion/viabackwards/api/rewriters/BackwardsStructuredItemRewriter.java @@ -34,6 +34,7 @@ import com.viaversion.viaversion.api.minecraft.item.Item; import com.viaversion.viaversion.api.protocol.packet.ClientboundPacketType; import com.viaversion.viaversion.api.protocol.packet.ServerboundPacketType; import com.viaversion.viaversion.api.type.Type; +import com.viaversion.viaversion.libs.fastutil.ints.Int2IntFunction; import com.viaversion.viaversion.rewriter.StructuredItemRewriter; import java.util.ArrayList; import java.util.List; @@ -83,6 +84,13 @@ public class BackwardsStructuredItemRewriter