MCreator 2023.3 - Multiple hitboxes for an (Animated) living entity

Started by Am_Not_Beluga on

Topic category: Troubleshooting, bugs, and solutions

Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
MCreator 2023.3 - Multiple hitboxes for an (Animated) living entity
Sun, 10/22/2023 - 19:31 (edited)

So basically I'm making a mod that adds a whole new dimensions with new ores, entities, structures etc. And I got to the point where I created a HUGE entity (bigger than the ender dragon ^^'  ) but in MCreator we can't add multiple hitboxes like the ender dragon has. 

So I am wondering if anyone knows how to code multiple hitboxes for a living entity (I ask for code because I'm sure there is no other way to do it). In the title of this forum topic I said "(Animated) living entity" because I suppose this is the same for a classic living entity and a Geckolib animated entity.

I found here someone asking 10 years ago for the ender dragon's model code and there is this thing:

this.body.addBox("body", -12.0F, 0.0F, -16.0F, 24, 24, 64);
this.body.addBox("scale", -1.0F, -6.0F, -10.0F, 2, 6, 12);
this.body.addBox("scale", -1.0F, -6.0F, 10.0F, 2, 6, 12);
this.body.addBox("scale", -1.0F, -6.0F, 30.0F, 2, 6, 12);

I guess this for adding multiple hitboxes for the body only (because there are also "this.wing","this.frontLegTip" etc). But in MCreator, wether it is in the code editor or in the simplified UI, we can only set the hitbox for a cube-like shape (width and depth are a single thing):

Simplified UI:

"Entity model bounding box: (Width/Depth | Height | Shadow Size | Mounted Entity Y Offset)"

Code Editor : Your_EntityRenderer.java:

float scale = 1f;
this.scaleHeight = scale;
this.scaleWidth = scale;

So even with that "this.scaleWidth = scale;" , can we use the @Override somewhere to use maybe the addBox() method ?

I really hope I've been clear enough for you guys to understand what i'm trying to do and why I can't. And I hope Klemen is going to give me an answer because I often see him giving good and working answers :D

Edited by Am_Not_Beluga on Sun, 10/22/2023 - 19:31
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
What if you have invisible…
Sun, 11/05/2023 - 19:48

What if you have invisible mobs that teleport to where you want the hitboxes to be? Make it so they do damage to the main thing when hit. 

Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm trying to add mobs with…
Fri, 06/07/2024 - 20:34

I'm trying to add mobs with 2 or more hitboxes so I can check whenever any of them gets attacked and execute some logic but there's no way of doing this besides manually coding it, I don't know where I can find references for this as the most logical thing to search for would be the Ender Dragon but it has different body parts that merge to create the whole mob, that's not what I want to do so I'm now in my search to find a way of implementing multiple hitboxes for the same entity