Fix TrailParticleData typo
Some checks are pending
Java CI with Gradle / build (push) Waiting to run
Deploy / build (push) Waiting to run

This commit is contained in:
onebeastchris 2024-11-28 00:43:54 +08:00
parent e7fb86682b
commit 54d3fc21a6
2 changed files with 4 additions and 4 deletions

View file

@ -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.ParticleType;
import org.geysermc.mcprotocollib.protocol.data.game.level.particle.SculkChargeParticleData; 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.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.VibrationParticleData;
import org.geysermc.mcprotocollib.protocol.data.game.level.particle.positionsource.BlockPositionSource; import org.geysermc.mcprotocollib.protocol.data.game.level.particle.positionsource.BlockPositionSource;
import org.geysermc.mcprotocollib.protocol.data.game.level.particle.positionsource.EntityPositionSource; 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 ITEM -> new ItemParticleData(this.readOptionalItemStack(buf));
case SCULK_CHARGE -> new SculkChargeParticleData(buf.readFloat()); case SCULK_CHARGE -> new SculkChargeParticleData(buf.readFloat());
case SHRIEK -> new ShriekParticleData(this.readVarInt(buf)); 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)); case VIBRATION -> new VibrationParticleData(this.readPositionSource(buf), this.readVarInt(buf));
default -> null; default -> null;
}; };
@ -765,7 +765,7 @@ public class MinecraftCodecHelper extends BasePacketCodecHelper {
this.writeVarInt(buf, shriekData.getDelay()); this.writeVarInt(buf, shriekData.getDelay());
} }
case TRAIL -> { case TRAIL -> {
TraiParticleData trailData = (TraiParticleData) data; TrailParticleData trailData = (TrailParticleData) data;
buf.writeDouble(trailData.target().getX()); buf.writeDouble(trailData.target().getX());
buf.writeDouble(trailData.target().getY()); buf.writeDouble(trailData.target().getY());
buf.writeDouble(trailData.target().getZ()); buf.writeDouble(trailData.target().getZ());

View file

@ -2,5 +2,5 @@ package org.geysermc.mcprotocollib.protocol.data.game.level.particle;
import org.cloudburstmc.math.vector.Vector3d; 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 {
} }