From 54d3fc21a6e8c82915a0c4f35e844adb536e51c0 Mon Sep 17 00:00:00 2001 From: onebeastchris Date: Thu, 28 Nov 2024 00:43:54 +0800 Subject: [PATCH] Fix TrailParticleData typo --- .../mcprotocollib/protocol/codec/MinecraftCodecHelper.java | 6 +++--- .../{TraiParticleData.java => TrailParticleData.java} | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/particle/{TraiParticleData.java => TrailParticleData.java} (54%) diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/MinecraftCodecHelper.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/MinecraftCodecHelper.java index 85394b0b..823a505f 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/MinecraftCodecHelper.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/MinecraftCodecHelper.java @@ -73,7 +73,7 @@ import org.geysermc.mcprotocollib.protocol.data.game.level.particle.ParticleData import org.geysermc.mcprotocollib.protocol.data.game.level.particle.ParticleType; import org.geysermc.mcprotocollib.protocol.data.game.level.particle.SculkChargeParticleData; import org.geysermc.mcprotocollib.protocol.data.game.level.particle.ShriekParticleData; -import org.geysermc.mcprotocollib.protocol.data.game.level.particle.TraiParticleData; +import org.geysermc.mcprotocollib.protocol.data.game.level.particle.TrailParticleData; import org.geysermc.mcprotocollib.protocol.data.game.level.particle.VibrationParticleData; import org.geysermc.mcprotocollib.protocol.data.game.level.particle.positionsource.BlockPositionSource; import org.geysermc.mcprotocollib.protocol.data.game.level.particle.positionsource.EntityPositionSource; @@ -725,7 +725,7 @@ public class MinecraftCodecHelper extends BasePacketCodecHelper { case ITEM -> new ItemParticleData(this.readOptionalItemStack(buf)); case SCULK_CHARGE -> new SculkChargeParticleData(buf.readFloat()); case SHRIEK -> new ShriekParticleData(this.readVarInt(buf)); - case TRAIL -> new TraiParticleData(Vector3d.from(buf.readDouble(), buf.readDouble(), buf.readDouble()), buf.readInt(), this.readVarInt(buf)); + case TRAIL -> new TrailParticleData(Vector3d.from(buf.readDouble(), buf.readDouble(), buf.readDouble()), buf.readInt(), this.readVarInt(buf)); case VIBRATION -> new VibrationParticleData(this.readPositionSource(buf), this.readVarInt(buf)); default -> null; }; @@ -765,7 +765,7 @@ public class MinecraftCodecHelper extends BasePacketCodecHelper { this.writeVarInt(buf, shriekData.getDelay()); } case TRAIL -> { - TraiParticleData trailData = (TraiParticleData) data; + TrailParticleData trailData = (TrailParticleData) data; buf.writeDouble(trailData.target().getX()); buf.writeDouble(trailData.target().getY()); buf.writeDouble(trailData.target().getZ()); diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/particle/TraiParticleData.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/particle/TrailParticleData.java similarity index 54% rename from protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/particle/TraiParticleData.java rename to protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/particle/TrailParticleData.java index 04748569..362f4c7e 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/particle/TraiParticleData.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/particle/TrailParticleData.java @@ -2,5 +2,5 @@ package org.geysermc.mcprotocollib.protocol.data.game.level.particle; import org.cloudburstmc.math.vector.Vector3d; -public record TraiParticleData(Vector3d target, int color, int duration) implements ParticleData { +public record TrailParticleData(Vector3d target, int color, int duration) implements ParticleData { }