Compass conflict with Dimension Anchor
Ultimushadow opened this issue ยท 15 comments
Issue: When both mods are installed, the functionality of Dimensional Anchor (hold right click on lodestone compass to teleport to is) is removed and the player instead swings in the air.
Mod information: Fabric, 1.20.1, Dimensional Anchor 1.0.2, Supplementaries 1.20-2.5.15
This issue persists if the signs are removed via config, and I would suggest an additional config option to toggle compass clicking option.
Dimensional Anchor has an open report here: OverlordsIII/DimensionalAnchor#2
Afaik the toggle only disabled the block, but the compass activity wasn't disabled, potentially some mixin is overwriting it? That or my testing wasn't thorough enough
So when you click with a compass it still displays coordinates even with config off?
Signpost, sorry I meant structure not block
The way_sign feature is what you mean right?
No what does way signs have to do with this? Can you confirm you have the compass click config off?
Apologies, I am referring to the common config and the sign pointing mechanic
In the client, yes compass right click is set to false
But, the signs added have the feature where clicking on them with a compass points the sign in the direction of the compass, I believe that may be holding back the issue as well, I tried seeing if there was a way to disable that in the config and that is what I was referring to
If it's not though, then the client config doesn't disable whatever method you're using to detect the compass right click
My apologies, allow me to rephrase the issue here
Regardless of config settings, the Dimensional Anchor ability to hold right click and teleport to the lodestone the compass is connected to does not work
When the client config has "compass_right_click": true the compass displays coordinates, but the Dimensional Anchor does not work
When the client config has "compass_right_click": false the compass does not display coordinates, and the Dimensional Anchor still does not work
I believe that a possible culprit is the Sign Post item, which has its own functionality when clicked on by a compass. The Sign Post can be disabled or enables, the Dimensional Anchor ability still does not work. If the Sign Post is disabled but the item was placed in the world beforehand, that block can still be right clicked with a compass
That led me to conclude that either, the method by which you are detecting compass use when clicking on a sign post is not being disabled correctly even when the block is disabled in config
Or, the method that you are using to detect compass use for the client-side coordinates does not fully disable when disabled in config, and only disables the coordinates appearing, but I thought that was less likely
No sign post works by the block own use method so that never triggers. I see tha the config seems to be wired up correctly and if you don't see any hand movement then I'm not sure what it could be
Okay, thank you for that clarification
Regardless of config options, when holding right click the player still swings it as if the client config option was true, it just doesn't show coords
Quick example of holding down a regular compass, and holding down a lodestone compass, with client config setting disabled
https://github.com/MehVahdJukaar/Supplementaries/assets/35935582/e53a4061-caee-4810-b94e-1d49a9422218
This is after disabling Supplementaries, to show the intended behavior (nothing on holding with a compass, teleportation and zoom effect with lodestone compass)
https://github.com/MehVahdJukaar/Supplementaries/assets/35935582/970e8f6c-bfec-4e8d-9371-9a167b4547e5
Both of these are on a single player world although I can confirm that when the client has the compass config disabled and joins a server, it still doesn't use Dimensional Anchor features
I did some more testing and can confirm that Supplementaries is to blame for this (at least, I think), specifically the CompassItemBehavior class, because even if the config is set to false that class still gets initialized and the game still overrides compass behavior. I compiled a version of the mod with the only change being to comment out that line, and managed to load the game with both mods, and with the intended Dimensional Anchor behavior. I'm going to inform Overlords of where the conflict is, if there's a fix they can implement please let them know!
Just a quick edit to confirm, because I was curious, that the InteractEventOverrideHandler can still add CompassItemBehavior if isEnabled() = false. Although it may be crude, I think adding the COMPASS_CLICK config to Common instead of Client, and having isEnabled() return the result of COMPASS_CLICK.get() would allow an easy way for people to bypass unnecessary behavior overrides. I've noticed you do the same thing with the clock, which would probably cause a similar problem if any mod used the same item mixins DA does. Please let me know if I've misinterpreted anything!