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