This plugin aims to integrate a private lib called Dlib, developed to allow the player to transform into entities, perform registered animations, and be compatible with the modded entity, geckolib, and mcreator's own animation system.
Why use my plugin?
Dlib was developed by my team as a private lib, without adding commands, so only modders with the plugin could use it.
Unlike public mods that provide commands and an interface for easy manipulation, Dlib adds nothing beyond direct manipulation during mod development, with simple calls, fully adapted to blocklys and composite implementation, without generating dependencies.
Currently, it supports geckolib, but exclusively for Java Entity and its animation system.
Usage rights:
This is a demo version, with initial support for Dlib version 1.0.
It also adds some Blocklys:
For now, only 1.20.1 is supported.
How does the plugin work?
DG Dlib Transform has an API application. When enabled, it creates a folder called jarjar, which initially contains the "dlib_integrated" file, which is responsible for integrating the lib.
Set to true or false;
If true, implementation occurs directly in the main mod, without generating dependencies, adding to the basic implementation of a composite mod.
If false, implementation will be via dependency, requiring the lib's .jar file.
It also generates a file required for implementation called "metadata." Only edit it if you know what you're doing.
When exporting, the same "metadata" file will be copied to its proper location.
Animation playback by blockly:
- This feature is only available for the Java entity, using the modified generator that is also available for download.
- Geckolib: support only in the basic transformation function.
Current Changelog
- Coming soon 2.0 as a Plus Version ---> ability to change the player's weapon based on transformation, render items in third person, modelPart manipulation, both for transformation and for entities in the world.
v1.3
- Updated dlib to 2.0.2
v1.2
- fixed mixin issue on mod export
v1.1
- Added, modified generator for 2025.1
- dg_dlib_play_animation is empty (corrected)
v1.0
- start of plugin.
If you have any questions, join my server (Come in here)
If you want to support my work click here ---> 👉Offer a gem!!
Comments
public class MyCustomEntity implements DEntity {
// Animation states
public final AnimationState animationIdle = new AnimationState();
public final AnimationState animationRun = new AnimationState();
public final AnimationState animationAttack = new AnimationState();
public final AnimationState animationDeath = new AnimationState();
private final DlAnimation animations = new DlAnimation();
public MyCustomEntity(PlayMessages.SpawnEntity packet, Level world) {
this(Entities.MYCUSTOMENTITY.get(), world);
registerAnimations(); // Called during construction
}
@Override
public DlAnimation getAnimation() {
return animations;
}
@Override
public void registerAnimations() {
getAnimation().addAnimation("idle", new DlAnimation.DlAnimationInfo(IdleAnim.lengthInSeconds(), animationIdle));
getAnimation().addAnimation("run", new DlAnimation.DlAnimationInfo(RunAnim.lengthInSeconds(), animationRun));
getAnimation().addAnimation("attack", new DlAnimation.DlAnimationInfo(AtkAnim.lengthInSeconds(), animationAttack));
getAnimation().addAnimation("death", new DlAnimation.DlAnimationInfo(DeathAnim.lengthInSeconds(), animationDeath));
}
@Override
public void syncAnimations() {
animationIdle.animateWhen(!isMoving());
animationRun.animateWhen(isMoving());
animationAttack.animateWhen(isAttacking());
animationDeath.animateWhen(isDeadOrDying());
}
}
when exported, your mod is the carrier of the dlib mod.