From f487f13e82bb43cc40de280ead38a9859aaf577d Mon Sep 17 00:00:00 2001 From: KennyTV Date: Mon, 18 May 2020 00:28:04 +0200 Subject: [PATCH] Fix ender pearl sound in 1.11->1.10 --- .../matsv/viabackwards/api/rewriters/LegacySoundRewriter.java | 4 ++-- .../protocol/protocol1_10to1_11/packets/SoundPackets1_11.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/nl/matsv/viabackwards/api/rewriters/LegacySoundRewriter.java b/core/src/main/java/nl/matsv/viabackwards/api/rewriters/LegacySoundRewriter.java index b08cfa44..0c00d222 100644 --- a/core/src/main/java/nl/matsv/viabackwards/api/rewriters/LegacySoundRewriter.java +++ b/core/src/main/java/nl/matsv/viabackwards/api/rewriters/LegacySoundRewriter.java @@ -16,7 +16,7 @@ import java.util.HashMap; import java.util.Map; public abstract class LegacySoundRewriter extends Rewriter { - private final Map soundRewrites = new HashMap<>(); + protected final Map soundRewrites = new HashMap<>(); protected LegacySoundRewriter(T protocol) { super(protocol); @@ -71,7 +71,7 @@ public abstract class LegacySoundRewriter extends R private final float newPitch; private final boolean added; - private SoundData(int replacementSound, boolean changePitch, float newPitch, boolean added) { + public SoundData(int replacementSound, boolean changePitch, float newPitch, boolean added) { this.replacementSound = replacementSound; this.changePitch = changePitch; this.newPitch = newPitch; diff --git a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_10to1_11/packets/SoundPackets1_11.java b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_10to1_11/packets/SoundPackets1_11.java index 6a4cb84a..83051cdc 100644 --- a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_10to1_11/packets/SoundPackets1_11.java +++ b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_10to1_11/packets/SoundPackets1_11.java @@ -79,7 +79,8 @@ public class SoundPackets1_11 extends LegacySoundRewriter { added(176, 227); // entity.elder_guardian.flop -> entity.guardian.flop - removed(196); // entity.experience_orb.touch + // 1.10 entity.experience_orb.touch was removed; subtract id and properly map ender pearl sound on that id + soundRewrites.put(196, new SoundData(193, false, -1, false)); added(197, 402, 1.8f); // entity.evocation_fangs.attack -> entity.zombie.attack_iron_door added(198, 370, 0.4f); // entity.evocation_illager.ambient -> entity.villager.ambient