Topic category: General discussion
What's happening with the name of my model? I change it but it doesn't seens to work, what can I do?
Here the 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 extends ModelBase {
private final ModelRenderer bone;
public {
textureWidth = 128;
textureHeight = 128;
bone = new ModelRenderer(this);
bone.setRotationPoint(0.0F, 24.0F, 0.0F);
bone.cubeList.add(new ModelBox(bone, 0, 68, 0.0F, -8.0F, -2.0F, 4, 8, 4, 0.0F, false));
bone.cubeList.add(new ModelBox(bone, 56, 56, -4.0F, -8.0F, -2.0F, 4, 8, 4, 0.0F, false));
bone.cubeList.add(new ModelBox(bone, 40, 56, -8.0F, -16.0F, -2.0F, 4, 8, 4, 0.0F, false));
bone.cubeList.add(new ModelBox(bone, 24, 56, 4.0F, -16.0F, -2.0F, 4, 8, 4, 0.0F, false));
bone.cubeList.add(new ModelBox(bone, 0, 56, -4.0F, -16.0F, -2.0F, 8, 8, 4, 0.0F, false));
bone.cubeList.add(new ModelBox(bone, 64, 32, -4.0F, -24.0F, -4.0F, 8, 8, 8, 0.0F, false));
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
bone.render(f5);
}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
Your model does not have a name at all. Please see my answer on your other post.
public class ModelNameHere extends ModelBase {
public ModelNameHere() {
If you want / need to fix it by hand
https://mcreator.net/search/content?keys=Your+model+name+is+not+a+valid+Java+name