[MC-5321] noClip not honored for entity collisions Created: 24/Dec/12  Updated: 03/May/15  Resolved: 05/Jul/14

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.5, Minecraft 1.4.6, Minecraft 1.4.7, Minecraft 1.5.1
Fix Version/s: None

Type: Bug
Reporter: Steve Edwards Assignee: Unassigned
Resolution: Invalid Votes: 0
Labels: world
Environment:

Linux, Sun Java 1.6, Forge 770


Confirmation Status: Unconfirmed

 Description   

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   
Comment by [Mod] Torabi [ 05/Jul/14 ]

Even if it wasn't a modded client, it's not clear how this applies to vanilla Minecraft.

Comment by Dlawso the Really Lucky Rabbit [ 05/Jul/14 ]

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.

Comment by Deleted account [ 25/May/14 ]

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.

Comment by Deleted account [ 23/Mar/14 ]

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.

Comment by Talven81 [ 26/Nov/13 ]

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.

Comment by Steve Edwards [ 13/Apr/13 ]

Work-around now @ line 1695:

if (axisalignedbb1 != null && !((Entity)list.get(j2)).noClip && axisalignedbb1.intersectsWith(par2AxisAlignedBB))

Comment by Steve Edwards [ 13/Apr/13 ]

Verified, still a problem in 1.5.1

Comment by Steve Edwards [ 09/Apr/13 ]

Still a problem in 1.4.7 ... catching up on changes in Forge for 1.5.1, will update after testing.

Comment by Steve Edwards [ 26/Dec/12 ]

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.

Comment by Zuriki [ 25/Dec/12 ]

Does noClip apply to entity collisions or just world-based collisions (ie. Ender Dragon)?

Generated at Sun Jan 12 12:07:31 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.