Topic category: Help with Minecraft modding (Java Edition)
I have checked other posts that have helped me with my other models but for some reason this one isn't working please help.
//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 QueenBee extends ModelBase {
private final ModelRenderer Body;
private final ModelRenderer Pollen hole;
private final ModelRenderer Pollen_hole6;
private final ModelRenderer Pollen_hole7;
private final ModelRenderer Pollen_hole2;
private final ModelRenderer Pollen_hole5;
private final ModelRenderer Pollen_hole3;
private final ModelRenderer Pollen_hole4;
private final ModelRenderer Head;
private final ModelRenderer bone;
private final ModelRenderer bone2;
private final ModelRenderer Body2;
private final ModelRenderer bone3;
private final ModelRenderer Wing1;
private final ModelRenderer Wing2;
private final ModelRenderer Leg1;
private final ModelRenderer bone4;
private final ModelRenderer Leg2;
private final ModelRenderer bone5;
private final ModelRenderer Leg3;
private final ModelRenderer bone6;
private final ModelRenderer Leg4;
private final ModelRenderer bone7;
public QueenBee() {
textureWidth = 512;
textureHeight = 512;
Body = new ModelRenderer(this);
Body.setRotationPoint(0.0F, 24.0F, 10.0F);
setRotationAngle(Body, -1.7453F, 0.0F, 0.0F);
Body.cubeList.add(new ModelBox(Body, 71, 71, -8.0F, -36.0F, -54.0F, 15, 60, 37, 0.0F, false));
Body.cubeList.add(new ModelBox(Body, 72, 231, 7.0F, -33.0F, -53.0F, 2, 54, 34, 0.0F, false));
Body.cubeList.add(new ModelBox(Body, 0, 231, -10.0F, -33.0F, -53.0F, 2, 54, 34, 0.0F, false));
Body.cubeList.add(new ModelBox(Body, 0, 0, -12.0F, -38.0F, -51.0F, 23, 63, 31, 0.0F, false));
Body.cubeList.add(new ModelBox(Body, 148, 148, -14.0F, -34.0F, -49.0F, 27, 55, 27, 0.0F, false));
Body.cubeList.add(new ModelBox(Body, 138, 0, -16.0F, -36.0F, -47.0F, 31, 60, 23, 0.0F, false));
Body.cubeList.add(new ModelBox(Body, 144, 230, -18.0F, -33.0F, -44.0F, 35, 54, 18, 0.0F, false));
Pollen hole = new ModelRenderer(this);
Pollen hole.setRotationPoint(0.0F, 0.0F, 0.0F);
Body.addChild(Pollen hole);
Pollen hole.cubeList.add(new ModelBox(Pollen hole, 142, 231, 6.0F, -40.0F, -29.0F, 2, 9, 6, 0.0F, false));
Pollen hole.cubeList.add(new ModelBox(Pollen hole, 232, 232, 2.0F, -40.0F, -29.0F, 2, 9, 6, 0.0F, false));
Pollen hole.cubeList.add(new ModelBox(Pollen hole, 14, 246, 2.0F, -40.0F, -25.0F, 5, 9, 2, 0.0F, false));
Pollen hole.cubeList.add(new ModelBox(Pollen hole, 110, 246, 2.0F, -40.0F, -29.0F, 5, 9, 2, 0.0F, false));
Pollen hole.cubeList.add(new ModelBox(Pollen hole, 175, 96, 2.0F, -39.0F, -28.0F, 5, 8, 5, 0.0F, false));
Pollen_hole6 = new ModelRenderer(this);
Pollen_hole6.setRotationPoint(0.0F, 0.0F, 0.0F);
Body.addChild(Pollen_hole6);
Pollen_hole6.cubeList.add(new ModelBox(Pollen_hole6, 0, 197, 6.0F, -40.0F, -47.0F, 2, 9, 6, 0.0F, false));
Pollen_hole6.cubeList.add(new ModelBox(Pollen_hole6, 127, 196, 2.0F, -40.0F, -47.0F, 2, 9, 6, 0.0F, false));
Pollen_hole6.cubeList.add(new ModelBox(Pollen_hole6, 57, 109, 2.0F, -40.0F, -43.0F, 5, 9, 2, 0.0F, false));
Pollen_hole6.cubeList.add(new ModelBox(Pollen_hole6, 43, 109, 2.0F, -40.0F, -47.0F, 5, 9, 2, 0.0F, false));
Pollen_hole6.cubeList.add(new ModelBox(Pollen_hole6, 153, 93, 2.0F, -39.0F, -46.0F, 5, 8, 5, 0.0F, false));
Pollen_hole7 = new ModelRenderer(this);
Pollen_hole7.setRotationPoint(0.0F, 0.0F, 0.0F);
Body.addChild(Pollen_hole7);
Pollen_hole7.cubeList.add(new ModelBox(Pollen_hole7, 185, 120, -4.0F, -40.0F, -47.0F, 2, 9, 6, 0.0F, false));
Pollen_hole7.cubeList.add(new ModelBox(Pollen_hole7, 175, 111, -8.0F, -40.0F, -47.0F, 2, 9, 6, 0.0F, false));
Pollen_hole7.cubeList.add(new ModelBox(Pollen_hole7, 29, 109, -8.0F, -40.0F, -43.0F, 5, 9, 2, 0.0F, false));
Pollen_hole7.cubeList.add(new ModelBox(Pollen_hole7, 89, 94, -8.0F, -40.0F, -47.0F, 5, 9, 2, 0.0F, false));
Pollen_hole7.cubeList.add(new ModelBox(Pollen_hole7, 69, 94, -8.0F, -39.0F, -46.0F, 5, 8, 5, 0.0F, false));
Pollen_hole2 = new ModelRenderer(this);
Pollen_hole2.setRotationPoint(0.0F, 0.0F, 0.0F);
Body.addChild(Pollen_hole2);
Pollen_hole2.cubeList.add(new ModelBox(Pollen_hole2, 126, 231, -4.0F, -40.0F, -29.0F, 2, 9, 6, 0.0F, false));
Pollen_hole2.cubeList.add(new ModelBox(Pollen_hole2, 110, 231, -8.0F, -40.0F, -29.0F, 2, 9, 6, 0.0F, false));
Pollen_hole2.cubeList.add(new ModelBox(Pollen_hole2, 0, 246, -8.0F, -40.0F, -25.0F, 5, 9, 2, 0.0F, false));
Pollen_hole2.cubeList.add(new ModelBox(Pollen_hole2, 229, 154, -8.0F, -40.0F, -29.0F, 5, 9, 2, 0.0F, false));
Pollen_hole2.cubeList.add(new ModelBox(Pollen_hole2, 69, 169, -8.0F, -39.0F, -28.0F, 5, 8, 5, 0.0F, false));
Pollen_hole5 = new ModelRenderer(this);
Pollen_hole5.setRotationPoint(0.0F, 0.0F, 0.0F);
Body.addChild(Pollen_hole5);
Pollen_hole5.cubeList.add(new ModelBox(Pollen_hole5, 32, 197, 10.0F, -40.0F, -38.0F, 2, 9, 6, 0.0F, false));
Pollen_hole5.cubeList.add(new ModelBox(Pollen_hole5, 16, 197, 6.0F, -40.0F, -38.0F, 2, 9, 6, 0.0F, false));
Pollen_hole5.cubeList.add(new ModelBox(Pollen_hole5, 0, 182, 6.0F, -40.0F, -34.0F, 5, 9, 2, 0.0F, false));
Pollen_hole5.cubeList.add(new ModelBox(Pollen_hole5, 56, 120, 6.0F, -40.0F, -38.0F, 5, 9, 2, 0.0F, false));
Pollen_hole5.cubeList.add(new ModelBox(Pollen_hole5, 0, 155, 6.0F, -39.0F, -37.0F, 5, 8, 5, 0.0F, false));
Pollen_hole3 = new ModelRenderer(this);
Pollen_hole3.setRotationPoint(0.0F, 0.0F, 0.0F);
Body.addChild(Pollen_hole3);
Pollen_hole3.cubeList.add(new ModelBox(Pollen_hole3, 16, 231, -7.0F, -40.0F, -38.0F, 2, 9, 6, 0.0F, false));
Pollen_hole3.cubeList.add(new ModelBox(Pollen_hole3, 0, 231, -11.0F, -40.0F, -38.0F, 2, 9, 6, 0.0F, false));
Pollen_hole3.cubeList.add(new ModelBox(Pollen_hole3, 223, 0, -11.0F, -40.0F, -34.0F, 5, 9, 2, 0.0F, false));
Pollen_hole3.cubeList.add(new ModelBox(Pollen_hole3, 0, 212, -11.0F, -40.0F, -38.0F, 5, 9, 2, 0.0F, false));
Pollen_hole3.cubeList.add(new ModelBox(Pollen_hole3, 0, 169, -11.0F, -39.0F, -37.0F, 5, 8, 5, 0.0F, false));
Pollen_hole4 = new ModelRenderer(this);
Pollen_hole4.setRotationPoint(0.0F, 0.0F, 0.0F);
Body.addChild(Pollen_hole4);
Pollen_hole4.cubeList.add(new ModelBox(Pollen_hole4, 229, 139, 1.0F, -40.0F, -38.0F, 2, 9, 6, 0.0F, false));
Pollen_hole4.cubeList.add(new ModelBox(Pollen_hole4, 48, 197, -3.0F, -40.0F, -38.0F, 2, 9, 6, 0.0F, false));
Pollen_hole4.cubeList.add(new ModelBox(Pollen_hole4, 188, 83, -3.0F, -40.0F, -34.0F, 5, 9, 2, 0.0F, false));
Pollen_hole4.cubeList.add(new ModelBox(Pollen_hole4, 69, 182, -3.0F, -40.0F, -38.0F, 5, 9, 2, 0.0F, false));
Pollen_hole4.cubeList.add(new ModelBox(Pollen_hole4, 168, 83, -3.0F, -39.0F, -37.0F, 5, 8, 5, 0.0F, false));
Head = new ModelRenderer(this);
Head.setRotationPoint(0.0F, 24.0F, 0.0F);
Head.cubeList.add(new ModelBox(Head, 77, 0, -12.0F, -51.0F, -40.0F, 23, 12, 7, 0.0F, false));
Head.cubeList.add(new ModelBox(Head, 100, 168, -7.0F, -51.0F, -44.0F, 13, 17, 11, 0.0F, false));
bone = new ModelRenderer(this);
bone.setRotationPoint(0.0F, 0.0F, 0.0F);
setRotationAngle(bone, -0.5236F, 0.3491F, 0.0F);
Head.addChild(bone);
bone.cubeList.add(new ModelBox(bone, 0, 94, 1.0F, -16.0F, -54.0F, 4, 14, 6, 0.0F, false));
bone.cubeList.add(new ModelBox(bone, 0, 20, 1.0F, -7.0F, -54.0F, 8, 5, 6, 0.0F, false));
bone2 = new ModelRenderer(this);
bone2.setRotationPoint(0.0F, 0.0F, 0.0F);
setRotationAngle(bone2, -0.5236F, -0.4363F, 0.0F);
Head.addChild(bone2);
bone2.cubeList.add(new ModelBox(bone2, 0, 0, -11.0F, -16.0F, -54.0F, 4, 14, 6, 0.0F, false));
bone2.cubeList.add(new ModelBox(bone2, 77, 19, -14.0F, -7.0F, -54.0F, 7, 5, 6, 0.0F, false));
Body2 = new ModelRenderer(this);
Body2.setRotationPoint(0.0F, 24.0F, 0.0F);
Body2.cubeList.add(new ModelBox(Body2, 0, 169, -11.0F, -49.0F, -33.0F, 21, 1, 27, 0.0F, false));
Body2.cubeList.add(new ModelBox(Body2, 232, 203, -9.0F, -50.0F, -33.0F, 17, 2, 27, 0.0F, false));
Body2.cubeList.add(new ModelBox(Body2, 229, 139, -9.0F, -29.0F, -33.0F, 17, 2, 27, 0.0F, false));
Body2.cubeList.add(new ModelBox(Body2, 0, 141, -11.0F, -29.0F, -33.0F, 21, 1, 27, 0.0F, false));
Body2.cubeList.add(new ModelBox(Body2, 246, 16, -12.0F, -48.0F, -33.0F, 1, 19, 27, 0.0F, false));
Body2.cubeList.add(new ModelBox(Body2, 0, 94, 10.0F, -48.0F, -33.0F, 1, 19, 27, 0.0F, false));
Body2.cubeList.add(new ModelBox(Body2, 250, 250, 10.0F, -46.0F, -33.0F, 2, 15, 27, 0.0F, false));
Body2.cubeList.add(new ModelBox(Body2, 69, 170, -13.0F, -46.0F, -33.0F, 2, 15, 27, 0.0F, false));
bone3 = new ModelRenderer(this);
bone3.setRotationPoint(0.0F, 0.0F, 0.0F);
Body2.addChild(bone3);
bone3.cubeList.add(new ModelBox(bone3, 38, 231, -11.0F, -46.0F, -34.0F, 21, 18, 10, 0.0F, false));
Wing1 = new ModelRenderer(this);
Wing1.setRotationPoint(0.0F, 24.0F, 0.0F);
setRotationAngle(Wing1, 0.5236F, -1.2217F, 0.0F);
Wing1.cubeList.add(new ModelBox(Wing1, 175, 111, 21.0F, -47.0F, 4.0F, 51, 1, 27, 0.0F, false));
Wing1.cubeList.add(new ModelBox(Wing1, 223, 0, 9.0F, -47.0F, 10.0F, 66, 1, 15, 0.0F, false));
Wing2 = new ModelRenderer(this);
Wing2.setRotationPoint(0.0F, 24.0F, 0.0F);
setRotationAngle(Wing2, -0.6981F, -2.1817F, 0.0F);
Wing2.cubeList.add(new ModelBox(Wing2, 175, 83, 22.0F, -39.0F, -42.0F, 51, 1, 27, 0.0F, false));
Wing2.cubeList.add(new ModelBox(Wing2, 0, 215, 10.0F, -39.0F, -36.0F, 66, 1, 15, 0.0F, false));
Leg1 = new ModelRenderer(this);
Leg1.setRotationPoint(-12.0F, 19.0F, 0.0F);
setRotationAngle(Leg1, -0.0873F, -0.4363F, 0.1745F);
Leg1.cubeList.add(new ModelBox(Leg1, 0, 140, -7.0F, -20.0F, -6.0F, 5, 10, 5, 0.0F, false));
bone4 = new ModelRenderer(this);
bone4.setRotationPoint(0.0F, 0.0F, 0.0F);
setRotationAngle(bone4, -0.5236F, 0.0F, 0.0F);
Leg1.addChild(bone4);
bone4.cubeList.add(new ModelBox(bone4, 138, 83, -7.0F, -8.0F, -11.0F, 5, 10, 5, 0.0F, false));
Leg2 = new ModelRenderer(this);
Leg2.setRotationPoint(-12.0F, 22.0F, 21.0F);
setRotationAngle(Leg2, -0.0873F, -0.4363F, 0.1745F);
Leg2.cubeList.add(new ModelBox(Leg2, 137, 0, -7.0F, -20.0F, -6.0F, 5, 10, 5, 0.0F, false));
bone5 = new ModelRenderer(this);
bone5.setRotationPoint(0.0F, 0.0F, 0.0F);
setRotationAngle(bone5, -0.5236F, 0.0F, 0.0F);
Leg2.addChild(bone5);
bone5.cubeList.add(new ModelBox(bone5, 108, 49, -7.0F, -8.0F, -11.0F, 5, 10, 5, 0.0F, false));
Leg3 = new ModelRenderer(this);
Leg3.setRotationPoint(11.0F, 21.0F, 21.0F);
setRotationAngle(Leg3, -0.0873F, 0.4363F, -0.1745F);
Leg3.cubeList.add(new ModelBox(Leg3, 108, 34, 2.0F, -20.0F, -6.0F, 5, 10, 5, 0.0F, false));
bone6 = new ModelRenderer(this);
bone6.setRotationPoint(0.0F, 0.0F, 0.0F);
setRotationAngle(bone6, -0.5236F, 0.0F, 0.0F);
Leg3.addChild(bone6);
bone6.cubeList.add(new ModelBox(bone6, 108, 19, 2.0F, -8.0F, -11.0F, 5, 10, 5, 0.0F, false));
Leg4 = new ModelRenderer(this);
Leg4.setRotationPoint(10.0F, 19.0F, 2.0F);
setRotationAngle(Leg4, -0.0873F, 0.4363F, -0.1745F);
Leg4.cubeList.add(new ModelBox(Leg4, 49, 94, 2.0F, -20.0F, -6.0F, 5, 10, 5, 0.0F, false));
bone7 = new ModelRenderer(this);
bone7.setRotationPoint(0.0F, 0.0F, 0.0F);
setRotationAngle(bone7, -0.5236F, 0.0F, 0.0F);
Leg4.addChild(bone7);
bone7.cubeList.add(new ModelBox(bone7, 29, 94, 2.0F, -8.0F, -11.0F, 5, 10, 5, 0.0F, false));
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
Body.render(f5);
Head.render(f5);
Body2.render(f5);
Wing1.render(f5);
Wing2.render(f5);
Leg1.render(f5);
Leg2.render(f5);
Leg3.render(f5);
Leg4.render(f5);
}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
Model part name "Pollen hole" is not valid as it contains whitespace.
Fixed it now I cant get these mobs to attack anything https://imgur.com/a/Ug3oYPF
I want it to attack everything it sees but players
I suggest you check our tutorials collection playlist on our YouTube channel which contains many examples and tutorials that can help you get started with MCreator: https://www.youtube.com/playlist?list=PLAeL-oIFIEngE6jRgFYeFMfuj8WQsO3Ei
There are tutorials on agressive mobs.