Hey all, lately I've been working on a new mob model. It's just a cube the size of a block, but I can't seem to get it to be only 1 block tall. The visual size is great, but the hitbox stretches up and it can't go in a 1x1x1 space. (I'm a complete n00b at entity models, so.... XD)
Anyway, here's what I have:
public class ModelEntityBlock extends ModelBase
{
public ModelRenderer shape1;
Hey all, lately I've been working on a new mob model. It's just a cube the size of a block, but I can't seem to get it to be only 1 block tall. The visual size is great, but the hitbox stretches up and it can't go in a 1x1x1 space. (I'm a complete n00b at entity models, so.... XD)
Anyway, here's what I have:
public class ModelEntityBlock extends ModelBase
{
public ModelRenderer shape1;
public ModelEntityBlock()
{
this.textureWidth = 64;
this.textureHeight = 32;
this.main = new ModelRenderer(this, 0, 0);
this.main.setRotationPoint(0.0F, 0.0F, 0.0F);
this.main.addBox(-8.0F, 7.75F, -8.0F, 16, 16, 16, 0.55F);
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
{
this.main.render(f5);
}
}
It's supposed to be only one block tall, as stated above, but I'm having trouble getting it working. Anyone know how to fix it?
Thanks for your help!
Firstly that's the model file, it has absolutely nothing to do with collisions, we need your entity file.
Secondly if possible go ingame and spawn the entity then press F3 + B to show bounding boxes and send us a screenshot.
Please don't PM me asking for help, I will just redirect you to the appropriate forum, where there are others who are far more skilled than me.
This is not the signature you are looking for.
Banners and such things
As mentioned, the collision box has nothing to do with the model. It is set using the setSize() method in your entity constructor.
I figured it out, thanks for your help!
I figured out the solution, thanks for your help!