Fix ender pearl sound in 1.11->1.10

This commit is contained in:
KennyTV 2020-05-18 00:28:04 +02:00
parent 13bcce6d30
commit f487f13e82
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
2 changed files with 4 additions and 3 deletions

View File

@ -16,7 +16,7 @@ import java.util.HashMap;
import java.util.Map;
public abstract class LegacySoundRewriter<T extends BackwardsProtocol> extends Rewriter<T> {
private final Map<Integer, SoundData> soundRewrites = new HashMap<>();
protected final Map<Integer, SoundData> soundRewrites = new HashMap<>();
protected LegacySoundRewriter(T protocol) {
super(protocol);
@ -71,7 +71,7 @@ public abstract class LegacySoundRewriter<T extends BackwardsProtocol> 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;

View File

@ -79,7 +79,8 @@ public class SoundPackets1_11 extends LegacySoundRewriter<Protocol1_10To1_11> {
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