当前位置: 首页>>代码示例>>Java>>正文


Java AddEntityPacket类代码示例

本文整理汇总了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);
}
 
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:18,代码来源:EntityWitherSkeleton.java

示例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);
}
 
开发者ID:FrontierDevs,项目名称:Jenisys3,代码行数:18,代码来源:EntityEgg.java

示例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);
}
 
开发者ID:FrontierDevs,项目名称:Jenisys3,代码行数:20,代码来源:EntityMinecartEmpty.java

示例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);
}
 
开发者ID:JupiterDevelopmentTeam,项目名称:Jupiter,代码行数:20,代码来源:EntityLightning.java

示例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);
}
 
开发者ID:FrontierDevs,项目名称:Jenisys3,代码行数:18,代码来源:EntityEnderPearl.java

示例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);
}
 
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:20,代码来源:EntityMinecartAbstract.java

示例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);
}
 
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:18,代码来源:EntityPotion.java

示例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);
}
 
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:19,代码来源:EntityXPOrb.java

示例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);
}
 
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:20,代码来源:EntityBoat.java

示例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);
}
 
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:19,代码来源:EntityFallingBlock.java

示例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);
}
 
开发者ID:FrontierDevs,项目名称:Jenisys3,代码行数:18,代码来源:EntityExpBottle.java


注:本文中的cn.nukkit.network.protocol.AddEntityPacket类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。