Detecting if block is one block in front of entity

Started by Tektricity on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Detecting if block is one block in front of entity
Sun, 09/08/2024 - 18:49 (edited)

So I'm creating a mod that adds a entity that can crouch to get under 3 block spaces, but im not sure how. Beause of mcreator's limitations, I'd assume i would have to create a new mob thats the same but with a smaller hinbox, right? Please leave a detailed explanation, because i suck at modding.

Edited by Tektricity on Sun, 09/08/2024 - 18:49
Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can actualy control size…
Mon, 09/09/2024 - 11:05

You can actualy control size of entitys hitbox. in the bounding box scale thing under the model visual scale.If you don't do anything it says fixed. First you need to click + button to the right of the visual scale thing. Name the procedure whatever you want. and do something like this you can find look x/y/z position of entity with raytrace at entity procedures/Data its in the bottom. Return number is in the flow control and numbers in the math tab. Basicaly what this procedure does is look if there is a a solid block at entitys face and if there is makes entitys hitbox smaller. and finally you save this procedure go back to your entity and click Fixed thing in the right of bounding box scale and sellect procedure you made.

Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So i made the procedure and…
Mon, 09/09/2024 - 13:05

So i made the procedure and put it under bounding box scale, and my entity didn't show up. So I looked, and there's a question mark next to it that says: no entry is defined for geckolib/bounding_box_scale.md yet. I am using geckolib plugin for animations, would you know how to fix this?