Class WrapperPlayServerEntityLook

java.lang.Object
com.comphenix.packetwrapper.wrappers.AbstractPacket
com.comphenix.packetwrapper.wrappers.play.clientbound.WrapperPlayServerEntityLook

public class WrapperPlayServerEntityLook extends AbstractPacket
Sent by the server when an entity rotates. If the entity should be moved within an 8 block range as well, use WrapperPlayServerRelEntityMoveLook.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.comphenix.protocol.PacketType
    The packet type that is wrapped by this wrapper.

    Fields inherited from class com.comphenix.packetwrapper.wrappers.AbstractPacket

    handle
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new wrapper and initialize it with a packet handle with default values
    WrapperPlayServerEntityLook(com.comphenix.protocol.events.PacketContainer packet)
    Constructors a new wrapper for the specified packet
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Retrieves the id of the entity to move
    boolean
    Retrieves whether the entity is on ground
    float
    Gets the rotation around the x-axis (pitch) in degrees.
    float
    Gets the rotation around the y-axis (yaw) as degrees.
    void
    setEntityId(int value)
    Sets the id of the entity to move
    void
    setOnGround(boolean value)
    Sets whether the entity is on ground
    void
    setPitch(float value)
    Sets the rotation around the x-axis (pitch) in degrees.
    void
    setYaw(float value)
    Sets the rotation around the y-axis (yaw) in degrees.

    Methods inherited from class com.comphenix.packetwrapper.wrappers.AbstractPacket

    broadcastPacket, equals, getHandle, hashCode, receivePacket, sendPacket

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • TYPE

      public static final com.comphenix.protocol.PacketType TYPE
      The packet type that is wrapped by this wrapper.
  • Constructor Details

    • WrapperPlayServerEntityLook

      public WrapperPlayServerEntityLook()
      Constructs a new wrapper and initialize it with a packet handle with default values
    • WrapperPlayServerEntityLook

      public WrapperPlayServerEntityLook(com.comphenix.protocol.events.PacketContainer packet)
      Constructors a new wrapper for the specified packet
      Parameters:
      packet - the packet to wrap
  • Method Details

    • getEntityId

      public int getEntityId()
      Retrieves the id of the entity to move
      Returns:
      id of the entity to move
    • setEntityId

      public void setEntityId(int value)
      Sets the id of the entity to move
      Parameters:
      value - id of the entity to move
    • getYaw

      public float getYaw()
      Gets the rotation around the y-axis (yaw) as degrees.
      Returns:
      rotation around the y-axis (yaw) as degrees.
    • setYaw

      public void setYaw(float value)
      Sets the rotation around the y-axis (yaw) in degrees. This value will be implicitly converted to a discrete rotation. Thus, the angle returned by getYaw() might differ.
      Parameters:
      value - new y-axis rotation in degrees
    • getPitch

      public float getPitch()
      Gets the rotation around the x-axis (pitch) in degrees.
      Returns:
      rotation around the x-axis (pitch) in degrees.
    • setPitch

      public void setPitch(float value)
      Sets the rotation around the x-axis (pitch) in degrees. This value will be implicitly converted to a discrete rotation. Thus, the angle returned by getPitch() might differ.
      Parameters:
      value - new x-axis rotation in degrees
    • getOnGround

      public boolean getOnGround()
      Retrieves whether the entity is on ground
      Returns:
      true if the entity is on ground
    • setOnGround

      public void setOnGround(boolean value)
      Sets whether the entity is on ground
      Parameters:
      value - true if the entity is on ground