-
Notifications
You must be signed in to change notification settings - Fork 22
Animation Models (Geckolib)
Please refer to Geckolib Wiki
for information on how to make animation models and what kind of animation models are supported.
This page describes how to set up the animation currently executed. Also, mbd extends the functionality of Geckolib to allow users to set emissive textures and Translucent rendering.
Mbd's blocks will maintain a status
value that the renderer can use it to determine which animation is being used.
By default there are three built-in status
of the mbd block: unformed
, idle
, working
, suspend
.
- "unformed": when the multiblock unformed.
- "idle": formed but is idle.
- "working": formed and is working.
- "suspend": suspend while during working.
We assume that you already know what animation file is. If not, please know how to make the animation model first
Each animation in the animation file has its own name. Mbd checks if an animation with the same name exists as the current status
, and calling it.
In addition, MBD allows you to set a transition animation between two status
. For example, the animation (from idle
to working
) is "idle-working".
There is no need to make animations for all status
, and if the animation is missing the base model is used by default. (Don't forget to set a loop for your persistent animation.)
Users can customize logic through CT scripts to set custom status. See TODO for more information.
Ensure that status
is set on the server side:
import mods.multiblocked.tile.Component;
//...
val component as Component = .......;
component.status = "custom_status";
Gecoklib itself does not support emissive and translucent, but mbd does.
Simply put, when a group is named "emissive", all cubes under that group will be rendered emissive.
when a group is named "translucent", all cubes under that group will be rendered in pass == 1
layer.
Emissive:
Translucent: