From 58442ec17718903323c0a867704d0df937ef1f26 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Sun, 11 Dec 2022 14:40:34 +0100 Subject: [PATCH] 4.5.1 Release --- .../ServerboundPackets1_19_3.java | 38 +++++++++---------- .../viaversion/rewriter/SoundRewriter.java | 6 +-- gradle.properties | 2 +- 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_19_3to1_19_1/ServerboundPackets1_19_3.java b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_19_3to1_19_1/ServerboundPackets1_19_3.java index 2f035e9ba..f21ba0719 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_19_3to1_19_1/ServerboundPackets1_19_3.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_19_3to1_19_1/ServerboundPackets1_19_3.java @@ -53,25 +53,25 @@ public enum ServerboundPackets1_19_3 implements ServerboundPacketType { ENTITY_ACTION, // 0x1D STEER_VEHICLE, // 0x1E PONG, // 0x1F - CHAT_SESSION_UPDATE, - RECIPE_BOOK_DATA, // 0x20 - SEEN_RECIPE, // 0x21 - RENAME_ITEM, // 0x22 - RESOURCE_PACK_STATUS, // 0x23 - ADVANCEMENT_TAB, // 0x24 - SELECT_TRADE, // 0x25 - SET_BEACON_EFFECT, // 0x26 - HELD_ITEM_CHANGE, // 0x27 - UPDATE_COMMAND_BLOCK, // 0x28 - UPDATE_COMMAND_BLOCK_MINECART, // 0x29 - CREATIVE_INVENTORY_ACTION, // 0x2A - UPDATE_JIGSAW_BLOCK, // 0x2B - UPDATE_STRUCTURE_BLOCK, // 0x2C - UPDATE_SIGN, // 0x2D - ANIMATION, // 0x2E - SPECTATE, // 0x2F - PLAYER_BLOCK_PLACEMENT, // 0x30 - USE_ITEM; // 0x31 + CHAT_SESSION_UPDATE, // 0x20 + RECIPE_BOOK_DATA, // 0x21 + SEEN_RECIPE, // 0x22 + RENAME_ITEM, // 0x23 + RESOURCE_PACK_STATUS, // 0x24 + ADVANCEMENT_TAB, // 0x25 + SELECT_TRADE, // 0x26 + SET_BEACON_EFFECT, // 0x27 + HELD_ITEM_CHANGE, // 0x28 + UPDATE_COMMAND_BLOCK, // 0x29 + UPDATE_COMMAND_BLOCK_MINECART, // 0x2A + CREATIVE_INVENTORY_ACTION, // 0x2B + UPDATE_JIGSAW_BLOCK, // 0x2C + UPDATE_STRUCTURE_BLOCK, // 0x2D + UPDATE_SIGN, // 0x2E + ANIMATION, // 0x2F + SPECTATE, // 0x30 + PLAYER_BLOCK_PLACEMENT, // 0x31 + USE_ITEM; // 0x32 @Override public int getId() { diff --git a/common/src/main/java/com/viaversion/viaversion/rewriter/SoundRewriter.java b/common/src/main/java/com/viaversion/viaversion/rewriter/SoundRewriter.java index 955627695..9bb592ace 100644 --- a/common/src/main/java/com/viaversion/viaversion/rewriter/SoundRewriter.java +++ b/common/src/main/java/com/viaversion/viaversion/rewriter/SoundRewriter.java @@ -53,16 +53,14 @@ public class SoundRewriter { @Override public void registerMap() { handler(wrapper -> { - int soundId = wrapper.read(Type.VAR_INT); + final int soundId = wrapper.read(Type.VAR_INT); if (soundId == 0) { // Is followed by the resource loation wrapper.write(Type.VAR_INT, 0); return; } - // The id needs to be normalized - soundId--; - final int mappedId = idRewriter.rewrite(soundId); + final int mappedId = idRewriter.rewrite(soundId - 1); // Normalize sound id if (mappedId == -1) { wrapper.cancel(); return; diff --git a/gradle.properties b/gradle.properties index 929fb6cd7..722de7197 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ # Project properties - we put these here so they can be modified without causing a recompile of the build scripts -projectVersion=4.5.1-SNAPSHOT +projectVersion=4.5.1 # Gradle properties org.gradle.daemon=true