From 8ab8476ae6da4a0d1f86c30bfc2120b7d417426b Mon Sep 17 00:00:00 2001 From: TheRed <56270596+TheRedXD@users.noreply.github.com> Date: Sun, 9 Jul 2023 12:01:58 +0300 Subject: [PATCH] Changes to 1.19.3, 1.19.4 and 1.20 protocols to fix packet_entity_sound_effect and packet_sound_effect to include optional soundEvent argument (#731) --- data/pc/1.19.3/protocol.json | 56 ++++++++++++++++++++++++++++++++++++ data/pc/1.19.4/protocol.json | 56 ++++++++++++++++++++++++++++++++++++ data/pc/1.20/protocol.json | 56 ++++++++++++++++++++++++++++++++++++ 3 files changed, 168 insertions(+) diff --git a/data/pc/1.19.3/protocol.json b/data/pc/1.19.3/protocol.json index d13c1a03e..2a7d27780 100644 --- a/data/pc/1.19.3/protocol.json +++ b/data/pc/1.19.3/protocol.json @@ -4376,6 +4376,34 @@ "name": "soundId", "type": "varint" }, + { + "name": "soundEvent", + "type": [ + "switch", + { + "compareTo": "soundId", + "fields": { + "0": [ + "container", + [ + { + "name": "resource", + "type": "string" + }, + { + "name": "range", + "type": [ + "option", + "f32" + ] + } + ] + ] + }, + "default": "void" + } + ] + }, { "name": "soundCategory", "type": "varint" @@ -4442,6 +4470,34 @@ "name": "soundId", "type": "varint" }, + { + "name": "soundEvent", + "type": [ + "switch", + { + "compareTo": "soundId", + "fields": { + "0": [ + "container", + [ + { + "name": "resource", + "type": "string" + }, + { + "name": "range", + "type": [ + "option", + "f32" + ] + } + ] + ] + }, + "default": "void" + } + ] + }, { "name": "soundCategory", "type": "varint" diff --git a/data/pc/1.19.4/protocol.json b/data/pc/1.19.4/protocol.json index 057a5ab15..9b470a67e 100644 --- a/data/pc/1.19.4/protocol.json +++ b/data/pc/1.19.4/protocol.json @@ -4562,6 +4562,34 @@ "name": "soundId", "type": "varint" }, + { + "name": "soundEvent", + "type": [ + "switch", + { + "compareTo": "soundId", + "fields": { + "0": [ + "container", + [ + { + "name": "resource", + "type": "string" + }, + { + "name": "range", + "type": [ + "option", + "f32" + ] + } + ] + ] + }, + "default": "void" + } + ] + }, { "name": "soundCategory", "type": "varint" @@ -4628,6 +4656,34 @@ "name": "soundId", "type": "varint" }, + { + "name": "soundEvent", + "type": [ + "switch", + { + "compareTo": "soundId", + "fields": { + "0": [ + "container", + [ + { + "name": "resource", + "type": "string" + }, + { + "name": "range", + "type": [ + "option", + "f32" + ] + } + ] + ] + }, + "default": "void" + } + ] + }, { "name": "soundCategory", "type": "varint" diff --git a/data/pc/1.20/protocol.json b/data/pc/1.20/protocol.json index 385aa45f8..590f2324a 100644 --- a/data/pc/1.20/protocol.json +++ b/data/pc/1.20/protocol.json @@ -4558,6 +4558,34 @@ "name": "soundId", "type": "varint" }, + { + "name": "soundEvent", + "type": [ + "switch", + { + "compareTo": "soundId", + "fields": { + "0": [ + "container", + [ + { + "name": "resource", + "type": "string" + }, + { + "name": "range", + "type": [ + "option", + "f32" + ] + } + ] + ] + }, + "default": "void" + } + ] + }, { "name": "soundCategory", "type": "varint" @@ -4624,6 +4652,34 @@ "name": "soundId", "type": "varint" }, + { + "name": "soundEvent", + "type": [ + "switch", + { + "compareTo": "soundId", + "fields": { + "0": [ + "container", + [ + { + "name": "resource", + "type": "string" + }, + { + "name": "range", + "type": [ + "option", + "f32" + ] + } + ] + ] + }, + "default": "void" + } + ] + }, { "name": "soundCategory", "type": "varint"