Bone Updaters
Bone Updaters are the interface that GeckoLib provides to add bone manipulations to GeoRenderers from outside
the renderer itself.
Overview
Because of the changes Mojang has made to rendering in Minecraft (see: Bone Snapshots),
GeckoLib no longer allows bones to be manipulated directly for animation.
Additionally, GeckoLib requires that bone manipulations be done at a specific time in the rendering process.
Due to this, GeckoLib only allows manipulation of bones via BoneUpdaters - an interface that RenderPassInfo provides.
Usage
If you want to modify bones for a render pass, you have two options:
- If you are modifying them inside a
GeoRenderer, you override and useadjustModelBonesForRender. See here - If you are modifying them anywhere else, you add a
BoneUpdaterto theRenderPassInfo
renderPassInfo.addBoneUpdater((renderPassInfo, boneSnapshots) -> {
// Modify bones here
});
See the BoneSnapshots page for more information on using them.
BoneUpdaters can only be added prior to the render pass being submitted in GeoRenderer#submitRenderTasks.
Attempting to add one too late will result in an error.