mojira.dev
MC-266403

Entity detection range is not the full hitbox only at the bottom.

Summery:
If using a command with [distance=..1.5] for example it will not detect some the entity even if you standing in its hitbox. (see images and/or video)

It's detecting only if the player/command is <1.5blocks from the bottom of the entity you try to detect.

 

Expected:

I expect it to be even detecting the entity across its whole hitbot.

 

Steps/commands to recreate:

  1. spawn a Endermann wich no AI: /summon enderman ~ ~ ~ {NoAI:1b}

  2. stand next to it at the bottom and use: /execute if entity @e[type=minecraft:enderman,distance=..1.5,sort=nearest,limit=1] run say test

  3. Fly up to its head and run the command again.

 

Note:

Having it across the whole hitbox commands like with [distance=]in it, would be more accurate.

 

I personal use a raycast system which should detect a mob if it's get hit by the raycast, but facing the raycast at the eyes of the mob it will not detect some entity if they're to tall. I could fix this by increasing the distance inside the command but then it will hit something else in some situations.

Having the detection-zone across the whole hitbox, I could lower the the distance and it will be more accurate using such commands.

 

I couldn't find an existing bug report for that, if there is already one I missed, I'm sorry.

Linked issues

Attachments

Comments 4

Distance (r/rm in the past) has always been the exact distance to the entity position; entity positions have always been at the bottom center of the hitbox. This is a chanve request, not a bug.

Additionally, during/before 1.13 development, feedback regarding commands was collected. One of the things they considered was making distance and dx/dy/dz select based on the sane criterion (hitbox or entity position); it wasn't changed.

I personally wouls like to see it changed so you can control which one is used, kinda like sort=, like hitbox=true/false, but that's a feature request.

Actually, duplicate of MC-172035, took a while to find it.

Hmm, I see. 
With a selector, like what the comment under the MC-172035 post said or in that way would be really nice.
I didn't see it completely as a bug nor as a feature request ether, it can be worked around as I said but with flaws.
this is why I posted it here. In the example with the endermann it looked more like a bug.

I can let my raycast shoot at the feet but that looks wired but the way I do it now, or increase the distance to still "see" the mob while ironically passing through its hitbox.

Maybe there is a possibility that this will get "fixed" or implemented in the future.

Thank you for your report!
We're tracking this issue in MC-172035, so this ticket is being resolved and linked as a duplicate.

If you would like to add a vote and any extra information to the main ticket it would be appreciated.

If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.

Kathezel

(Unassigned)

Unconfirmed

(Unassigned)

1.20.2

Retrieved