The bug
When the arrows, tridents and projectiles rate of fire is too fast, it can't be teleported by the portal, end gateway and nether portal.
Code analysis
Code analysis by @unknown can be found in this comment.
Linked issues
is duplicated by 6
relates to 5
testing discovered 1
Attachments
Comments 16
Hi there!
Does MC-191947 describe the issue?
This issue is about the projectile acceleration too fast, causing the portal to fail detect the projectile.
This also seems quite location dependent. Moving closer to or further away from the portal changes whether the projectile goes through the portal or not. My hypothesis is that this is because projectiles don't check if they passed through a portal between two ticks.
This is why it happens:
In Minecraft 1.16.1 and earlier versions, thrown projects checks if the OUTLINE shapes of blocks, to find potential collisions and chances to be teleported ("hit" a nether_portal block, for example)(See ThrowableProjectile.tick()). A portal has its non-empty OUTLINE shapes though it has no collision box which can stop regular entity movement, so thrown projectiles can always detect if it can be teleported no matter how high their velocity is.
But in 1.16.2-pre1, something was changed. The OUTLINE shape get no longer used in collision checks, instead, the COLLIDER shape has been used since then (See ThrowableProjectile.tick() & ProjectileUtil.getHitResult()). However, portals has empty COLLIDER shapes, so the teleporting check became dead code. And entities only stays in some seperated points, thus if the velocity of a thrown projectile entity is greater than 1 bloch per tick, it may pass through the portal if it failed to be teleported in the Entity.handleNetherPortal() method.
Suggestions to solve it:
The change may be intended to fix MC-73884, simply changing it back is not a good idea. But a addional ray trace may be introduced when the speed of the entity is higher than 1 block pre tick, just like what falling_blocks of concrete powder do.
Can confirm.