mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-25 19:45:21 +01:00
Entity sound did not change
This commit is contained in:
parent
8f6784e0e2
commit
fa1ae5b9c9
@ -58,7 +58,7 @@ public final class Protocol1_19_4To1_19_3 extends AbstractProtocol<ClientboundPa
|
||||
new StatisticsRewriter<>(this).register(ClientboundPackets1_19_3.STATISTICS);
|
||||
|
||||
final SoundRewriter<ClientboundPackets1_19_3> soundRewriter = new SoundRewriter<>(this);
|
||||
soundRewriter.registerSound(ClientboundPackets1_19_3.ENTITY_SOUND);
|
||||
soundRewriter.register1_19_3Sound(ClientboundPackets1_19_3.ENTITY_SOUND);
|
||||
soundRewriter.register1_19_3Sound(ClientboundPackets1_19_3.SOUND);
|
||||
|
||||
new CommandRewriter<ClientboundPackets1_19_3>(this) {
|
||||
|
@ -73,7 +73,7 @@ public final class Protocol1_20_2To1_20 extends AbstractProtocol<ClientboundPack
|
||||
|
||||
final SoundRewriter<ClientboundPackets1_19_4> soundRewriter = new SoundRewriter<>(this);
|
||||
soundRewriter.register1_19_3Sound(ClientboundPackets1_19_4.SOUND);
|
||||
soundRewriter.registerEntitySound(ClientboundPackets1_19_4.ENTITY_SOUND);
|
||||
soundRewriter.register1_19_3Sound(ClientboundPackets1_19_4.ENTITY_SOUND);
|
||||
|
||||
registerClientbound(ClientboundPackets1_19_4.PLUGIN_MESSAGE, this::sanitizeCustomPayload);
|
||||
registerServerbound(ServerboundPackets1_20_2.PLUGIN_MESSAGE, this::sanitizeCustomPayload);
|
||||
|
@ -63,11 +63,7 @@ public final class Protocol1_20_5To1_20_3 extends AbstractProtocol<ClientboundPa
|
||||
|
||||
final SoundRewriter<ClientboundPackets1_20_3> soundRewriter = new SoundRewriter<>(this);
|
||||
soundRewriter.register1_19_3Sound(ClientboundPackets1_20_3.SOUND);
|
||||
registerClientbound(ClientboundPackets1_20_3.ENTITY_SOUND, wrapper -> {
|
||||
// Now also written as a sound event with 0 marking a following resource location string
|
||||
final int soundId = wrapper.read(Type.VAR_INT);
|
||||
wrapper.write(Type.VAR_INT, MAPPINGS.getSoundMappings().getNewId(soundId) + 1);
|
||||
});
|
||||
soundRewriter.register1_19_3Sound(ClientboundPackets1_20_3.ENTITY_SOUND);
|
||||
|
||||
new StatisticsRewriter<>(this).register(ClientboundPackets1_20_3.STATISTICS);
|
||||
|
||||
|
@ -47,11 +47,6 @@ public class SoundRewriter<C extends ClientboundPacketType> {
|
||||
});
|
||||
}
|
||||
|
||||
public void registerEntitySound(C packetType) {
|
||||
this.registerSound(packetType);
|
||||
}
|
||||
|
||||
// Also for entity sounds starting with 1.20.5
|
||||
public void register1_19_3Sound(C packetType) {
|
||||
protocol.registerClientbound(packetType, soundHolderHandler());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user