TeleportConfirmPacket
This commit is contained in:
@@ -44,6 +44,7 @@ public enum State {
|
||||
PLAY(3,
|
||||
// server bound
|
||||
Map.of(
|
||||
0x00, TeleportConfirmPacket.class,
|
||||
0x04, ClientSettingsPacket.class,
|
||||
0x09, PluginMessagePacket.class
|
||||
),
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package mc.protocol.packets.client;
|
||||
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
import mc.protocol.io.NetByteBuf;
|
||||
import mc.protocol.packets.ClientSidePacket;
|
||||
import mc.protocol.packets.server.PlayerPositionAndLookPacket;
|
||||
|
||||
/**
|
||||
* Teleport сonfirm packet.
|
||||
*
|
||||
* <p>Структура пакета</p>
|
||||
* <pre>
|
||||
* | FIELD | TYPE | NOTES |
|
||||
* |-------------|--------|-----------------------------------------------------------|
|
||||
* | Teleport ID | VarInt | ID, который был выдан пакетом {@link PlayerPositionAndLookPacket} |
|
||||
* </pre>
|
||||
*
|
||||
* @see <a href="https://wiki.vg/index.php?title=Protocol&oldid=7368#Login_Start" target="_top">Login start</a>
|
||||
* @see PlayerPositionAndLookPacket
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Getter
|
||||
@EqualsAndHashCode
|
||||
@ToString
|
||||
public class TeleportConfirmPacket implements ClientSidePacket {
|
||||
|
||||
private int teleportId;
|
||||
|
||||
@Override
|
||||
public void readSelf(NetByteBuf netByteBuf) {
|
||||
this.teleportId = netByteBuf.readVarInt();
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import mc.protocol.io.NetByteBuf;
|
||||
import mc.protocol.model.Location;
|
||||
import mc.protocol.model.Look;
|
||||
import mc.protocol.packets.ServerSidePacket;
|
||||
import mc.protocol.packets.client.TeleportConfirmPacket;
|
||||
|
||||
/**
|
||||
* Установка позиции и угла осмотра Игрока.
|
||||
@@ -37,6 +38,7 @@ import mc.protocol.packets.ServerSidePacket;
|
||||
* <i>"It's a bitfield, X/Y/Z/Y_ROT/X_ROT. If X is set, the x value is relative and not absolute."</i>
|
||||
*
|
||||
* @see <a href="https://wiki.vg/index.php?title=Protocol&oldid=14204#Player_Position_And_Look_.28clientbound.29">Player Position And Look</a>
|
||||
* @see TeleportConfirmPacket
|
||||
*/
|
||||
@Data
|
||||
public class PlayerPositionAndLookPacket implements ServerSidePacket {
|
||||
|
||||
Reference in New Issue
Block a user