Java Code Examples for com.nukkitx.protocol.bedrock.packet.SetSpawnPositionPacket#setSpawnType()
The following examples show how to use
com.nukkitx.protocol.bedrock.packet.SetSpawnPositionPacket#setSpawnType() .
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 deserialize(ByteBuf buffer, SetSpawnPositionPacket packet) { packet.setSpawnType(SetSpawnPositionPacket.Type.values()[VarInts.readInt(buffer)]); packet.setBlockPosition(BedrockUtils.readBlockPosition(buffer)); packet.setSpawnForced(buffer.readBoolean()); }
Example 3
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 4
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 5
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 6
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 7
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 8
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()); }