Open Darkosto opened 1 year ago
Here's an example multi mc export to showcase the bug. Loading up a new world and stacking the Overworld on top of the Nether dimensions will cause the music track to restart constantly and/or bounce back and forth between the 2 tracks.
It seems as though Music Triggers is not aware of what dimension the player is in and constantly swaps back and forth: music_triggers_imm_portal_test.zip
Music Triggers is reading the LocalPlayer.level
field, that is swapped between all visible dimensions in order to allow ticking of the (client)world to occur correctly. As it runs it own thread, from time to time Music Triggers ends up with the "wrong" dimension, thus changing the played music. To resolve this, I currently see the following potential fixes:
LocalPlayer.level
with our own helpers (ClientWorldLoader.getWorldAsync(RenderStates.originalPlayerDimension)
). However, the triggers are actually Bi-Functions, Mixin into them is not fun, as it randomly likes to explode /hj. Also I'd like to avoid using any more mod-specific Mixins, as that blows compile times if I want to actually test my fixes.Entity
class (LocalPlayer
extends Entity
) contains a getter for this field. (getLevel()
). If Music Triggers would switch from direct field access to using the getter, I'd be able to mix into the getter, thus enhancing it with the ability to give the expected value to Music Triggers thread. This would however require checking the thread, as such adding quite some overhead to an often called method.
According to your testing, does the issue occur with ONLY Immersive Portals mod installed?
Yes
Forge Version
40.2.4
ImmersivePortals Version
1.4.17
Latest Log
N/A
Crash Report (if applicable)
N/A
Steps to Reproduce
What You Expected
Music triggers is meant to track player location and audio events can be assigned accordingly. When dimensions are stacked using Immersive Portals, the player location according to the Music Triggers debug menu will update when the player crosses the portal boundaries.
What Happened Instead
The player current dimension. according to Music Triggers, remains in the first dimension they spawned in.
Additional Details
No response
Please Read and Confirm The Following