3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-20 06:50:08 +01:00

Entity sound did not change

Dieser Commit ist enthalten in:
Nassim Jahnke 2024-01-18 12:00:19 +01:00
Ursprung 8f6784e0e2
Commit fa1ae5b9c9
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F
4 geänderte Dateien mit 3 neuen und 12 gelöschten Zeilen

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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