-
Notifications
You must be signed in to change notification settings - Fork 3
Adding a model
Let's suppose that we have a Geckolib Model in blockbench and we would like to use it on our NPC.
Let's create a resource pack.
First we need to create a folder with pack.mcmeta file and assets folder.
In pack.mcmeta we should write something like that
{
"pack": {
"pack_format": 6,
"description": "CNPC-Gecko-Addon resource pack by Goodbird"
}
}
In assets we need to create a folder with our resource pack name, in my case it's geckomodels.
And that folder will have three folders in it
The first will contain animations, the second is for models and the third is for textures.
In the texture one we should create a subfolder entity.
The resource pack structure is done!
First of all lets export the model itself (set of cubes and bones) into a .geo.json file.
And we will export it into the assets/geckomodels/geo folder.
The next thing is the texture.
We can right click it and select Show in File Explorer, and it will show us where the texture is located.
You just need to copy it into the assets/geckomodels/textures/entity.
Finally, we need to move the animation file to the assets/geckomodels/animations folder
You can find it by right clicking one of the animations and selecting Properties
And here you will see the path to the animation file.
So you just need to copy this file into the assets/geckomodels/animations folder.
Mods are distributed as .jar files which are based on .zip format. This means that you can unpack the mod as a regular .zip file.
You need to
- Extract geckolib jar file
- Put your .geo.json model file into assets/geckolib3/geo
- Put your .json animation file into assets/geckolib3/animations
- Put your texture file into assets/geckolib3/textures/model/entity
- Pack everything back as a .zip file
- Rename it to .jar file ignoring the warning
- If you compress the mod back into a .rar or .7z or some other format, it will not work
- While packing, you should select all of the mod component folders (assets, META-INF, software, ...), and not the top level geckolib-forge-*** folder
- Don't leave the extracted geckolib folder in the mod folder. Remove it after repacking as it will cause crashes
Now you just need to compress assets and pack.mcmeta into a .zip file
Now put the .zip file into the .minecraft/resourcepacks folder and select it in the Minecraft resource pack menu
Congratulations!
You have added your blockbench model to minecraft!
Now you will be able to select the model, the animation and the texture using the "Common use".
Here is the example resource pack we made in that tutorial
MyResourcePack.zip