Started by
Endercreeper997
on
Topic category: Help with MCreator software
I am very frustrated. I finally find a way to make custom mob models, and now I can't even use them. I am using an application called blockbench. Whenever I try to import my model, it says the name isn't valid. I have changed the name multiple times, to fit the requirements, and I don't understand why it is still wrong. there is no numbers at the beginning off the name, no whitespace, and all the letters are valid ASCII! the name is literally np.java!
Edited by Endercreeper997 on Tue, 07/30/2019 - 09:01
You could search this on the website: https://mcreator.net/search/content/issues?keys=java+model+name
ok, then how do I change the code name?
In the code, on the search page I linked to you have tens of pages where this is explained.
ok. sorry I only looked at the first one
sorry, Im very new to coding. where do I go to rename them? I didn't really understand the answers. im on a Mac as well, so it might be different than the answers you gave me
The Mac is the same, open model file with text editor. You can paste the contents here and I can try to help you. You could change model name in your modeler too and export it properly.
import org.lwjgl.opengl.GL11;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBox;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.Entity;
public class Normal Phoot extends ModelBase {
private final ModelRenderer group;
public Normal Phoot() {
textureWidth = 16;
textureHeight = 16;
group = new ModelRenderer(this);
group.setRotationPoint(-8.0F, 16.0F, 8.0F);
group.cubeList.add(new ModelBox(group, 0, 0, 5.0F, 3.0F, -8.0F, 4, 5, 4, 0.0F, false));
group.cubeList.add(new ModelBox(group, 0, 1, 5.0F, 6.0F, -8.5F, 0, 0, 0, 0.0F, false));
group.cubeList.add(new ModelBox(group, 0, 0, 8.5F, 6.0F, -8.5F, 0, 0, 0, 0.0F, false));
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
group.render(f5);
}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
is this what im supposed to use for my mod? it says to paste it in
do I just change the name to not have spaces?
never mind! it works! I changed the name to not have spaces, and now I can add it! Thanks for your help! :)
A tip use underscores(_) instead of spaces!
You are welcome!
For naming instead of spaces like this, use camel case naming, which is a standard for Java.
Instead of
My custom model
use
MyCustomModel
thanks!
pls help theres no spaces in my name t's just ghost.java and it cant work