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


Java LevelEventPacket类代码示例

本文整理汇总了Java中cn.nukkit.network.protocol.LevelEventPacket的典型用法代码示例。如果您正苦于以下问题:Java LevelEventPacket类的具体用法?Java LevelEventPacket怎么用?Java LevelEventPacket使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


LevelEventPacket类属于cn.nukkit.network.protocol包,在下文中一共展示了LevelEventPacket类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: encode

import cn.nukkit.network.protocol.LevelEventPacket; //导入依赖的package包/类
@Override
public DataPacket[] encode() {
    LevelEventPacket pk = new LevelEventPacket();
    pk.evid = LevelEventPacket.EVENT_PARTICLE_BONEMEAL;
    pk.x = (float) this.x;
    pk.y = (float) this.y;
    pk.z = (float) this.z;
    pk.data = 0;

    return new DataPacket[]{pk};
}
 
开发者ID:CoreXDevelopment,项目名称:CoreX,代码行数:12,代码来源:BoneMealParticle.java

示例2: encode

import cn.nukkit.network.protocol.LevelEventPacket; //导入依赖的package包/类
@Override
public DataPacket[] encode() {
    LevelEventPacket pk = new LevelEventPacket();
    pk.evid = LevelEventPacket.EVENT_PARTICLE_SPLASH;
    pk.x = (float) this.x;
    pk.y = (float) this.y;
    pk.z = (float) this.z;
    pk.data = this.data;

    return new DataPacket[]{pk};
}
 
开发者ID:CoreXDevelopment,项目名称:CoreX,代码行数:12,代码来源:SpellParticle.java

示例3: encode

import cn.nukkit.network.protocol.LevelEventPacket; //导入依赖的package包/类
@Override
public DataPacket[] encode() {
    LevelEventPacket pk = new LevelEventPacket();
    pk.evid = (short) (LevelEventPacket.EVENT_ADD_PARTICLE_MASK | this.id);
    pk.x = (float) this.x;
    pk.y = (float) this.y;
    pk.z = (float) this.z;
    pk.data = this.data;

    return new DataPacket[]{pk};
}
 
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:12,代码来源:GenericParticle.java

示例4: encode

import cn.nukkit.network.protocol.LevelEventPacket; //导入依赖的package包/类
@Override
public DataPacket[] encode() {
    LevelEventPacket pk = new LevelEventPacket();
    pk.evid = LevelEventPacket.EVENT_PARTICLE_DESTROY;
    pk.x = (float) this.x;
    pk.y = (float) this.y;
    pk.z = (float) this.z;
    pk.data = this.data;

    return new DataPacket[]{pk};
}
 
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:12,代码来源:DestroyBlockParticle.java

示例5: encode

import cn.nukkit.network.protocol.LevelEventPacket; //导入依赖的package包/类
@Override
public DataPacket[] encode() {
    LevelEventPacket packet = new LevelEventPacket();
    packet.evid = LevelEventPacket.EVENT_PARTICLE_SPAWN;
    packet.x = (float) this.x;
    packet.y = (float) this.y;
    packet.z = (float) this.z;
    packet.data = (this.width & 0xff) + ((this.height & 0xff) << 8);

    return new DataPacket[]{packet};
}
 
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:12,代码来源:MobSpawnParticle.java

示例6: encode

import cn.nukkit.network.protocol.LevelEventPacket; //导入依赖的package包/类
@Override
public DataPacket[] encode() {
    LevelEventPacket pk = new LevelEventPacket();
    pk.evid = LevelEventPacket.EVENT_PARTICLE_PUNCH_BLOCK;
    pk.x = (float) this.x;
    pk.y = (float) this.y;
    pk.z = (float) this.z;
    pk.data = this.data;

    return new DataPacket[]{pk};
}
 
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:12,代码来源:PunchBlockParticle.java

示例7: encode

import cn.nukkit.network.protocol.LevelEventPacket; //导入依赖的package包/类
@Override
public DataPacket[] encode() {
    LevelEventPacket pk = new LevelEventPacket();
    pk.evid = this.id;
    pk.x = (float) this.x;
    pk.y = (float) this.y;
    pk.z = (float) this.z;
    pk.data = (int) this.pitch;

    return new DataPacket[]{pk};
}
 
开发者ID:JupiterDevelopmentTeam,项目名称:Jupiter,代码行数:12,代码来源:LevelEventSound.java

示例8: sendBlockExtraData

import cn.nukkit.network.protocol.LevelEventPacket; //导入依赖的package包/类
public void sendBlockExtraData(int x, int y, int z, int id, int data, Player[] players) {
    LevelEventPacket pk = new LevelEventPacket();
    pk.evid = LevelEventPacket.EVENT_SET_DATA;
    pk.x = x + 0.5f;
    pk.y = y + 0.5f;
    pk.z = z + 0.5f;
    pk.data = (data << 8) | id;

    Server.broadcastPacket(players, pk);
}
 
开发者ID:JupiterDevelopmentTeam,项目名称:Jupiter,代码行数:11,代码来源:Level.java

示例9: DoorCrashSound

import cn.nukkit.network.protocol.LevelEventPacket; //导入依赖的package包/类
public DoorCrashSound(Vector3 pos, float pitch) {
    super(pos, LevelEventPacket.EVENT_SOUND_DOOR_CRASH, pitch);
}
 
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:4,代码来源:DoorCrashSound.java

示例10: DoorBumpSound

import cn.nukkit.network.protocol.LevelEventPacket; //导入依赖的package包/类
public DoorBumpSound(Vector3 pos, float pitch) {
    super(pos, LevelEventPacket.EVENT_SOUND_DOOR_BUMP, pitch);
}
 
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:4,代码来源:DoorBumpSound.java

示例11: ItemFrameItemAddedSound

import cn.nukkit.network.protocol.LevelEventPacket; //导入依赖的package包/类
public ItemFrameItemAddedSound(Vector3 pos, float pitch) {
    super(pos, LevelEventPacket.EVENT_SOUND_ITEM_FRAME_ITEM_ADDED, pitch);
}
 
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:4,代码来源:ItemFrameItemAddedSound.java

示例12: ClickFailSound

import cn.nukkit.network.protocol.LevelEventPacket; //导入依赖的package包/类
public ClickFailSound(Vector3 pos, float pitch) {
    super(pos, LevelEventPacket.EVENT_SOUND_CLICK_FAIL, pitch);
}
 
开发者ID:CoreXDevelopment,项目名称:CoreX,代码行数:4,代码来源:ClickFailSound.java

示例13: ItemFramePlacedSound

import cn.nukkit.network.protocol.LevelEventPacket; //导入依赖的package包/类
public ItemFramePlacedSound(Vector3 pos, float pitch) {
    super(pos, LevelEventPacket.EVENT_SOUND_ITEM_FRAME_PLACED, pitch);
}
 
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:4,代码来源:ItemFramePlacedSound.java

示例14: ClickSound

import cn.nukkit.network.protocol.LevelEventPacket; //导入依赖的package包/类
public ClickSound(Vector3 pos, float pitch) {
    super(pos, LevelEventPacket.EVENT_SOUND_CLICK, pitch);
}
 
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:4,代码来源:ClickSound.java

示例15: ExplodeSound

import cn.nukkit.network.protocol.LevelEventPacket; //导入依赖的package包/类
public ExplodeSound(Vector3 pos, float pitch) {
    super(pos, LevelEventPacket.EVENT_SOUND_EXPLODE, pitch);
}
 
开发者ID:CoreXDevelopment,项目名称:CoreX,代码行数:4,代码来源:ExplodeSound.java


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