Started by
Keeygh
on
Topic category: Help with MCreator software
I modeled two mobs in blockbench, one worked fine, but the other is not exported to mcreator! says the name is already in use no matter what I do.
"Model alredy exists, Java model with the name Model_Custom alredy exist! Make sure that the model name in code is different and important it again" :/
Open your .java file with a text editor and change the name at the first like that says "package model.[XYZ1]" or "package [XYZ2]". You also have to change it after the imports are done at "public class [XYZ] extends ModelBase". There is also another place where you will have to change it. It comes after all the cubes are initialised, it will look like "public [XYZ2]()". In all cases [XYZ1] or [XYZ2] could be what you named it while exporting it, it could be Model_Custom. Change this and import it again. This should work. Make sure that [XYZ1] and [XYZ2] are different from the first model.
code: //Made with Blockbench //Paste this code into your mod. 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 custom_model extends ModelBase { private final ModelRenderer Corpo; private final ModelRenderer animarcabeca; private final ModelRenderer olho; private final ModelRenderer pescoco; private final ModelRenderer negocinho; private final ModelRenderer torso; private final ModelRenderer pescocinho; private final ModelRenderer ossodaperna; private final ModelRenderer ossodaperna2; private final ModelRenderer pernadireita; private final ModelRenderer animarpernadireita2; private final ModelRenderer pezim; private final ModelRenderer pernadesquerda; private final ModelRenderer animarpernaesquerda; private final ModelRenderer pezim2; private final ModelRenderer penas; private final ModelRenderer penas2; private final ModelRenderer penas3; private final ModelRenderer penas4; public custom_model() { textureWidth = 64; textureHeight = 64; Corpo = new ModelRenderer(this); Corpo.setRotationPoint(0.0F, 0.0F, 0.0F); animarcabeca = new ModelRenderer(this); animarcabeca.setRotationPoint(4.0F, -4.5F, -2.0F); Corpo.addChild(animarcabeca); animarcabeca.cubeList.add(new ModelBox(animarcabeca, 8, 15, -1.0F, -4.0F, 0.3F, 4, 4, 3, 0.0F, false)); animarcabeca.cubeList.add(new ModelBox(animarcabeca, 12, 37, 3.0F, -2.5F, 0.3F, 2, 1, 3, 0.0F, false)); animarcabeca.cubeList.add(new ModelBox(animarcabeca, 12, 38, 3.0F, -1.0F, 0.3F, 2, 0, 3, 0.0F, false)); olho = new ModelRenderer(this); olho.setRotationPoint(-4.0F, 28.5F, 2.0F); animarcabeca.addChild(olho); olho.cubeList.add(new ModelBox(olho, 0, 2, 4.5F, -31.0F, 1.0F, 1, 1, 1, 0.0F, false)); olho.cubeList.add(new ModelBox(olho, 0, 0, 4.5F, -31.0F, -2.0F, 1, 1, 1, 0.0F, false)); pescoco = new ModelRenderer(this); pescoco.setRotationPoint(0.0F, 24.0F, 0.0F); Corpo.addChild(pescoco); pescoco.cubeList.add(new ModelBox(pescoco, 0, 15, 3.8F, -28.5F, -1.0F, 2, 14, 2, 0.0F, false)); negocinho = new ModelRenderer(this); negocinho.setRotationPoint(0.0F, -27.5F, 0.0F); setRotationAngle(negocinho, 0.0F, 0.0F, -0.1745F); pescoco.addChild(negocinho); negocinho.cubeList.add(new ModelBox(negocinho, 28, 19, 5.3F, -0.5F, -1.0F, 1, 1, 2, 0.0F, false)); torso = new ModelRenderer(this); torso.setRotationPoint(0.0F, 24.0F, 0.0F); setRotationAngle(torso, 0.0F, 0.0F, 0.0873F); Corpo.addChild(torso); torso.cubeList.add(new ModelBox(torso, 0, 0, -8.5F, -16.0F, -2.0F, 12, 7, 4, 0.0F, false)); pescocinho = new ModelRenderer(this); pescocinho.setRotationPoint(0.0F, 10.5F, 0.0F); setRotationAngle(pescocinho, 0.0F, 0.0F, -0.1745F); Corpo.addChild(pescocinho); pescocinho.cubeList.add(new ModelBox(pescocinho, 19, 19, 3.0F, -1.5F, -1.5F, 3, 2, 3, 0.0F, false)); ossodaperna = new ModelRenderer(this); ossodaperna.setRotationPoint(0.0F, 15.0F, 0.0F); setRotationAngle(ossodaperna, 0.0F, 0.0F, 0.2618F); Corpo.addChild(ossodaperna); ossodaperna.cubeList.add(new ModelBox(ossodaperna, 8, 22, -4.5F, -3.5F, -2.5F, 4, 4, 1, 0.0F, false)); ossodaperna2 = new ModelRenderer(this); ossodaperna2.setRotationPoint(0.0F, 15.0F, 0.0F); setRotationAngle(ossodaperna2, 0.0F, 0.0F, 0.2618F); Corpo.addChild(ossodaperna2); ossodaperna2.cubeList.add(new ModelBox(ossodaperna2, 20, 11, -5.0F, -3.5F, 1.5F, 4, 4, 1, 0.0F, false)); pernadireita = new ModelRenderer(this); pernadireita.setRotationPoint(0.5F, 17.0F, 0.0F); setRotationAngle(pernadireita, 0.0F, 0.0F, 0.1745F); Corpo.addChild(pernadireita); pernadireita.cubeList.add(new ModelBox(pernadireita, 29, 29, -4.5F, -2.5F, -2.5F, 2, 3, 1, 0.0F, false)); animarpernadireita2 = new ModelRenderer(this); animarpernadireita2.setRotationPoint(-2.0F, -0.5F, -2.0F); setRotationAngle(animarpernadireita2, 0.0F, 0.0F, -0.1745F); pernadireita.addChild(animarpernadireita2); animarpernadireita2.cubeList.add(new ModelBox(animarpernadireita2, 8, 27, -2.0F, -0.3F, -0.5F, 1, 8, 1, 0.0F, false)); pezim = new ModelRenderer(this); pezim.setRotationPoint(0.0F, 7.0F, 0.0F); setRotationAngle(pezim, 0.0F, 0.0F, -0.1745F); pernadireita.addChild(pezim); pezim.cubeList.add(new ModelBox(pezim, 1, 28, -2.0F, 0.0F, -2.5F, 2, 0, 1, 0.0F, false)); pernadesquerda = new ModelRenderer(this); pernadesquerda.setRotationPoint(0.5F, 17.0F, 4.0F); setRotationAngle(pernadesquerda, 0.0F, 0.0F, 0.1745F); Corpo.addChild(pernadesquerda); pernadesquerda.cubeList.add(new ModelBox(pernadesquerda, 28, 0, -4.5F, -2.5F, -2.5F, 2, 3, 1, 0.0F, false)); animarpernaesquerda = new ModelRenderer(this); animarpernaesquerda.setRotationPoint(-3.5F, -1.5F, -3.0F); setRotationAngle(animarpernaesquerda, 0.0F, 0.0F, -0.1745F); pernadesquerda.addChild(animarpernaesquerda); animarpernaesquerda.cubeList.add(new ModelBox(animarpernaesquerda, 25, 25, -1.0F, 0.9F, 0.5F, 1, 8, 1, 0.0F, false)); pezim2 = new ModelRenderer(this); pezim2.setRotationPoint(0.0F, 7.0F, 0.0F); setRotationAngle(pezim2, 0.0F, 0.0F, -0.1745F); pernadesquerda.addChild(pezim2); pezim2.cubeList.add(new ModelBox(pezim2, 1, 28, -2.0F, 0.0F, -2.5F, 2, 0, 1, 0.0F, false)); penas = new ModelRenderer(this); penas.setRotationPoint(-7.0F, 14.0F, 0.0F); setRotationAngle(penas, 0.0F, -0.2618F, 0.0F); penas.cubeList.add(new ModelBox(penas, 18, 61, -2.5F, -3.0F, -2.5F, 4, 3, 0, 0.0F, false)); penas2 = new ModelRenderer(this); penas2.setRotationPoint(-7.0F, 14.0F, 0.0F); setRotationAngle(penas2, 0.0F, 0.2618F, 0.0F); penas2.cubeList.add(new ModelBox(penas2, 18, 60, -2.5F, -3.0F, 2.0F, 4, 3, 0, 0.0F, false)); penas3 = new ModelRenderer(this); penas3.setRotationPoint(-7.0F, 14.0F, 0.0F); setRotationAngle(penas3, 0.0F, -0.2618F, 0.2618F); penas3.cubeList.add(new ModelBox(penas3, 0, 61, -6.0F, -4.0F, -2.0F, 9, 0, 2, 0.0F, false)); penas4 = new ModelRenderer(this); penas4.setRotationPoint(-7.0F, 14.0F, 0.0F); setRotationAngle(penas4, 0.0F, 0.3491F, 0.2618F); penas4.cubeList.add(new ModelBox(penas4, 0, 60, -6.0F, -4.0F, -0.5F, 9, 0, 2, 0.0F, false)); } @Override public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { Corpo.render(f5); penas.render(f5); penas2.render(f5); penas3.render(f5); penas4.render(f5); } public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) { modelRenderer.rotateAngleX = x; modelRenderer.rotateAngleY = y; modelRenderer.rotateAngleZ = z; } }