Bone Position Listeners
GeckoLib provides access to the position of every bone relative to the render pass, the model, and the world.
To access these positions, you must apply a BonePositionListener
Usage
BonePositionListeners are added to the RenderPassInfo.
They can be added at any point in the render pass up to the point that GeckoLib submits it in GeoRenderer#submitRenderTasks.
renderPassInfo.addBonePositionListener("MyBoneName", (worldPos, modelPos, localPos) -> {
//...
});
Note that each of the provided positions are Nullable, because not all renderers are able to fully determine position context from where they are called
Do not use any of the positions inside the listener, and instead store the positions provided in your animatable, to use during a tick or some other time. This is because position listeners are updated every time the model is rendered, which is unpredictable.