Topic category: User side tutorials
Many users have encountered the problem that the creator doesnt have ability to use vanilla models when creating custom entities. But i figure out how to fix it.
For first you need to make sure you finished all mob`s settings (parametres, AI, spawning etc.)
Block mod element, so mcreator will not be able to regenerate code of this entity.
We need to change something in TestRender.java file (instead of "Test" you will have the name of your entity). In the imports section you need to insert the line
import net.minecraft.client.model.ZombieModel;
instead of ZombieModel you can have any other vanilla model, for example SkeletonModel. Then you need to replace HumanoidModel to your model in each line below (I will use ZombieModel for example)
1.
public class TestRenderer extends HumanoidMobRenderer<TestEntity, HumanoidModel<TestEntity>> {
2.
super(context, new HumanoidModel(context.bakeLayer(ModelLayers.PLAYER)), 0.5f);
3.
this.addLayer(new HumanoidArmorLayer(this, new HumanoidModel(context.bakeLayer(ModelLayers.PLAYER_INNER_ARMOR)), new HumanoidModel(context.bakeLayer(ModelLayers.PLAYER_OUTER_ARMOR)), context.getModelManager()));
And thats done!
Can you pls help me idk what I did wrong
Build info: MCreator 2024.1.18518, forge-1.20.1, 64-bit, 32715 MB, Windows 10, JVM 17.0.10, JAVA_HOME: C:\Program Files\Pylo\MCreator\jdk, started on: 2024-07-17-13:53:45
> Task :compileJava FAILED
C:\Users\*****\MCreatorWorkspaces\cs_core\src\main\java\net\mcreator\cscore\client\renderer\LVL1zombieRenderer.java:13: error: type argument LVL1zombieEntity is not within bounds of type-variable T public class LVL1zombieRenderer extends HumanoidMobRenderer<LVL1zombieEntity, ZombieModel<LVL1zombieEntity>> {
^
where T is a type-variable:
T extends Zombie declared in class ZombieModel
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
> Run with --info option to get more log output.
> Run with --scan to get full insights.
BUILD FAILED in 1s
1 actionable task: 1 executed
BUILD FAILED
Task completed in 3 seconds