Topic category: Help with Minecraft modding (Java Edition)
Ok, so, there are so many other posts like this one, but none of them helped me. When I try to import my .java model into MCreator it shows: Your model name is not a valid java name.
Here's the model code, so someone can help me:
// Made with Blockbench 3.5.2
// Exported for Minecraft version 1.14
// Paste this class into your mod and generate all required imports
public class raft extends EntityModel {
private final RendererModel loglayer1;
private final RendererModel loglayer2;
private final RendererModel seat;
public raft() {
textureWidth = 128;
textureHeight = 64;
loglayer1 = new RendererModel(this);
loglayer1.setRotationPoint(0.0F, 24.0F, 0.0F);
loglayer1.cubeList.add(new ModelBox(loglayer1, 0, 27, 4.0F, -4.0F, -17.0F, 4, 4, 33, 0.0F, false));
loglayer1.cubeList.add(new ModelBox(loglayer1, 0, 27, -2.0F, -4.0F, -17.0F, 4, 4, 33, 0.0F, false));
loglayer1.cubeList.add(new ModelBox(loglayer1, 0, 27, -8.0F, -4.0F, -17.0F, 4, 4, 33, 0.0F, false));
loglayer2 = new RendererModel(this);
loglayer2.setRotationPoint(0.0F, -4.0F, 0.0F);
loglayer1.addChild(loglayer2);
loglayer2.cubeList.add(new ModelBox(loglayer2, 0, 0, -11.0F, -3.0F, -14.0F, 22, 4, 4, 0.0F, false));
loglayer2.cubeList.add(new ModelBox(loglayer2, 0, 0, -11.0F, -3.0F, -8.0F, 22, 4, 4, 0.0F, false));
loglayer2.cubeList.add(new ModelBox(loglayer2, 0, 0, -11.0F, -3.0F, -2.0F, 22, 4, 4, 0.0F, false));
loglayer2.cubeList.add(new ModelBox(loglayer2, 0, 0, -11.0F, -3.0F, 4.0F, 22, 4, 4, 0.0F, false));
loglayer2.cubeList.add(new ModelBox(loglayer2, 0, 0, -11.0F, -3.0F, 10.0F, 22, 4, 4, 0.0F, false));
seat = new RendererModel(this);
seat.setRotationPoint(11.0F, 21.0F, 10.0F);
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
loglayer1.render(f5);
seat.render(f5);
}
public void setRotationAngle(RendererModel modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
So please, halp.
Try removing the 4 lines at the top containing comments:
// Made with Blockbench 3.5.2
// Exported for Minecraft version 1.14
// Paste this class into your mod and generate all required imports
https://mcreator.net/forum/60262/issues-and-solutions-when-uploading-java-entities-blockbench-153
Awmygosh it worked. Thanks : )
This worked, thankyou!