Incompatibility with Immersive Portals: Can't ping beyond certain distance
eebAlt opened this issue · 3 comments
With both this mod and the mod Immersive Portals installed, pings do not work beyond roughly 29m; nothing visibly happens when pressing the ping button, and a "raycast too far" error is output to the log. Tested on 1.20.1 both with Fabric and with Quilt, and with a couple of different versions of Ping Wheel and of Immersive Portals. Attached is an example log file containing the error.
Apologies if this turns out to be an issue that needs fixed by Immersive Portals rather than Ping Wheel; I wasn't sure where this should be reported. 😓
Hey!
As you already suspected, this is caused by Immersive Portals.
Looking at Immersive Portals' source code, I found the message that was thrown.
As of now it is unclear if this can be resolved within Ping Wheel's code.
Using Mixins is a complicated topic and it might just be 100% Immersive Portals' fault.
Thank you for your report and I'm sorry for any inconveniences this might have caused.
Luken or I will give you feedback once we know more... or if we don't get any progress in this at all.
In further investigation we found out that this is caused by an internal limit of raytraces set by Immersive Portals. If we exceed the hardcoded limit of 512 meters it will hardlimit the raytrace to 30 meters (not 512, for whatever reason) and throw the mentioned error. FYI; We use a raytrace with a limit of 1024, which will always throw an error.
We plan to accommodate users by dynamically limiting the raytracing based on their client-side render distance. This will still throw errors when using render distances above 30ish chunks, but we will not fix issues specific to Immersive Portals as we don't understand the need to limit our raytrace further.
As promised, there is now a compatibility layer available with the new version, 1.5.0. We didn't implement it as a dynamic raytrace-limit as stated a week ago tho. This is because of several limitations and mainly because of compatibility issues with alternate renderers like Sodium.
The option is available as raycastDistance
in /config/ping-wheel.json
and has to be set to either 255 (1.18) or 511 (>1.18) to prevent issues with Immersive Portals.