diff --git a/api/src/main/java/com/github/retrooper/packetevents/protocol/particle/data/ParticleDustColorTransitionData.java b/api/src/main/java/com/github/retrooper/packetevents/protocol/particle/data/ParticleDustColorTransitionData.java index ccb8bf404..a173111d5 100644 --- a/api/src/main/java/com/github/retrooper/packetevents/protocol/particle/data/ParticleDustColorTransitionData.java +++ b/api/src/main/java/com/github/retrooper/packetevents/protocol/particle/data/ParticleDustColorTransitionData.java @@ -159,7 +159,6 @@ public static ParticleDustColorTransitionData decode(NBTCompound compound, Clien String fromColorKey = "from_color"; String toColorKey = "to_color"; if (version.isOlderThan(ClientVersion.V_1_20_5)) { - compound = compound.getCompoundTagOrThrow("value"); fromColorKey = "fromColor"; toColorKey = "toColor"; } @@ -173,9 +172,6 @@ public static void encode(ParticleDustColorTransitionData data, ClientVersion ve String fromColorKey = "from_color"; String toColorKey = "to_color"; if (version.isOlderThan(ClientVersion.V_1_20_5)) { - NBTCompound innerCompound = new NBTCompound(); - compound.setTag("value", innerCompound); - compound = innerCompound; fromColorKey = "fromColor"; toColorKey = "toColor"; } diff --git a/api/src/main/java/com/github/retrooper/packetevents/protocol/particle/data/ParticleDustData.java b/api/src/main/java/com/github/retrooper/packetevents/protocol/particle/data/ParticleDustData.java index 156e7daeb..f928efb20 100644 --- a/api/src/main/java/com/github/retrooper/packetevents/protocol/particle/data/ParticleDustData.java +++ b/api/src/main/java/com/github/retrooper/packetevents/protocol/particle/data/ParticleDustData.java @@ -156,9 +156,6 @@ public static NBT encodeColor(@Nullable Float alpha, float red, float green, flo } public static ParticleDustData decode(NBTCompound compound, ClientVersion version) { - if (version.isOlderThan(ClientVersion.V_1_20_5)) { - compound = compound.getCompoundTagOrThrow("value"); - } NBT colorNBT = compound.getTagOrNull("color"); float[] color = decodeColor(colorNBT); float scale = compound.getNumberTagOrThrow("scale").getAsFloat(); @@ -166,11 +163,6 @@ public static ParticleDustData decode(NBTCompound compound, ClientVersion versio } public static void encode(ParticleDustData data, ClientVersion version, NBTCompound compound) { - if (version.isOlderThan(ClientVersion.V_1_20_5)) { - NBTCompound innerCompound = new NBTCompound(); - compound.setTag("value", innerCompound); - compound = innerCompound; - } compound.setTag("color", encodeColor(null, data.red, data.green, data.blue)); compound.setTag("scale", new NBTFloat(data.scale)); } diff --git a/api/src/main/java/com/github/retrooper/packetevents/protocol/particle/data/ParticleSculkChargeData.java b/api/src/main/java/com/github/retrooper/packetevents/protocol/particle/data/ParticleSculkChargeData.java index f5f89e99b..16fa70276 100644 --- a/api/src/main/java/com/github/retrooper/packetevents/protocol/particle/data/ParticleSculkChargeData.java +++ b/api/src/main/java/com/github/retrooper/packetevents/protocol/particle/data/ParticleSculkChargeData.java @@ -30,19 +30,11 @@ public static void write(PacketWrapper wrapper, ParticleSculkChargeData data) } public static ParticleSculkChargeData decode(NBTCompound compound, ClientVersion version) { - if (version.isOlderThan(ClientVersion.V_1_20_5)) { - compound = compound.getCompoundTagOrThrow("value"); - } float roll = compound.getNumberTagOrThrow("roll").getAsFloat(); return new ParticleSculkChargeData(roll); } public static void encode(ParticleSculkChargeData data, ClientVersion version, NBTCompound compound) { - if (version.isOlderThan(ClientVersion.V_1_20_5)) { - NBTCompound innerCompound = new NBTCompound(); - compound.setTag("value", innerCompound); - compound = innerCompound; - } compound.setTag("roll", new NBTFloat(data.roll)); } diff --git a/api/src/main/java/com/github/retrooper/packetevents/protocol/particle/data/ParticleShriekData.java b/api/src/main/java/com/github/retrooper/packetevents/protocol/particle/data/ParticleShriekData.java index dc698586d..cdc05e8e4 100644 --- a/api/src/main/java/com/github/retrooper/packetevents/protocol/particle/data/ParticleShriekData.java +++ b/api/src/main/java/com/github/retrooper/packetevents/protocol/particle/data/ParticleShriekData.java @@ -30,19 +30,11 @@ public static void write(PacketWrapper wrapper, ParticleShriekData data) { } public static ParticleShriekData decode(NBTCompound compound, ClientVersion version) { - if (version.isOlderThan(ClientVersion.V_1_20_5)) { - compound = compound.getCompoundTagOrThrow("value"); - } int delay = compound.getNumberTagOrThrow("delay").getAsInt(); return new ParticleShriekData(delay); } public static void encode(ParticleShriekData data, ClientVersion version, NBTCompound compound) { - if (version.isOlderThan(ClientVersion.V_1_20_5)) { - NBTCompound innerCompound = new NBTCompound(); - compound.setTag("value", innerCompound); - compound = innerCompound; - } compound.setTag("delay", new NBTInt(data.delay)); } diff --git a/api/src/main/java/com/github/retrooper/packetevents/protocol/particle/data/ParticleVibrationData.java b/api/src/main/java/com/github/retrooper/packetevents/protocol/particle/data/ParticleVibrationData.java index 0c7cf3ca9..fba3bfb38 100644 --- a/api/src/main/java/com/github/retrooper/packetevents/protocol/particle/data/ParticleVibrationData.java +++ b/api/src/main/java/com/github/retrooper/packetevents/protocol/particle/data/ParticleVibrationData.java @@ -156,9 +156,6 @@ public static void write(PacketWrapper wrapper, ParticleVibrationData data) { } public static ParticleVibrationData decode(NBTCompound compound, ClientVersion version) { - if (version.isOlderThan(ClientVersion.V_1_20_5)) { - compound = compound.getCompoundTagOrThrow("value"); - } Vector3i origin = version.isNewerThanOrEquals(ClientVersion.V_1_19) ? null : new Vector3i(compound.getTagOfTypeOrThrow("origin", NBTIntArray.class).getValue()); PositionSource destination = PositionSource.decode(compound.getCompoundTagOrThrow("destination"), version); @@ -167,11 +164,6 @@ public static ParticleVibrationData decode(NBTCompound compound, ClientVersion v } public static void encode(ParticleVibrationData data, ClientVersion version, NBTCompound compound) { - if (version.isOlderThan(ClientVersion.V_1_20_5)) { - NBTCompound innerCompound = new NBTCompound(); - compound.setTag("value", innerCompound); - compound = innerCompound; - } if (version.isOlderThan(ClientVersion.V_1_19)) { Vector3i startPos = data.getStartingPosition(); if (startPos != null) {