improve cheat gui, fix particle bug

This commit is contained in:
Sen 2025-07-01 00:20:02 +02:00
parent 8a9e9451b7
commit 30e6b4eb74
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
7 changed files with 147 additions and 134 deletions

View file

@ -1296,7 +1296,7 @@ public final class WorldServer extends AWorldServer {
public void spawnParticle(ParticleType particleType, boolean longDistance, double xCoord, double yCoord, double zCoord,
int numberOfParticles, double xOffset, double yOffset, double zOffset, double particleSpeed, int[] particleArguments) {
Packet packet = new SPacketParticles(particleType, longDistance, (float)xCoord, (float)yCoord, (float)zCoord, (float)xOffset,
(float)yOffset, (float)zOffset, (float)particleSpeed, numberOfParticles, particleArguments);
(float)yOffset, (float)zOffset, (float)particleSpeed, numberOfParticles, particleArguments.length == 0 ? 0 : particleArguments[0]);
for(int i = 0; i < this.players.size(); ++i) {
EntityNPC entityplayermp = this.players.get(i);
@ -1697,11 +1697,11 @@ public final class WorldServer extends AWorldServer {
player.attackEntityFrom(DamageSource.causeExterminatusDamage(null), 5000);
Packet packet = new SPacketParticles(ParticleType.EXPLOSION_HUGE, true,
(float)player.posX, (float)this.getSeaLevel() + 4.0f, (float)player.posZ, (float)128.0,
(float)2.0, (float)128.0, (float)0.15, 1000, new int[0]);
(float)2.0, (float)128.0, (float)0.15, 1000, 0);
player.connection.sendPacket(packet);
packet = new SPacketParticles(ParticleType.CLOUD, true,
(float)player.posX, (float)this.getSeaLevel() + 4.0f, (float)player.posZ, (float)128.0,
(float)2.0, (float)128.0, (float)0.15, 1000, new int[0]);
(float)2.0, (float)128.0, (float)0.15, 1000, 0);
player.connection.sendPacket(packet);
packet = new SPacketEffect(1025, new BlockPos(player.posX, (double)this.getSeaLevel() + 4.0, player.posZ), 0);
player.connection.sendPacket(packet);