use of cn.nukkit.network.protocol.AddEntityPacket in project Nukkit by Nukkit.
the class EntityMooshroom 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);
}
use of cn.nukkit.network.protocol.AddEntityPacket in project Nukkit by Nukkit.
the class EntityPotion method spawnTo.
@Override
public void spawnTo(Player player) {
AddEntityPacket pk = new AddEntityPacket();
pk.type = EntityPotion.NETWORK_ID;
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);
}
use of cn.nukkit.network.protocol.AddEntityPacket in project Nukkit by Nukkit.
the class EntityXPOrb method spawnTo.
@Override
public void spawnTo(Player player) {
AddEntityPacket packet = new AddEntityPacket();
packet.type = getNetworkId();
packet.entityUniqueId = this.getId();
packet.entityRuntimeId = getId();
packet.x = (float) this.x;
packet.y = (float) this.y;
packet.z = (float) this.z;
packet.speedX = (float) this.motionX;
packet.speedY = (float) this.motionY;
packet.speedZ = (float) this.motionZ;
packet.metadata = new EntityMetadata();
player.dataPacket(packet);
// this.sendData(player);
super.spawnTo(player);
}
use of cn.nukkit.network.protocol.AddEntityPacket in project Nukkit by Nukkit.
the class EntityCaveSpider 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);
}
use of cn.nukkit.network.protocol.AddEntityPacket in project Nukkit by Nukkit.
the class EntityCreeper 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);
}
Aggregations