Search in sources :

Example 46 with AddEntityPacket

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

the class EntityLlama method spawnTo.

@Override
public void spawnTo(Player player) {
    AddEntityPacket pk = new AddEntityPacket();
    pk.type = this.getNetworkId();
    pk.entityUniqueId = this.getId();
    pk.entityRuntimeId = this.getId();
    pk.x = (float) this.x;
    pk.y = (float) this.y;
    pk.z = (float) this.z;
    pk.speedX = (float) this.motionX;
    pk.speedY = (float) this.motionY;
    pk.speedZ = (float) this.motionZ;
    pk.metadata = this.dataProperties;
    player.dataPacket(pk);
    super.spawnTo(player);
}
Also used : AddEntityPacket(cn.nukkit.network.protocol.AddEntityPacket)

Example 47 with AddEntityPacket

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

the class EntityMule method spawnTo.

@Override
public void spawnTo(Player player) {
    AddEntityPacket pk = new AddEntityPacket();
    pk.type = this.getNetworkId();
    pk.entityUniqueId = this.getId();
    pk.entityRuntimeId = this.getId();
    pk.x = (float) this.x;
    pk.y = (float) this.y;
    pk.z = (float) this.z;
    pk.speedX = (float) this.motionX;
    pk.speedY = (float) this.motionY;
    pk.speedZ = (float) this.motionZ;
    pk.metadata = this.dataProperties;
    player.dataPacket(pk);
    super.spawnTo(player);
}
Also used : AddEntityPacket(cn.nukkit.network.protocol.AddEntityPacket)

Example 48 with AddEntityPacket

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

the class EntityOcelot method spawnTo.

@Override
public void spawnTo(Player player) {
    AddEntityPacket pk = new AddEntityPacket();
    pk.type = this.getNetworkId();
    pk.entityUniqueId = this.getId();
    pk.entityRuntimeId = this.getId();
    pk.x = (float) this.x;
    pk.y = (float) this.y;
    pk.z = (float) this.z;
    pk.speedX = (float) this.motionX;
    pk.speedY = (float) this.motionY;
    pk.speedZ = (float) this.motionZ;
    pk.metadata = this.dataProperties;
    player.dataPacket(pk);
    super.spawnTo(player);
}
Also used : AddEntityPacket(cn.nukkit.network.protocol.AddEntityPacket)

Example 49 with AddEntityPacket

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

the class EntitySpider method spawnTo.

@Override
public void spawnTo(Player player) {
    AddEntityPacket pk = new AddEntityPacket();
    pk.type = this.getNetworkId();
    pk.entityUniqueId = this.getId();
    pk.entityRuntimeId = this.getId();
    pk.x = (float) this.x;
    pk.y = (float) this.y;
    pk.z = (float) this.z;
    pk.speedX = (float) this.motionX;
    pk.speedY = (float) this.motionY;
    pk.speedZ = (float) this.motionZ;
    pk.metadata = this.dataProperties;
    player.dataPacket(pk);
    super.spawnTo(player);
}
Also used : AddEntityPacket(cn.nukkit.network.protocol.AddEntityPacket)

Example 50 with AddEntityPacket

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

the class EntityWitch method spawnTo.

@Override
public void spawnTo(Player player) {
    AddEntityPacket pk = new AddEntityPacket();
    pk.type = this.getNetworkId();
    pk.entityUniqueId = this.getId();
    pk.entityRuntimeId = this.getId();
    pk.x = (float) this.x;
    pk.y = (float) this.y;
    pk.z = (float) this.z;
    pk.speedX = (float) this.motionX;
    pk.speedY = (float) this.motionY;
    pk.speedZ = (float) this.motionZ;
    pk.metadata = this.dataProperties;
    player.dataPacket(pk);
    super.spawnTo(player);
}
Also used : AddEntityPacket(cn.nukkit.network.protocol.AddEntityPacket)

Aggregations

AddEntityPacket (cn.nukkit.network.protocol.AddEntityPacket)58 MobEquipmentPacket (cn.nukkit.network.protocol.MobEquipmentPacket)5 ItemBow (cn.nukkit.item.ItemBow)2 EntityMetadata (cn.nukkit.entity.data.EntityMetadata)1 ItemSwordGold (cn.nukkit.item.ItemSwordGold)1 ItemSwordIron (cn.nukkit.item.ItemSwordIron)1 ItemSwordStone (cn.nukkit.item.ItemSwordStone)1