public class EntityS2CPacket extends Object implements Packet<ClientPlayPacketListener>
Modifier and Type | Class and Description |
---|---|
static class |
EntityS2CPacket.MoveRelative |
static class |
EntityS2CPacket.Rotate |
static class |
EntityS2CPacket.RotateAndMoveRelative |
Modifier and Type | Field and Description |
---|---|
protected short |
deltaX |
protected short |
deltaY |
protected short |
deltaZ |
protected int |
id |
protected boolean |
onGround |
protected byte |
pitch |
protected boolean |
positionChanged |
protected boolean |
rotate |
protected byte |
yaw |
Constructor and Description |
---|
EntityS2CPacket() |
EntityS2CPacket(int entityId) |
Modifier and Type | Method and Description |
---|---|
void |
apply(ClientPlayPacketListener clientPlayPacketListener) |
Vec3d |
calculateDeltaPosition(Vec3d orig) |
static double |
decodePacketCoordinate(long coord) |
static Vec3d |
decodePacketCoordinates(long x,
long y,
long z) |
static long |
encodePacketCoordinate(double coord) |
Entity |
getEntity(World world) |
byte |
getPitch() |
byte |
getYaw() |
boolean |
hasRotation() |
boolean |
isOnGround() |
boolean |
isPositionChanged() |
void |
read(PacketByteBuf buf) |
String |
toString() |
void |
write(PacketByteBuf buf) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isWritingErrorSkippable
protected int id
protected short deltaX
protected short deltaY
protected short deltaZ
protected byte yaw
protected byte pitch
protected boolean onGround
protected boolean rotate
protected boolean positionChanged
public EntityS2CPacket()
public EntityS2CPacket(int entityId)
public static long encodePacketCoordinate(double coord)
@Environment(value=CLIENT) public static double decodePacketCoordinate(long coord)
public static Vec3d decodePacketCoordinates(long x, long y, long z)
public void read(PacketByteBuf buf) throws IOException
read
in interface Packet<ClientPlayPacketListener>
IOException
public void write(PacketByteBuf buf) throws IOException
write
in interface Packet<ClientPlayPacketListener>
IOException
public void apply(ClientPlayPacketListener clientPlayPacketListener)
apply
in interface Packet<ClientPlayPacketListener>
@Environment(value=CLIENT) public byte getYaw()
@Environment(value=CLIENT) public byte getPitch()
@Environment(value=CLIENT) public boolean hasRotation()
@Environment(value=CLIENT) public boolean isPositionChanged()
@Environment(value=CLIENT) public boolean isOnGround()