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>
  • 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

      @Environment(CLIENT) public Vec3d calculateDeltaPosition​(Vec3d orig)
    • decodePacketCoordinates

      public static Vec3d decodePacketCoordinates​(long x, long y, long z)
    • read

      public void read​(PacketByteBuf buf) throws IOException
      Specified by:
      read in interface Packet<ClientPlayPacketListener>
      Throws:
      IOException
    • write

      public void write​(PacketByteBuf buf) throws IOException
      Specified by:
      write in interface Packet<ClientPlayPacketListener>
      Throws:
      IOException
    • apply

      public void apply​(ClientPlayPacketListener clientPlayPacketListener)
      Specified by:
      apply in interface Packet<ClientPlayPacketListener>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getEntity

      @Environment(CLIENT) @Nullable public Entity getEntity​(World world)
    • 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()