-
Bug
-
Resolution: Unresolved
-
None
-
1.20.4, 1.21
-
None
-
Plausible
-
Accessibility, Rendering
-
Low
-
Platform
There's a bug present in Minecraft 1.20.4 causing misrendering of all ThrowableItem Projectiles (or more accurately, anything making use of the ThrownItemRenderer). The issue is caused by a single if condition in the code, but removing it brings up another visual issue, which the problematic condition was meant to fix - albeit with a minor error.
In the current Minecraft version, if a nearby player throws a projectile (one implementing the ThrownItemRenderer) and it happens within a 3.5-block radius, it disappears from your perspective until it covers more distance. This can be demonstrated by positioning the throwing account within the 3.5-block limit and then moving beyond it.
The cause is the aforementioned condition which was introduced to patch obstruction of the player's vision from a thrown projectile at the time of its creation. The condition prevents the projectile's rendering within the first tick or if it's within a 3.5-block radius of the player rendering it. The issue is that this condition does not differentiate between the throwing player and other observers.
A proposed fix is to modify the if condition to verify if the projectile's shooter is the player viewing it, using the getShooter method. This will fix the problem for other observers while achieving the original goal of the if condition - to avoid obstructing the view of the player throwing the projectile.
>if viewing player is not thrownProjectile's owner, render normally (to fix the current visual bug)
> if viewing player is thrownProjectile's owner, do distance and tick check and cancel the rendering if it returns false (to maintain the fix for the visual obstruction caused by thrown items)
I've recorded an additional demonstration which should be relatively easy to recreate: snowball vanishing bug.mov