com.nukkitx.protocol.bedrock.packet.RespawnPacket Java Examples
The following examples show how to use
com.nukkitx.protocol.bedrock.packet.RespawnPacket.
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: BedrockRespawnTranslator.java From Geyser with MIT License | 5 votes |
@Override public void translate(RespawnPacket packet, GeyserSession session) { if (packet.getState() == RespawnPacket.State.CLIENT_READY) { RespawnPacket respawnPacket = new RespawnPacket(); respawnPacket.setRuntimeEntityId(0); respawnPacket.setPosition(Vector3f.ZERO); respawnPacket.setState(RespawnPacket.State.SERVER_SEARCHING); session.sendUpstreamPacket(respawnPacket); ClientRequestPacket javaRespawnPacket = new ClientRequestPacket(ClientRequest.RESPAWN); session.sendDownstreamPacket(javaRespawnPacket); } }
Example #2
Source File: RespawnSerializer_v354.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void serialize(ByteBuf buffer, RespawnPacket packet) { BedrockUtils.writeVector3f(buffer, packet.getPosition()); }
Example #3
Source File: RespawnSerializer_v354.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void deserialize(ByteBuf buffer, RespawnPacket packet) { packet.setPosition(BedrockUtils.readVector3f(buffer)); }
Example #4
Source File: RespawnSerializer_v388.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void serialize(ByteBuf buffer, RespawnPacket packet) { BedrockUtils.writeVector3f(buffer, packet.getPosition()); buffer.writeByte(packet.getState().ordinal()); VarInts.writeUnsignedLong(buffer, packet.getRuntimeEntityId()); }
Example #5
Source File: RespawnSerializer_v388.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void deserialize(ByteBuf buffer, RespawnPacket packet) { packet.setPosition(BedrockUtils.readVector3f(buffer)); packet.setState(VALUES[buffer.readUnsignedByte()]); packet.setRuntimeEntityId(VarInts.readUnsignedLong(buffer)); }
Example #6
Source File: RespawnSerializer_v340.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void serialize(ByteBuf buffer, RespawnPacket packet) { BedrockUtils.writeVector3f(buffer, packet.getPosition()); }
Example #7
Source File: RespawnSerializer_v340.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void deserialize(ByteBuf buffer, RespawnPacket packet) { packet.setPosition(BedrockUtils.readVector3f(buffer)); }
Example #8
Source File: RespawnSerializer_v313.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void serialize(ByteBuf buffer, RespawnPacket packet) { BedrockUtils.writeVector3f(buffer, packet.getPosition()); }
Example #9
Source File: RespawnSerializer_v313.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void deserialize(ByteBuf buffer, RespawnPacket packet) { packet.setPosition(BedrockUtils.readVector3f(buffer)); }
Example #10
Source File: RespawnSerializer_v361.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void serialize(ByteBuf buffer, RespawnPacket packet) { BedrockUtils.writeVector3f(buffer, packet.getPosition()); }
Example #11
Source File: RespawnSerializer_v361.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void deserialize(ByteBuf buffer, RespawnPacket packet) { packet.setPosition(BedrockUtils.readVector3f(buffer)); }
Example #12
Source File: RespawnSerializer_v332.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void serialize(ByteBuf buffer, RespawnPacket packet) { BedrockUtils.writeVector3f(buffer, packet.getPosition()); }
Example #13
Source File: RespawnSerializer_v332.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void deserialize(ByteBuf buffer, RespawnPacket packet) { packet.setPosition(BedrockUtils.readVector3f(buffer)); }
Example #14
Source File: RespawnSerializer_v291.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void serialize(ByteBuf buffer, RespawnPacket packet) { BedrockUtils.writeVector3f(buffer, packet.getPosition()); }
Example #15
Source File: RespawnSerializer_v291.java From Protocol with Apache License 2.0 | 4 votes |
@Override public void deserialize(ByteBuf buffer, RespawnPacket packet) { packet.setPosition(BedrockUtils.readVector3f(buffer)); }