HandTipEstimator

public final class HandTipEstimator

Estimates where a point of a held item model is in the world, following the 26.x client's third-person chain: living-entity body transform, player model arm pose, ItemInHandLayer's hand offset and the item's display transform. The server cannot see walking swing, idle arm bob, attack swings or the camera perspective, so this is the pose of a player standing or sneaking with the item held out.

Types

Link copied to clipboard
public final class ItemTransform extends Record
An item model display transform as written in its JSON: rotation in degrees, translation in pixels, scale as a factor.

Functions

Link copied to clipboard
public static void estimate(Vector3d feet, float bodyYaw, boolean sneaking, boolean leftArm, double scale, HandTipEstimator.ItemTransform transform, Vector3d itemPoint, Vector3d position, Quaterniond rotation)
Link copied to clipboard
public static Vector3d itemSpace(Vector3d blockbenchPosition)
Converts a free-format Blockbench position (pixels) to Java item model pixels.