Class ServerboundMovePlayerPacket
java.lang.Object
net.minecraft.network.protocol.game.ServerboundMovePlayerPacket
- All Implemented Interfaces:
Packet<ServerGamePacketListener>
- Direct Known Subclasses:
ServerboundMovePlayerPacket.Pos
,ServerboundMovePlayerPacket.PosRot
,ServerboundMovePlayerPacket.Rot
,ServerboundMovePlayerPacket.StatusOnly
public abstract class ServerboundMovePlayerPacket
extends Object
implements Packet<ServerGamePacketListener>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static class
static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final int
protected final boolean
protected final boolean
protected final boolean
protected final boolean
protected final double
protected final float
protected final double
protected final float
protected final double
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ServerboundMovePlayerPacket
(double pX, double pY, double pZ, float pYRot, float pXRot, boolean pOnGround, boolean pHorizontalCollision, boolean pHasPos, boolean pHasRot) -
Method Summary
Modifier and TypeMethodDescriptiondouble
getX
(double pDefaultValue) float
getXRot
(float pDefaultValue) double
getY
(double pDefaultValue) float
getYRot
(float pDefaultValue) double
getZ
(double pDefaultValue) void
handle
(ServerGamePacketListener pHandler) Passes this Packet on to the NetHandler for processing.boolean
boolean
boolean
boolean
(package private) static int
packFlags
(boolean pOnGround, boolean pHorizontalCollision) abstract PacketType
<? extends ServerboundMovePlayerPacket> type()
(package private) static boolean
unpackHorizontalCollision
(int pFlags) (package private) static boolean
unpackOnGround
(int pFlags) 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.protocol.Packet
isSkippable, isTerminal
-
Field Details
-
FLAG_ON_GROUND
private static final int FLAG_ON_GROUND- See Also:
-
FLAG_HORIZONTAL_COLLISION
private static final int FLAG_HORIZONTAL_COLLISION- See Also:
-
x
protected final double x -
y
protected final double y -
z
protected final double z -
yRot
protected final float yRot -
xRot
protected final float xRot -
onGround
protected final boolean onGround -
horizontalCollision
protected final boolean horizontalCollision -
hasPos
protected final boolean hasPos -
hasRot
protected final boolean hasRot
-
-
Constructor Details
-
ServerboundMovePlayerPacket
protected ServerboundMovePlayerPacket(double pX, double pY, double pZ, float pYRot, float pXRot, boolean pOnGround, boolean pHorizontalCollision, boolean pHasPos, boolean pHasRot)
-
-
Method Details
-
packFlags
static int packFlags(boolean pOnGround, boolean pHorizontalCollision) -
unpackOnGround
static boolean unpackOnGround(int pFlags) -
unpackHorizontalCollision
static boolean unpackHorizontalCollision(int pFlags) -
type
- Specified by:
type
in interfacePacket<ServerGamePacketListener>
-
handle
Passes this Packet on to the NetHandler for processing.- Specified by:
handle
in interfacePacket<ServerGamePacketListener>
-
getX
public double getX(double pDefaultValue) -
getY
public double getY(double pDefaultValue) -
getZ
public double getZ(double pDefaultValue) -
getYRot
public float getYRot(float pDefaultValue) -
getXRot
public float getXRot(float pDefaultValue) -
isOnGround
public boolean isOnGround() -
horizontalCollision
public boolean horizontalCollision() -
hasPosition
public boolean hasPosition() -
hasRotation
public boolean hasRotation()
-