Class EntityS2CPacket
java.lang.Object
net.minecraft.network.packet.s2c.play.EntityS2CPacket
- All Implemented Interfaces:
Packet<ClientPlayPacketListener>
- Direct Known Subclasses:
EntityS2CPacket.MoveRelative
,EntityS2CPacket.Rotate
,EntityS2CPacket.RotateAndMoveRelative
public class EntityS2CPacket extends Object implements Packet<ClientPlayPacketListener>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EntityS2CPacket.MoveRelative
static class
EntityS2CPacket.Rotate
static class
EntityS2CPacket.RotateAndMoveRelative
-
Field Summary
-
Constructor Summary
Constructors Constructor Description EntityS2CPacket()
EntityS2CPacket(int entityId)
-
Method Summary
Modifier and Type Method 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)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.network.Packet
isWritingErrorSkippable
-
Field Details
-
id
protected int id -
deltaX
protected short deltaX -
deltaY
protected short deltaY -
deltaZ
protected short deltaZ -
yaw
protected byte yaw -
pitch
protected byte pitch -
onGround
protected boolean onGround -
rotate
protected boolean rotate -
positionChanged
protected boolean positionChanged
-
-
Constructor Details
-
EntityS2CPacket
public EntityS2CPacket() -
EntityS2CPacket
public EntityS2CPacket(int entityId)
-
-
Method Details
-
encodePacketCoordinate
public static long encodePacketCoordinate(double coord) -
decodePacketCoordinate
@Environment(CLIENT) public static double decodePacketCoordinate(long coord) -
calculateDeltaPosition
-
decodePacketCoordinates
-
read
- Specified by:
read
in interfacePacket<ClientPlayPacketListener>
- Throws:
IOException
-
write
- Specified by:
write
in interfacePacket<ClientPlayPacketListener>
- Throws:
IOException
-
apply
- Specified by:
apply
in interfacePacket<ClientPlayPacketListener>
-
toString
-
getEntity
-
getYaw
@Environment(CLIENT) public byte getYaw() -
getPitch
@Environment(CLIENT) public byte getPitch() -
hasRotation
@Environment(CLIENT) public boolean hasRotation() -
isPositionChanged
@Environment(CLIENT) public boolean isPositionChanged() -
isOnGround
@Environment(CLIENT) public boolean isOnGround()
-