本文整理汇总了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};
}
示例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};
}
示例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};
}
示例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};
}
示例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};
}
示例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};
}
示例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};
}
示例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);
}
示例9: DoorCrashSound
import cn.nukkit.network.protocol.LevelEventPacket; //导入依赖的package包/类
public DoorCrashSound(Vector3 pos, float pitch) {
super(pos, LevelEventPacket.EVENT_SOUND_DOOR_CRASH, pitch);
}
示例10: DoorBumpSound
import cn.nukkit.network.protocol.LevelEventPacket; //导入依赖的package包/类
public DoorBumpSound(Vector3 pos, float pitch) {
super(pos, LevelEventPacket.EVENT_SOUND_DOOR_BUMP, pitch);
}
示例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);
}
示例12: ClickFailSound
import cn.nukkit.network.protocol.LevelEventPacket; //导入依赖的package包/类
public ClickFailSound(Vector3 pos, float pitch) {
super(pos, LevelEventPacket.EVENT_SOUND_CLICK_FAIL, pitch);
}
示例13: ItemFramePlacedSound
import cn.nukkit.network.protocol.LevelEventPacket; //导入依赖的package包/类
public ItemFramePlacedSound(Vector3 pos, float pitch) {
super(pos, LevelEventPacket.EVENT_SOUND_ITEM_FRAME_PLACED, pitch);
}
示例14: ClickSound
import cn.nukkit.network.protocol.LevelEventPacket; //导入依赖的package包/类
public ClickSound(Vector3 pos, float pitch) {
super(pos, LevelEventPacket.EVENT_SOUND_CLICK, pitch);
}
示例15: ExplodeSound
import cn.nukkit.network.protocol.LevelEventPacket; //导入依赖的package包/类
public ExplodeSound(Vector3 pos, float pitch) {
super(pos, LevelEventPacket.EVENT_SOUND_EXPLODE, pitch);
}