cn.nukkit.level.particle.ElectricSparkParticle Maven / Gradle / Ivy
package cn.nukkit.level.particle;
import cn.nukkit.api.PowerNukkitOnly;
import cn.nukkit.api.Since;
import cn.nukkit.math.Vector3;
import cn.nukkit.network.protocol.DataPacket;
import cn.nukkit.network.protocol.LevelEventPacket;
/**
* @author joserobjr
* @since 2021-06-15
*/
@PowerNukkitOnly
@Since("FUTURE")
public class ElectricSparkParticle extends GenericParticle {
@PowerNukkitOnly
@Since("FUTURE")
public ElectricSparkParticle(Vector3 pos) {
super(pos, Particle.TYPE_WAX);
}
@Override
public DataPacket[] encode() {
LevelEventPacket pk = new LevelEventPacket();
pk.evid = LevelEventPacket.EVENT_PARTICLE_ELECTRIC_SPARK;
pk.x = (float) this.x;
pk.y = (float) this.y;
pk.z = (float) this.z;
pk.data = this.data;
return new DataPacket[]{pk};
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy