diff --git a/api/src/main/java/com/viaversion/viaversion/api/protocol/version/ProtocolVersion.java b/api/src/main/java/com/viaversion/viaversion/api/protocol/version/ProtocolVersion.java index 0c7bf63e6..eb9ee2959 100644 --- a/api/src/main/java/com/viaversion/viaversion/api/protocol/version/ProtocolVersion.java +++ b/api/src/main/java/com/viaversion/viaversion/api/protocol/version/ProtocolVersion.java @@ -85,7 +85,7 @@ public class ProtocolVersion { public static final ProtocolVersion v1_19_4 = register(762, "1.19.4"); public static final ProtocolVersion v1_20 = register(763, "1.20/1.20.1", new VersionRange("1.20", 0, 1)); public static final ProtocolVersion v1_20_2 = register(764, "1.20.2"); - public static final ProtocolVersion v1_20_3 = register(765, 154, "1.20.3"); + public static final ProtocolVersion v1_20_3 = register(765, 156, "1.20.3"); public static final ProtocolVersion unknown = register(-1, "UNKNOWN"); public static ProtocolVersion register(int version, String name) { diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_20_3to1_20_2/Protocol1_20_3To1_20_2.java b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_20_3to1_20_2/Protocol1_20_3To1_20_2.java index 4b5d649a1..7bc393021 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_20_3to1_20_2/Protocol1_20_3To1_20_2.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_20_3to1_20_2/Protocol1_20_3To1_20_2.java @@ -37,6 +37,8 @@ import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.connection.UserConnection; +import com.viaversion.viaversion.api.data.MappingData; +import com.viaversion.viaversion.api.data.MappingDataBase; import com.viaversion.viaversion.api.minecraft.entities.Entity1_19_4Types; import com.viaversion.viaversion.api.protocol.AbstractProtocol; import com.viaversion.viaversion.api.protocol.packet.ClientboundPacketType; @@ -53,7 +55,7 @@ import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.packet.Clientbou import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.packet.ServerboundConfigurationPackets1_20_2; import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.packet.ServerboundPackets1_20_2; import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.rewriter.EntityPacketRewriter1_20_3; -import com.viaversion.viaversion.util.GsonUtil; +import com.viaversion.viaversion.rewriter.SoundRewriter; import java.util.BitSet; import java.util.Map; import java.util.UUID; @@ -61,6 +63,7 @@ import org.checkerframework.checker.nullness.qual.Nullable; public final class Protocol1_20_3To1_20_2 extends AbstractProtocol { + public static final MappingData MAPPINGS = new MappingDataBase("1.20.2", "1.20.3"); private final EntityPacketRewriter1_20_3 entityRewriter = new EntityPacketRewriter1_20_3(this); public Protocol1_20_3To1_20_2() { @@ -71,6 +74,10 @@ public final class Protocol1_20_3To1_20_2 extends AbstractProtocol soundRewriter = new SoundRewriter<>(this); + soundRewriter.register1_19_3Sound(ClientboundPackets1_20_2.SOUND); + soundRewriter.registerEntitySound(ClientboundPackets1_20_2.ENTITY_SOUND); + // Components are now (mostly) written as nbt instead of json strings registerClientbound(ClientboundPackets1_20_2.ADVANCEMENTS, wrapper -> { wrapper.passthrough(Type.BOOLEAN); // Reset/clear @@ -271,14 +278,10 @@ public final class Protocol1_20_3To1_20_2 extends AbstractProtocol