From 15c71064309f0c5275c61bd230a63a6c9b6ac9ec Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Wed, 13 Apr 2022 18:48:53 +0200 Subject: [PATCH] 22w15a --- build.gradle.kts | 2 +- .../packets/BlockItemPackets1_19.java | 23 +++++++++++++++++++ .../viabackwards/data/mapping-1.18to1.19.json | 8 ++++--- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 23e6b3c8..3878f615 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,7 +5,7 @@ plugins { allprojects { group = "com.viaversion" - version = "4.3.0-22w14a-SNAPSHOT" + version = "4.3.0-22w15a-SNAPSHOT" description = "Allow older clients to join newer server versions." } diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_18_2to1_19/packets/BlockItemPackets1_19.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_18_2to1_19/packets/BlockItemPackets1_19.java index 726a7f0a..74a4c698 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_18_2to1_19/packets/BlockItemPackets1_19.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_18_2to1_19/packets/BlockItemPackets1_19.java @@ -163,5 +163,28 @@ public final class BlockItemPackets1_19 extends ItemRewriter { + final int primaryEffect = wrapper.read(Type.VAR_INT); + if (primaryEffect != -1) { + wrapper.write(Type.BOOLEAN, true); + wrapper.write(Type.VAR_INT, primaryEffect); + } else { + wrapper.write(Type.BOOLEAN, false); + } + + final int secondaryEffect = wrapper.read(Type.VAR_INT); + if (secondaryEffect != -1) { + wrapper.write(Type.BOOLEAN, true); + wrapper.write(Type.VAR_INT, secondaryEffect); + } else { + wrapper.write(Type.BOOLEAN, false); + } + }); + } + }); } } diff --git a/common/src/main/resources/assets/viabackwards/data/mapping-1.18to1.19.json b/common/src/main/resources/assets/viabackwards/data/mapping-1.18to1.19.json index 6768ca22..84d16ff3 100644 --- a/common/src/main/resources/assets/viabackwards/data/mapping-1.18to1.19.json +++ b/common/src/main/resources/assets/viabackwards/data/mapping-1.18to1.19.json @@ -296,7 +296,6 @@ }, "sounds": { "music.overworld.deep_dark": "", - "entity.parrot.imitate.warden": "", "block.sculk_vein.break": "", "block.sculk_vein.fall": "", "block.sculk_vein.hit": "", @@ -398,7 +397,9 @@ "entity.allay.hurt": "", "entity.allay.item_given": "", "entity.allay.item_taken": "", - "entity.parrot.imitate.warden": "" + "entity.parrot.imitate.warden": "", + "entity.warden.sonic_boom": "", + "entity.warden.sonic_charge": "" }, "items": { "minecraft:warden_spawn_egg": { @@ -599,7 +600,8 @@ "sculk_charge": "", "sculk_charge_pop": "bubble_pop", "shriek": "", - "allay_dust": "wax_off" + "allay_dust": "wax_off", + "sonic_boom": "enchanted_hit" }, "blockentities": { "sculk_catalyst": "",