more particle improvements
This commit is contained in:
parent
28d6850668
commit
d95a3f8b11
58 changed files with 266 additions and 444 deletions
|
@ -18,16 +18,11 @@ public class CommandEffect extends Command {
|
|||
this.addPlayerList("player", false, UserPolicy.NON_ADMINS_OR_SELF);
|
||||
this.addEnum("particle", ParticleType.class, ParticleType.values());
|
||||
this.addVector("position", true, false);
|
||||
this.setParamsOptional();
|
||||
this.addVector("offset", false, false);
|
||||
this.addDouble("speed", 0.0f, 100.0f, 0.0f);
|
||||
this.addInt("count", 0, 1000, 0);
|
||||
}
|
||||
|
||||
public void exec(CommandEnvironment env, Executor exec, List<Player> players, ParticleType type, Vec3 pos, Vec3 offset, double speed, int count) {
|
||||
offset = offset == null ? new Vec3(0.0, 0.0, 0.0) : offset;
|
||||
public void exec(CommandEnvironment env, Executor exec, List<Player> players, ParticleType type, Vec3 pos) {
|
||||
for(Player player : players) {
|
||||
player.sendPacket(new SPacketParticles(type, (float)pos.xCoord, (float)pos.yCoord, (float)pos.zCoord, (float)offset.xCoord, (float)offset.yCoord, (float)offset.zCoord, (float)speed, count, 0));
|
||||
player.sendPacket(new SPacketParticles(type, (float)pos.xCoord, (float)pos.yCoord, (float)pos.zCoord, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1287,10 +1287,8 @@ public final class WorldServer extends AWorldServer {
|
|||
// this.resetWeather = false;
|
||||
}
|
||||
|
||||
public void spawnParticle(ParticleType particleType, double xCoord, double yCoord, double zCoord,
|
||||
int numberOfParticles, double xOffset, double yOffset, double zOffset, double particleSpeed, int data) {
|
||||
Packet packet = new SPacketParticles(particleType, (float)xCoord, (float)yCoord, (float)zCoord, (float)xOffset,
|
||||
(float)yOffset, (float)zOffset, (float)particleSpeed, numberOfParticles, data);
|
||||
public void spawnParticles(ParticleType particleType, double xCoord, double yCoord, double zCoord, int data) {
|
||||
Packet packet = new SPacketParticles(particleType, (float)xCoord, (float)yCoord, (float)zCoord, data);
|
||||
|
||||
for(int i = 0; i < this.players.size(); ++i) {
|
||||
EntityNPC entityplayermp = this.players.get(i);
|
||||
|
@ -1689,15 +1687,7 @@ public final class WorldServer extends AWorldServer {
|
|||
}
|
||||
for(EntityNPC player : this.players) {
|
||||
player.attackEntityFrom(DamageSource.causeExterminatusDamage(null), 5000);
|
||||
Packet packet = new SPacketParticles(ParticleType.EXPLOSION_HUGE,
|
||||
(float)player.posX, (float)this.getSeaLevel() + 4.0f, (float)player.posZ, (float)128.0,
|
||||
(float)2.0, (float)128.0, (float)0.15, 1000, 0);
|
||||
player.connection.sendPacket(packet);
|
||||
packet = new SPacketParticles(ParticleType.EXPLOSION_NORMAL,
|
||||
(float)player.posX, (float)this.getSeaLevel() + 4.0f, (float)player.posZ, (float)128.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);
|
||||
Packet packet = new SPacketEffect(1025, new BlockPos(player.posX, (double)this.getSeaLevel() + 4.0, player.posZ), 0);
|
||||
player.connection.sendPacket(packet);
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue