Search in sources :

Example 11 with DataPacket

use of cn.nukkit.network.protocol.DataPacket in project Nukkit by Nukkit.

the class SpellParticle method encode.

@Override
public DataPacket[] encode() {
    LevelEventPacket pk = new LevelEventPacket();
    pk.evid = LevelEventPacket.EVENT_PARTICLE_SPLASH;
    pk.x = (float) this.x;
    pk.y = (float) this.y;
    pk.z = (float) this.z;
    pk.data = this.data;
    return new DataPacket[] { pk };
}
Also used : LevelEventPacket(cn.nukkit.network.protocol.LevelEventPacket) DataPacket(cn.nukkit.network.protocol.DataPacket)

Aggregations

DataPacket (cn.nukkit.network.protocol.DataPacket)11 LevelEventPacket (cn.nukkit.network.protocol.LevelEventPacket)6 PING_DataPacket (cn.nukkit.raknet.protocol.packet.PING_DataPacket)3 InvocationTargetException (java.lang.reflect.InvocationTargetException)2 Player (cn.nukkit.Player)1 EntityMetadata (cn.nukkit.entity.data.EntityMetadata)1 CompressBatchedTask (cn.nukkit.network.CompressBatchedTask)1 AddPlayerPacket (cn.nukkit.network.protocol.AddPlayerPacket)1 RemoveEntityPacket (cn.nukkit.network.protocol.RemoveEntityPacket)1 EncapsulatedPacket (cn.nukkit.raknet.protocol.EncapsulatedPacket)1 MainLogger (cn.nukkit.utils.MainLogger)1 ArrayList (java.util.ArrayList)1