use of cn.nukkit.network.protocol.AddEntityPacket in project Nukkit by Nukkit.
the class EntitySkeletonHorse 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 EntityVillager 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 EntityGhast 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 EntityGuardian 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 EntityHusk 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