use of cn.nukkit.network.protocol.LevelEventPacket in project Nukkit by Nukkit.
the class BoneMealParticle method encode.
@Override
public DataPacket[] encode() {
LevelEventPacket pk = new LevelEventPacket();
pk.evid = LevelEventPacket.EVENT_PARTICLE_BONEMEAL;
pk.x = (float) this.x;
pk.y = (float) this.y;
pk.z = (float) this.z;
pk.data = 0;
return new DataPacket[] { pk };
}
use of cn.nukkit.network.protocol.LevelEventPacket in project Nukkit by Nukkit.
the class GenericParticle method encode.
@Override
public DataPacket[] encode() {
LevelEventPacket pk = new LevelEventPacket();
pk.evid = (short) (LevelEventPacket.EVENT_ADD_PARTICLE_MASK | this.id);
pk.x = (float) this.x;
pk.y = (float) this.y;
pk.z = (float) this.z;
pk.data = this.data;
return new DataPacket[] { pk };
}
use of cn.nukkit.network.protocol.LevelEventPacket in project Nukkit by Nukkit.
the class DestroyBlockParticle method encode.
@Override
public DataPacket[] encode() {
LevelEventPacket pk = new LevelEventPacket();
pk.evid = LevelEventPacket.EVENT_PARTICLE_DESTROY;
pk.x = (float) this.x;
pk.y = (float) this.y;
pk.z = (float) this.z;
pk.data = this.data;
return new DataPacket[] { pk };
}
use of cn.nukkit.network.protocol.LevelEventPacket in project Nukkit by Nukkit.
the class MobSpawnParticle method encode.
@Override
public DataPacket[] encode() {
LevelEventPacket packet = new LevelEventPacket();
packet.evid = LevelEventPacket.EVENT_PARTICLE_SPAWN;
packet.x = (float) this.x;
packet.y = (float) this.y;
packet.z = (float) this.z;
packet.data = (this.width & 0xff) + ((this.height & 0xff) << 8);
return new DataPacket[] { packet };
}
use of cn.nukkit.network.protocol.LevelEventPacket in project Nukkit by Nukkit.
the class PunchBlockParticle method encode.
@Override
public DataPacket[] encode() {
LevelEventPacket pk = new LevelEventPacket();
pk.evid = LevelEventPacket.EVENT_PARTICLE_PUNCH_BLOCK;
pk.x = (float) this.x;
pk.y = (float) this.y;
pk.z = (float) this.z;
pk.data = this.data;
return new DataPacket[] { pk };
}
Aggregations