use of cn.nukkit.network.protocol.AddEntityPacket in project Nukkit by Nukkit.
the class EntityExpBottle method spawnTo.
@Override
public void spawnTo(Player player) {
AddEntityPacket pk = new AddEntityPacket();
pk.type = EntityExpBottle.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 EntityFallingBlock method spawnTo.
@Override
public void spawnTo(Player player) {
AddEntityPacket packet = new AddEntityPacket();
packet.type = EntityFallingBlock.NETWORK_ID;
packet.entityUniqueId = this.getId();
packet.entityRuntimeId = getId();
packet.x = (float) x;
packet.y = (float) y;
packet.z = (float) z;
packet.speedX = (float) motionX;
packet.speedY = (float) motionY;
packet.speedZ = (float) motionZ;
packet.yaw = (float) yaw;
packet.pitch = (float) pitch;
packet.metadata = dataProperties;
player.dataPacket(packet);
super.spawnTo(player);
}
use of cn.nukkit.network.protocol.AddEntityPacket in project Nukkit by Nukkit.
the class EntityMinecartAbstract method spawnTo.
@Override
public void spawnTo(Player player) {
AddEntityPacket pk = new AddEntityPacket();
pk.entityUniqueId = getId();
pk.entityRuntimeId = getId();
pk.type = getNetworkId();
pk.x = (float) x;
pk.y = (float) y;
pk.z = (float) z;
pk.speedX = 0;
pk.speedY = 0;
pk.speedZ = 0;
pk.yaw = 0;
pk.pitch = 0;
pk.metadata = dataProperties;
player.dataPacket(pk);
super.spawnTo(player);
}
use of cn.nukkit.network.protocol.AddEntityPacket in project Nukkit by Nukkit.
the class EntityPrimedTNT method spawnTo.
public void spawnTo(Player player) {
AddEntityPacket packet = new AddEntityPacket();
packet.type = EntityPrimedTNT.NETWORK_ID;
packet.entityUniqueId = this.getId();
packet.entityRuntimeId = getId();
packet.x = (float) x;
packet.y = (float) y;
packet.z = (float) z;
packet.speedX = (float) motionX;
packet.speedY = (float) motionY;
packet.speedZ = (float) motionZ;
packet.metadata = dataProperties;
player.dataPacket(packet);
super.spawnTo(player);
}
use of cn.nukkit.network.protocol.AddEntityPacket in project Nukkit by Nukkit.
the class EntityBlaze 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