When determining entity-on-entity collisions noClip isn't checked, resulting in a collision when there shouldn't be one. Discovered by setting noClip=true, collisionsBox=null, canPush=false, and canCollide=false on an entity and setting width > 3, you can't approach the entity any closer than the bounding box.
Work-around: added check for noClip in World.java:getCollidingBoundingBoxes @ 4465 when iterating through bounding boxes (yes, I know this is from a decompile, but that should put you in the ballpark).
Application: parent entity with multiple child entities must have a bounding box encompassing all children, otherwise the collision detection doesn't work correctly (separate bug?). my parent entity is longer than it is wide, but bounding box uses width X width for size, so there's a lot of "empty space" on the sides. actual collision detection is handled by child entities, so parent entity needs to ignore collisions (hence use of noClip et al).
Comments 10
I don't understand your question.
My reading of the code suggests that there are two separate boxes in play: a bounding box (indicating the size extents of the entity) and a collision box (indicating the boundary where a collision should be applied). In common usage, the two are the same. For my code, they are not the same.
noClip is a property of an entity, indicating that collisions shouldn't be applied to this entity. canCollide and canPush are similar (but subtly different) indicators. To my thinking, setting noClip on an entity should allow it to pass through any other entity or block, regardless of the other entity's noClip setting, and this is not the behavior I'm seeing.
The code reference I cited checks bounding boxes and then collision boxes, without checking any of the flags. It may be more proper to not check the bounding box at all, but this is in a utility function that is checking for intersecting boxes, which may be used elsewhere for purposes other than determining whether or not there was a collision. Checking noClip when iterating through the bounding boxes fixed my fringe case, but I don't know if it broke anything else.
The dragon is an entity and uses noClip, but collision detection is "lazy" in that 1) you can't push it, 2) it's handled as a square cube (head to tail distance is nominally the same as wingspan), and 3) you're not going to get close enough to notice the discrepancy – but if the dragon were to stay still, you would not be able to stand directly in front of or behind the wing because the bounding box would keep you from approaching any closer.
Work-around now @ line 1695:
if (axisalignedbb1 != null && !((Entity)list.get(j2)).noClip && axisalignedbb1.intersectsWith(par2AxisAlignedBB))
Is this still a concern in the current Minecraft version 1.7.4 / Launcher version 1.3.8 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
Is this still a concern in the current Minecraft version 14w11b / Launcher version 1.3.11 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
Is this still a concern in the current Minecraft version 14w21b / Launcher version 1.4.4 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
I think the mods probably didn't have a good look at the enviroment:
Environment:
Linux, Sun Java 1.6, *Forge 770*
Therefore, this ticket should've been invalid in the first place, as it relates to a modified client, unless it can be reproduced in Vanilla.
Does noClip apply to entity collisions or just world-based collisions (ie. Ender Dragon)?