Class PlayerMoveC2SPacket
java.lang.Object
net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket
- All Implemented Interfaces:
Packet<ServerPlayPacketListener>
- Direct Known Subclasses:
PlayerMoveC2SPacket.Both
,PlayerMoveC2SPacket.LookOnly
,PlayerMoveC2SPacket.PositionOnly
public class PlayerMoveC2SPacket extends Object implements Packet<ServerPlayPacketListener>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PlayerMoveC2SPacket.Both
static class
PlayerMoveC2SPacket.LookOnly
static class
PlayerMoveC2SPacket.PositionOnly
-
Field Summary
Fields Modifier and Type Field Description protected boolean
changeLook
protected boolean
changePosition
protected boolean
onGround
protected float
pitch
protected double
x
protected double
y
protected float
yaw
protected double
z
-
Constructor Summary
Constructors Constructor Description PlayerMoveC2SPacket()
PlayerMoveC2SPacket(boolean onGround)
-
Method Summary
Modifier and Type Method Description void
apply(ServerPlayPacketListener serverPlayPacketListener)
float
getPitch(float currentPitch)
double
getX(double currentX)
double
getY(double currentY)
float
getYaw(float currentYaw)
double
getZ(double currentZ)
boolean
isOnGround()
void
read(PacketByteBuf buf)
void
write(PacketByteBuf buf)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.network.Packet
isWritingErrorSkippable
-
Field Details
-
x
protected double x -
y
protected double y -
z
protected double z -
yaw
protected float yaw -
pitch
protected float pitch -
onGround
protected boolean onGround -
changePosition
protected boolean changePosition -
changeLook
protected boolean changeLook
-
-
Constructor Details
-
PlayerMoveC2SPacket
public PlayerMoveC2SPacket() -
PlayerMoveC2SPacket
@Environment(CLIENT) public PlayerMoveC2SPacket(boolean onGround)
-
-
Method Details
-
apply
- Specified by:
apply
in interfacePacket<ServerPlayPacketListener>
-
read
- Specified by:
read
in interfacePacket<ServerPlayPacketListener>
- Throws:
IOException
-
write
- Specified by:
write
in interfacePacket<ServerPlayPacketListener>
- Throws:
IOException
-
getX
public double getX(double currentX) -
getY
public double getY(double currentY) -
getZ
public double getZ(double currentZ) -
getYaw
public float getYaw(float currentYaw) -
getPitch
public float getPitch(float currentPitch) -
isOnGround
public boolean isOnGround()
-