All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.nukkit.level.particle.BlockForceFieldParticle Maven / Gradle / Ivy

package cn.nukkit.level.particle;

import cn.nukkit.math.Vector3;
import cn.nukkit.network.protocol.DataPacket;
import cn.nukkit.network.protocol.LevelEventPacket;

public class BlockForceFieldParticle extends GenericParticle {
    public BlockForceFieldParticle(Vector3 pos) {
        this(pos, 0);
    }

    public BlockForceFieldParticle(Vector3 pos, int scale) {
        super(pos, Particle.TYPE_BLOCK_FORCE_FIELD);
    }

    @Override
    public DataPacket[] encode() {
        LevelEventPacket pk = new LevelEventPacket();
        pk.evid = LevelEventPacket.EVENT_PARTICLE_BLOCK_FORCE_FIELD;
        pk.x = (float) this.x;
        pk.y = (float) this.y;
        pk.z = (float) this.z;
        pk.data = this.data;

        return new DataPacket[]{pk};
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy