Topic category: User side tutorials
This tutorial will teach you how to use the amazing and much awaited Geckolib plugin! For those of you who don't know, Feder's Geckolib plugin is an MCreator add-on that allows users to create custom animations for modded mobs. This guide will walk you through the steps for installation and some info on how to use it, but will not teach you how to create animations. In the examples I will use a custom zombie model and animations I made.
The first thing you will need to install is Blockbench. Blockbench is a 3D modeling program aimed towards blockier, Minecraft-style creations, and it is completely free. Without Blockbench, you will not be able to use this plugin, and I'll explain why in a bit. To install Blockbench, simply download the latest release from here and follow the installation wizard.
But you aren't ready to create animations yet! First, you need to install the GeckoLib plugin to Blockbench. To do this, open up Blockbench to the startup page. From there, navigate to Filter -> Plugins. This will open up a menu labeling all your installed and available plugins. Click on the "available" tab and scroll down until you see the GeckoLib Animation Utils option. Hit install, and you're ready to animate!
If you want to learn about animating Java models with this plugin, I suggest this YouTube video by TurtyWurty. It explains everything you need to know in depth.
This section will teach you how to install the plugin to MCreator. First, go to this page for the latest download, or this one for a direct download to the current one. Once downloaded, make sure it's in zip file format, and save it to wherever you want! Alright, now you can open up MCreator. Open the workspace you want to add the plugin to first. Then, navigate to File -> Preferences -> Manage Plugins. Here, you should click the "Load plugin..." button. Navigate to where you saved the downloaded zip, and select it. Hit "Save" and let it load.
Now that you have installed the plugin, you will need to activate it. Navigate to Workspace -> Workspace Settings - > External APIs. Here, you will see a checkbox labeled "GeckoLib API". check it and hit "save changes." That's it, you've installed the plugin!
Note: if there were any elements in your workspace prior to adding the plugin, you will be prompted to refactor the workspace. Simply hit "Yes, refactor workspace" and let MCreator handle the rest!
Exporting From Blockbench
Let's say you finished an animation in Blockbench, but you have no clue how to export it! First, in Blockbench, you will need to save the files. GeckoLib stores it's animations in 2 files: a .java file that stores the 3D model, and a .json file that stores all the animations. To export them, you'll need to start with the .java file. Navigate to File -> Export -> Export Animated Java Entity, and a prompt window will appear. Name the file whatever you need, and save it to a directory of your choice.
Next, to export the .json file, you'll need to be in the animation tab. From there, navigate to Animation -> Export Animations and save the file to whatever name you want. You've finished exporting!
Importing to MCreator
This is a bit harder than exporting. First, let's import the .java file. In your workspace, go to Resources -> 3D models and texture mappings. Hit the "Import JAVA model" button and select your .java file. Click the "Keep current animations" button, and the file should import correctly!
Now we need to import the animations. This requires a bit more effort. In MCreator in the workspace, go to Workspace -> Open workspace folder. This should open a file explorer with wherever on your computer your MCreator workspace is stored. From here, navigate to src/main/resources/assets/<name_of_your_mod>/ and create a new folder called "animations" (minus the parentheses). Now, whenever you create a new animation .json file, just put it in that folder. That's all!
Using Your Animations
Now that you've installed everything and created an animated entity, you want to figure out how to use those animations. Geckolib allows you to set the animation of any mob using procedures. Simply use the "Play Animation" procedure block by entering the desired entity, animation name, and looping condition, and your mobs will now be animated!
This plugin will not work with any versions of MCreator right now! This tutorial is made for when the plugin gets a new update, which we sadly do not know the date of. To make it clear, the plugin will not work on any version of MCreator. This message will be removed when this problem is gone.
IMPORTANT! Do not contact me unless you are sure that your question cannot be answered by the post or by a previous comment. If you have an important question though, feel free. My discord is Argus#2498, so message me if you need help or clarification. I will respond as fast as I can!
Added and fixed images - 9/23/2020
If you guys have any questions or suggestions to add or remove from this tutorial, feel free to post them below!