3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-21 14:00:11 +01:00

SPIGOT-2098: Fix sound effects for 1.9.0 clients

Dieser Commit ist enthalten in:
Thinkofname 2016-03-31 11:34:47 +01:00
Ursprung 8b61cc5208
Commit 45bb40353a

Datei anzeigen

@ -0,0 +1,21 @@
--- a/net/minecraft/server/PacketPlayOutNamedSoundEffect.java
+++ b/net/minecraft/server/PacketPlayOutNamedSoundEffect.java
@@ -38,7 +38,17 @@
}
public void b(PacketDataSerializer packetdataserializer) throws IOException {
- packetdataserializer.d(SoundEffect.a.a((Object) this.a));
+ // CraftBukkit start
+ if (packetdataserializer.version > 107) {
+ packetdataserializer.d(SoundEffect.a.a(this.a));
+ } else {
+ int id = SoundEffect.a.a(this.a);
+ if (id >= SoundEffect.a.a(SoundEffect.a.get(new MinecraftKey("item.elytra.flying")))) {
+ id--;
+ }
+ packetdataserializer.d(id);
+ }
+ // CraftBukkit end
packetdataserializer.a((Enum) this.b);
packetdataserializer.writeInt(this.c);
packetdataserializer.writeInt(this.d);