本文整理汇总了Java中cn.nukkit.network.protocol.AddEntityPacket类的典型用法代码示例。如果您正苦于以下问题:Java AddEntityPacket类的具体用法?Java AddEntityPacket怎么用?Java AddEntityPacket使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AddEntityPacket类属于cn.nukkit.network.protocol包,在下文中一共展示了AddEntityPacket类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: spawnTo
import cn.nukkit.network.protocol.AddEntityPacket; //导入依赖的package包/类
@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);
}
示例2: spawnTo
import cn.nukkit.network.protocol.AddEntityPacket; //导入依赖的package包/类
@Override
public void spawnTo(Player player) {
AddEntityPacket pk = new AddEntityPacket();
pk.type = EntityEgg.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);
}
示例3: spawnTo
import cn.nukkit.network.protocol.AddEntityPacket; //导入依赖的package包/类
@Override
public void spawnTo(Player player) {
AddEntityPacket pk = new AddEntityPacket();
pk.entityUniqueId = this.getId();
pk.entityRuntimeId = this.getId();
pk.type = EntityMinecartEmpty.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 = 0;
pk.pitch = 0;
pk.metadata = this.dataProperties;
player.dataPacket(pk);
super.spawnTo(player);
}
示例4: spawnTo
import cn.nukkit.network.protocol.AddEntityPacket; //导入依赖的package包/类
@Override
public void spawnTo(Player player) {
AddEntityPacket pk = new AddEntityPacket();
pk.entityUniqueId = this.getId();
pk.entityRuntimeId = this.getId();
pk.type = EntityLightning.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);
}
示例5: spawnTo
import cn.nukkit.network.protocol.AddEntityPacket; //导入依赖的package包/类
@Override
public void spawnTo(Player player) {
AddEntityPacket pk = new AddEntityPacket();
pk.type = 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);
}
示例6: spawnTo
import cn.nukkit.network.protocol.AddEntityPacket; //导入依赖的package包/类
@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);
}
示例7: spawnTo
import cn.nukkit.network.protocol.AddEntityPacket; //导入依赖的package包/类
@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);
}
示例8: spawnTo
import cn.nukkit.network.protocol.AddEntityPacket; //导入依赖的package包/类
@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);
}
示例9: spawnTo
import cn.nukkit.network.protocol.AddEntityPacket; //导入依赖的package包/类
@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);
}
示例10: spawnTo
import cn.nukkit.network.protocol.AddEntityPacket; //导入依赖的package包/类
@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);
}
示例11: spawnTo
import cn.nukkit.network.protocol.AddEntityPacket; //导入依赖的package包/类
@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);
}