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 classstatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intprotected final booleanprotected final booleanprotected final booleanprotected final booleanprotected final doubleprotected final floatprotected final doubleprotected final floatprotected final double -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedServerboundMovePlayerPacket(double x, double y, double z, float yRot, float xRot, boolean onGround, boolean horizontalCollision, boolean hasPos, boolean hasRot) -
Method Summary
Modifier and TypeMethodDescriptiondoublegetX(double defaultValue) floatgetXRot(float defaultValue) doublegetY(double defaultValue) floatgetYRot(float defaultValue) doublegetZ(double defaultValue) voidhandle(ServerGamePacketListener handler) Passes this Packet on to the NetHandler for processing.booleanbooleanbooleanboolean(package private) static intpackFlags(boolean onGround, boolean horizontalCollision) abstract PacketType<? extends ServerboundMovePlayerPacket> type()(package private) static booleanunpackHorizontalCollision(int flags) (package private) static booleanunpackOnGround(int flags) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 x, double y, double z, float yRot, float xRot, boolean onGround, boolean horizontalCollision, boolean hasPos, boolean hasRot)
-
-
Method Details
-
packFlags
static int packFlags(boolean onGround, boolean horizontalCollision) -
unpackOnGround
static boolean unpackOnGround(int flags) -
unpackHorizontalCollision
static boolean unpackHorizontalCollision(int flags) -
type
- Specified by:
typein interfacePacket<ServerGamePacketListener>
-
handle
Passes this Packet on to the NetHandler for processing.- Specified by:
handlein interfacePacket<ServerGamePacketListener>
-
getX
public double getX(double defaultValue) -
getY
public double getY(double defaultValue) -
getZ
public double getZ(double defaultValue) -
getYRot
public float getYRot(float defaultValue) -
getXRot
public float getXRot(float defaultValue) -
isOnGround
public boolean isOnGround() -
horizontalCollision
public boolean horizontalCollision() -
hasPosition
public boolean hasPosition() -
hasRotation
public boolean hasRotation()
-