Class PlayerPose
java.lang.Object
lol.trq.helios.model.PlayerPose
What a player model's attachment points depend on, for one frame: position, the body and head angles interpolated
to the frame, and the states that move parts of the 1.8.9 model. Mutable and reused, so reading a pose each frame
allocates nothing.
MinecraftPlayerPose fills one from a live player.
Angles are in degrees, as Minecraft stores them: yaw 0 faces +Z (south) and grows clockwise seen from above; pitch is positive looking down.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfloatBody yaw (renderYawOffset), interpolated to the frame.booleanWhether a chestplate is worn: back attachments sit on the armour, one model pixel out.booleanWhether this is the player the client controls.floatHead yaw (rotationYawHead), interpolated to the frame.booleanWhether a helmet is worn: head attachments sit on the armour, one model pixel out.floatBody yaw of the living entity being ridden, interpolated to the frame, orNaNwhen not riding one.floatHead pitch (rotationPitch), interpolated to the frame.booleanWhether the player is sneaking.doubleFeet position relative to the camera, x.doubleFeet position relative to the camera, y.doubleFeet position relative to the camera, z. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
x
public double xFeet position relative to the camera, x. -
y
public double yFeet position relative to the camera, y. -
z
public double zFeet position relative to the camera, z. -
bodyYaw
public float bodyYawBody yaw (renderYawOffset), interpolated to the frame. -
headYaw
public float headYawHead yaw (rotationYawHead), interpolated to the frame. -
pitch
public float pitchHead pitch (rotationPitch), interpolated to the frame. -
sneaking
public boolean sneakingWhether the player is sneaking. -
clientPlayer
public boolean clientPlayerWhether this is the player the client controls. Vanilla lowers every other sneaking player by 0.125 blocks, but not this one. -
mountYaw
public float mountYawBody yaw of the living entity being ridden, interpolated to the frame, orNaNwhen not riding one. Riding clamps how far the body turns from the mount, as vanilla does. -
helmet
public boolean helmetWhether a helmet is worn: head attachments sit on the armour, one model pixel out. -
chestplate
public boolean chestplateWhether a chestplate is worn: back attachments sit on the armour, one model pixel out.
-
-
Constructor Details
-
PlayerPose
public PlayerPose()
-
-
Method Details
-
reset
Resets to a player standing at the camera, facing south, with nothing worn.- Returns:
- this pose
-
riding
public boolean riding()Returns whether the player rides a living entity.- Returns:
- true when
mountYawis set
-