mojira.dev
MC-296099

Nether portal collision is or isn't working depending on the cardinal direction

Please note, that this report is not about the portal being slim, it is about collisions with the portal block being directional.

Nether portal block collision box is directionally shifted by some very small amount.

Video showcase is attached under the report.

To reproduce the issue, just rebuild the setup from the video, follow the same steps and observe the issue


Analysis: This issue doesn't happen with other interactive collideable blocks, because they all are a full block in size horizontally. When collecting block positions, entity hitbox is shrunken by 10^-5, which, if the side of the collideable block is aligned to the edge of the block space makes the issue not happen . But nether portals arent full blocks anymore, thus entity can intersect the block space of the portal by multiple pixels, yet still not intersect the box, and it is this specific interaction with sub block hitboxes that doesnt shrink entity hitbox by some epsilon, which causes the directionality issue.


A Simple fix would be to shrink the entity hitbox by some epsilon when calculating intersections with subblock collision boxes. (just as it's currently done when entity collects block spaces for interraction)

Attachments

Comments 10

Please also note that this issue can be easily observed without using a portal block in an invalid state, in the video the portal block is placed separately just to show the simplest setup that reproduces the issue, yet the same vehavior can be observed with a regular 3x2 portal with obsidian frame around and an entity in a minecart colliding with a fence gate outside the portal frame.

This issue is also closely related to these 4 issues:
MC-295841

MC-296057

MC-296055

MC-296054
as it happens in almost the same place in code, mainly in the logic of the checkInsideBlocks() call and the logic of calls directly within it.

The bug isnt fixed, the issue is still present in 25w16a.
Even tho the directionality became unobservable with specifically nether portal blocks, it still affects all other non full collideable blocks, such as for example: end portals
Here is a video showasing it:

[media]

just looked into the sources. None of the relevant code was changed, except the nether portal hitbox size. Was this ticket closed accidentally?

The ticket was closed because it specifically related to nether portal blocks, we know that it still affects other blocks but didn’t have a good repro case for other ones (especially one that could be put into a game test) so we cloned this into a private ticket and closed the public one.

should i create another ticket for a general case, or will you sort it out with a private one?

feel free to create a general one and add this one as a related case

here is another way to reproduce it:

[media]

below the fence there is a tripwire.
While stading on the slab, horizontal/vertical movements will trigger/not trigger the string, and thus the observer

Savvvage_

etanaratsastaja

Community Consensus

Platform

Important

Block states

1.21.5

25w16a

Retrieved