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 classPlayerMoveC2SPacket.Bothstatic classPlayerMoveC2SPacket.LookOnlystatic classPlayerMoveC2SPacket.PositionOnly -
Field Summary
Fields Modifier and Type Field Description protected booleanchangeLookprotected booleanchangePositionprotected booleanonGroundprotected floatpitchprotected doublexprotected doubleyprotected floatyawprotected doublez -
Constructor Summary
Constructors Constructor Description PlayerMoveC2SPacket()PlayerMoveC2SPacket(boolean onGround) -
Method Summary
Modifier and Type Method Description voidapply(ServerPlayPacketListener serverPlayPacketListener)floatgetPitch(float currentPitch)doublegetX(double currentX)doublegetY(double currentY)floatgetYaw(float currentYaw)doublegetZ(double currentZ)booleanisOnGround()voidread(PacketByteBuf buf)voidwrite(PacketByteBuf buf)
-
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:
applyin interfacePacket<ServerPlayPacketListener>
-
read
- Specified by:
readin interfacePacket<ServerPlayPacketListener>- Throws:
IOException
-
write
- Specified by:
writein 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()
-