Entity sound did not change

This commit is contained in:
Nassim Jahnke 2024-01-18 12:00:19 +01:00
parent 8f6784e0e2
commit fa1ae5b9c9
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F
4 changed files with 3 additions and 12 deletions

View File

@ -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) {

View File

@ -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);

View File

@ -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);

View File

@ -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());
}