com.nukkitx.protocol.bedrock.packet.SetSpawnPositionPacket Java Examples
The following examples show how to use
com.nukkitx.protocol.bedrock.packet.SetSpawnPositionPacket.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JavaSpawnPositionTranslator.java From Geyser with MIT License | 5 votes |
@Override public void translate(ServerSpawnPositionPacket packet, GeyserSession session) { SetSpawnPositionPacket spawnPositionPacket = new SetSpawnPositionPacket(); spawnPositionPacket.setBlockPosition(Vector3i.from(packet.getPosition().getX(), packet.getPosition().getY(), packet.getPosition().getZ())); spawnPositionPacket.setSpawnForced(true); spawnPositionPacket.setSpawnType(SetSpawnPositionPacket.Type.WORLD_SPAWN); session.sendUpstreamPacket(spawnPositionPacket); }
Example #2
Source File: SetSpawnPositionSerializer_v354.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void serialize(ByteBuf buffer, SetSpawnPositionPacket packet) { VarInts.writeInt(buffer, packet.getSpawnType().ordinal()); BedrockUtils.writeBlockPosition(buffer, packet.getBlockPosition()); buffer.writeBoolean(packet.isSpawnForced()); }
Example #3
Source File: SetSpawnPositionSerializer_v354.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void deserialize(ByteBuf buffer, SetSpawnPositionPacket packet) { packet.setSpawnType(SetSpawnPositionPacket.Type.values()[VarInts.readInt(buffer)]); packet.setBlockPosition(BedrockUtils.readBlockPosition(buffer)); packet.setSpawnForced(buffer.readBoolean()); }
Example #4
Source File: SetSpawnPositionSerializer_v388.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void serialize(ByteBuf buffer, SetSpawnPositionPacket packet) { VarInts.writeInt(buffer, packet.getSpawnType().ordinal()); BedrockUtils.writeBlockPosition(buffer, packet.getBlockPosition()); buffer.writeBoolean(packet.isSpawnForced()); }
Example #5
Source File: SetSpawnPositionSerializer_v388.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void deserialize(ByteBuf buffer, SetSpawnPositionPacket packet) { packet.setSpawnType(SetSpawnPositionPacket.Type.values()[VarInts.readInt(buffer)]); packet.setBlockPosition(BedrockUtils.readBlockPosition(buffer)); packet.setSpawnForced(buffer.readBoolean()); }
Example #6
Source File: SetSpawnPositionSerializer_v340.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void serialize(ByteBuf buffer, SetSpawnPositionPacket packet) { VarInts.writeInt(buffer, packet.getSpawnType().ordinal()); BedrockUtils.writeBlockPosition(buffer, packet.getBlockPosition()); buffer.writeBoolean(packet.isSpawnForced()); }
Example #7
Source File: SetSpawnPositionSerializer_v340.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void deserialize(ByteBuf buffer, SetSpawnPositionPacket packet) { packet.setSpawnType(SetSpawnPositionPacket.Type.values()[VarInts.readInt(buffer)]); packet.setBlockPosition(BedrockUtils.readBlockPosition(buffer)); packet.setSpawnForced(buffer.readBoolean()); }
Example #8
Source File: SetSpawnPositionSerializer_v313.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void serialize(ByteBuf buffer, SetSpawnPositionPacket packet) { VarInts.writeInt(buffer, packet.getSpawnType().ordinal()); BedrockUtils.writeBlockPosition(buffer, packet.getBlockPosition()); buffer.writeBoolean(packet.isSpawnForced()); }
Example #9
Source File: SetSpawnPositionSerializer_v313.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void deserialize(ByteBuf buffer, SetSpawnPositionPacket packet) { packet.setSpawnType(SetSpawnPositionPacket.Type.values()[VarInts.readInt(buffer)]); packet.setBlockPosition(BedrockUtils.readBlockPosition(buffer)); packet.setSpawnForced(buffer.readBoolean()); }
Example #10
Source File: SetSpawnPositionSerializer_v361.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void serialize(ByteBuf buffer, SetSpawnPositionPacket packet) { VarInts.writeInt(buffer, packet.getSpawnType().ordinal()); BedrockUtils.writeBlockPosition(buffer, packet.getBlockPosition()); buffer.writeBoolean(packet.isSpawnForced()); }
Example #11
Source File: SetSpawnPositionSerializer_v361.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void deserialize(ByteBuf buffer, SetSpawnPositionPacket packet) { packet.setSpawnType(SetSpawnPositionPacket.Type.values()[VarInts.readInt(buffer)]); packet.setBlockPosition(BedrockUtils.readBlockPosition(buffer)); packet.setSpawnForced(buffer.readBoolean()); }
Example #12
Source File: SetSpawnPositionSerializer_v332.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void serialize(ByteBuf buffer, SetSpawnPositionPacket packet) { VarInts.writeInt(buffer, packet.getSpawnType().ordinal()); BedrockUtils.writeBlockPosition(buffer, packet.getBlockPosition()); buffer.writeBoolean(packet.isSpawnForced()); }
Example #13
Source File: SetSpawnPositionSerializer_v332.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void deserialize(ByteBuf buffer, SetSpawnPositionPacket packet) { packet.setSpawnType(SetSpawnPositionPacket.Type.values()[VarInts.readInt(buffer)]); packet.setBlockPosition(BedrockUtils.readBlockPosition(buffer)); packet.setSpawnForced(buffer.readBoolean()); }
Example #14
Source File: SetSpawnPositionSerializer_v291.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void serialize(ByteBuf buffer, SetSpawnPositionPacket packet) { VarInts.writeInt(buffer, packet.getSpawnType().ordinal()); BedrockUtils.writeBlockPosition(buffer, packet.getBlockPosition()); buffer.writeBoolean(packet.isSpawnForced()); }
Example #15
Source File: SetSpawnPositionSerializer_v291.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void deserialize(ByteBuf buffer, SetSpawnPositionPacket packet) { packet.setSpawnType(SetSpawnPositionPacket.Type.values()[VarInts.readInt(buffer)]); packet.setBlockPosition(BedrockUtils.readBlockPosition(buffer)); packet.setSpawnForced(buffer.readBoolean()); }