/
Library for modders, resource pack makers, and modpack makers to create and edit entity models WITH JSON
Does not work with OptiFine format!
If you'd like to dump json versions of all entity models (vanilla or modded) so that you can edit them easily with resource packs or use them as examples, here's how:
.minecraft/config/jsonem.properties.dump_models=true..minecraft/jsonem_dump.To edit models in Blockbench, install the plugin located in this repository.
jsonem_models.js from this GitHub repositoryFile > Plugins, and at the top of the dialog click the icon for Load Plugin from File. Choose the jsonem_models.js file.File > New and choose JsonEM Java Entity Model to begin editing.File > Open Model to import a JsonEM json model file, such as those dumped from the game.File > Export > Export JsonEM Java Entity Model and save the file.JsonEM can be used to create TexturedModelData for your entities entirely using json.
This guide will demonstrate how to make the model for the cube entity in this tutorial with json.
repositories {
maven { url "https://api.modrinth.com/maven" }
}
dependencies {
// Replace <version> with desired version
modImplementation "maven.modrinth:jsonem:<version>"
include "maven.modrinth:jsonem:<version>"
}
void onInitializeClient() {
[...]
JsonEM.registerModelLayer(MODEL_CUBE_LAYER); // Layer ID: "entitytesting:cube", Layer name: "main"
}
assets/entitytesting/models/entity/cube/main.json{
"texture": {
"width": 64,
"height": 64
},
"bones": {
"cube": {
"transform": {
"origin": [0, 0, 0]
},
"cuboids": [
{
"uv": [0, 0],
"offset": [-6, 12, -6],
"dimensions": [12, 12, 12]
}
]
}
}
}
"cube" in the file above is being accessed with the same name in your entity modelpublic CubeEntityModel(ModelPart modelPart) {
this.base = modelPart.getChild("cube"); // The original tutorial used an unspecified field called EntityModelPartNames.CUBE
}
