Class WrapperPlayServerEntityLook
java.lang.Object
com.comphenix.packetwrapper.wrappers.AbstractPacket
com.comphenix.packetwrapper.wrappers.play.clientbound.WrapperPlayServerEntityLook
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
FieldsModifier and TypeFieldDescriptionstatic final com.comphenix.protocol.PacketTypeThe packet type that is wrapped by this wrapper.Fields inherited from class com.comphenix.packetwrapper.wrappers.AbstractPacket
handle -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new wrapper and initialize it with a packet handle with default valuesWrapperPlayServerEntityLook(com.comphenix.protocol.events.PacketContainer packet) Constructors a new wrapper for the specified packet -
Method Summary
Modifier and TypeMethodDescriptionintRetrieves the id of the entity to movebooleanRetrieves whether the entity is on groundfloatgetPitch()Gets the rotation around the x-axis (pitch) in degrees.floatgetYaw()Gets the rotation around the y-axis (yaw) as degrees.voidsetEntityId(int value) Sets the id of the entity to movevoidsetOnGround(boolean value) Sets whether the entity is on groundvoidsetPitch(float value) Sets the rotation around the x-axis (pitch) in degrees.voidsetYaw(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
-
Field Details
-
TYPE
public static final com.comphenix.protocol.PacketType TYPEThe 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 bygetYaw()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 bygetPitch()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
-