diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/v1_20_3to1_20_5/rewriter/BlockItemPacketRewriter1_20_5.java b/common/src/main/java/com/viaversion/viaversion/protocols/v1_20_3to1_20_5/rewriter/BlockItemPacketRewriter1_20_5.java index 05570efb8..c11d0aad8 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/v1_20_3to1_20_5/rewriter/BlockItemPacketRewriter1_20_5.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/v1_20_3to1_20_5/rewriter/BlockItemPacketRewriter1_20_5.java @@ -81,7 +81,6 @@ import com.viaversion.viaversion.api.type.types.version.Types1_20_3; import com.viaversion.viaversion.api.type.types.version.Types1_20_5; import com.viaversion.viaversion.protocols.v1_20_2to1_20_3.packet.ClientboundPacket1_20_3; import com.viaversion.viaversion.protocols.v1_20_2to1_20_3.packet.ClientboundPackets1_20_3; -import com.viaversion.viaversion.protocols.v1_20_2to1_20_3.rewriter.RecipeRewriter1_20_3; import com.viaversion.viaversion.protocols.v1_20_3to1_20_5.Protocol1_20_3To1_20_5; import com.viaversion.viaversion.protocols.v1_20_3to1_20_5.data.Attributes1_20_5; import com.viaversion.viaversion.protocols.v1_20_3to1_20_5.data.BannerPatterns1_20_5; @@ -603,9 +602,10 @@ public final class BlockItemPacketRewriter1_20_5 extends ItemRewriter tagRewriter = new TagRewriter<>(this); private final ComponentRewriter1_21_2 componentRewriter = new ComponentRewriter1_21_2(this); + private final SoundRewriter soundRewriter = new SoundRewriter<>(this); public Protocol1_21To1_21_2() { super(ClientboundPacket1_21.class, ClientboundPacket1_21_2.class, ServerboundPacket1_20_5.class, ServerboundPacket1_21_2.class); @@ -94,7 +95,6 @@ public final class Protocol1_21To1_21_2 extends AbstractProtocol soundRewriter = new SoundRewriter<>(this); soundRewriter.registerSound1_19_3(ClientboundPackets1_21.SOUND); soundRewriter.registerSound1_19_3(ClientboundPackets1_21.SOUND_ENTITY); @@ -280,6 +280,10 @@ public final class Protocol1_21To1_21_2 extends AbstractProtocol getSoundRewriter() { + return soundRewriter; + } + @Override protected PacketTypesProvider createPacketTypesProvider() { return new SimplePacketTypesProvider<>( diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/v1_21to1_21_2/rewriter/BlockItemPacketRewriter1_21_2.java b/common/src/main/java/com/viaversion/viaversion/protocols/v1_21to1_21_2/rewriter/BlockItemPacketRewriter1_21_2.java index a545720f6..f4049bc0d 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/v1_21to1_21_2/rewriter/BlockItemPacketRewriter1_21_2.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/v1_21to1_21_2/rewriter/BlockItemPacketRewriter1_21_2.java @@ -60,7 +60,6 @@ import com.viaversion.viaversion.protocols.v1_21to1_21_2.packet.ServerboundPacke import com.viaversion.viaversion.protocols.v1_21to1_21_2.storage.BundleStateTracker; import com.viaversion.viaversion.protocols.v1_21to1_21_2.storage.ChunkLoadTracker; import com.viaversion.viaversion.rewriter.BlockRewriter; -import com.viaversion.viaversion.rewriter.SoundRewriter; import com.viaversion.viaversion.rewriter.StructuredItemRewriter; import com.viaversion.viaversion.util.ComponentUtil; import com.viaversion.viaversion.util.Key; @@ -238,7 +237,7 @@ public final class BlockItemPacketRewriter1_21_2 extends StructuredItemRewriter< wrapper.write(Types1_21_2.PARTICLE, smallExplosionParticle); } - new SoundRewriter<>(protocol).soundHolderHandler().handle(wrapper); + protocol.getSoundRewriter().soundHolderHandler().handle(wrapper); }); protocol.registerClientbound(ClientboundPackets1_21.UPDATE_RECIPES, wrapper -> {