From 1f3555df4a8907f73907ff6f61198681af5b8219 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Sat, 27 Jan 2024 21:04:32 +0100 Subject: [PATCH] Put books through component conversion in 1.20.3->1.20.2 --- .../BlockItemPacketRewriter1_20_3.java | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_2to1_20_3/rewriter/BlockItemPacketRewriter1_20_3.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_2to1_20_3/rewriter/BlockItemPacketRewriter1_20_3.java index 98d1f5d1..4960d98d 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_2to1_20_3/rewriter/BlockItemPacketRewriter1_20_3.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_2to1_20_3/rewriter/BlockItemPacketRewriter1_20_3.java @@ -21,15 +21,23 @@ import com.viaversion.viabackwards.ViaBackwards; import com.viaversion.viabackwards.api.rewriters.ItemRewriter; import com.viaversion.viabackwards.protocol.protocol1_20_2to1_20_3.Protocol1_20_2To1_20_3; import com.viaversion.viaversion.api.data.ParticleMappings; +import com.viaversion.viaversion.api.minecraft.item.Item; import com.viaversion.viaversion.api.protocol.packet.PacketWrapper; import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers; import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_20_2; import com.viaversion.viaversion.api.type.types.version.Types1_20_3; +import com.viaversion.viaversion.libs.gson.JsonElement; +import com.viaversion.viaversion.libs.opennbt.tag.builtin.CompoundTag; +import com.viaversion.viaversion.libs.opennbt.tag.builtin.ListTag; +import com.viaversion.viaversion.libs.opennbt.tag.builtin.StringTag; +import com.viaversion.viaversion.libs.opennbt.tag.builtin.Tag; import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.packet.ServerboundPackets1_20_2; import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.packet.ClientboundPackets1_20_3; import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.rewriter.RecipeRewriter1_20_3; import com.viaversion.viaversion.rewriter.BlockRewriter; +import com.viaversion.viaversion.util.ComponentUtil; +import org.checkerframework.checker.nullness.qual.Nullable; public final class BlockItemPacketRewriter1_20_3 extends ItemRewriter { @@ -155,4 +163,33 @@ public final class BlockItemPacketRewriter1_20_3 extends ItemRewriter