Skip to content

Animation Models (Geckolib)

KilaBash edited this page Apr 19, 2022 · 6 revisions

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.


Status

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.

  1. "unformed": when the multiblock unformed.
  2. "idle": formed but is idle.
  3. "working": formed and is working.
  4. "suspend": suspend while during working.

Prepare animation file

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.)

The custom status

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";

Emissive Texture and Translucent rendering

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:

image image

Translucent:

image image