SemmieDev / Disc-Jockey

Play note block songs in Minecraft
MIT License
11 stars 1 forks source link

I can't play the song #16

Closed LucidMoH closed 4 months ago

LucidMoH commented 6 months ago

I play using software from version 1.3.0 in version 1.20.1, but nothing happens after tuning

STqingfengOwO commented 6 months ago

You can update your Minecraft version and use 1.3.1/1.3.0 in the updated game version and you can use viafabric to connect to the server which are in the old version.GOOD LUCKS!

Sobsz commented 6 months ago

1.20.1 here too (can't update due to many mods). 1.3.0 tunes and gets stuck at 0:00 (both on single- and multiplayer), but 1.2.5 works.

EnderKill98 commented 4 months ago

My guess is that me making the playback async causes some issues, because somehow the playback thread crashes or gets denied to do it's function because of some other mod or OS restriction.

Can you please be a bit more specific about it?

If the playback thread crashes it should also print the reason for it to the console. Can you send the relevant part of the log search for any stacktraces that include the mod?

A stack trace might look roughly like this:

grafik

If your launcher doesn't show you your logs, you can try to let it open your minecraft folder. The most recent logs should be located under logs/latest.log (it's a text file you can open with any text editor). Then it's best to use CTRL+F and search for disc_jockey and logs that look similar to the above.


Seems like #17 is a duplicate of this and #18 and #19 are kinda copies of #17 as well. Best to discuss it here, since this is the first report of this bug.

Sobsz commented 4 months ago

For me:

Somehow didn't think to check the logs until now, sorry! (I use Quilt, for the record.)

[21:17:09] [Thread-34/ERROR]: Uncaught exception in thread "Thread-34"
java.lang.NoSuchMethodError: 'void net.minecraft.class_634.method_52787(net.minecraft.class_2596)'
    at semmiedev.disc_jockey.SongPlayer.tickPlayback(SongPlayer.java:169) ~[disc-jockey-1.3.0.i0:0/:?]
    at semmiedev.disc_jockey.SongPlayer.lambda$startPlaybackThread$0(SongPlayer.java:79) ~[disc-jockey-1.3.0.i0:0/:?]
    at java.lang.Thread.run(Unknown Source) ~[?:?]
EnderKill98 commented 4 months ago

Interesting. Maybe it's some incompatibility with quilt mappings? I have never used quilt, but afaik they sometimes have slightly different mappings.

The Method that could not be found should be one in this line: https://github.com/SemmieDev/Disc-Jockey/blob/9a925470193ff480ab8d9c69ae567bedb6d5a960/src/main/java/semmiedev/disc_jockey/SongPlayer.java#L169 Likely:

I tried finding out what method it should be with this handy tool: https://wagyourtail.xyz/Projects/MinecraftMappingViewer/App?version=1.20.1&mapping=YARN,QUILT&search=method_52787

It doesn't seem to find it oddly. When though I also had difficulties switching it to Yarn build 1, which this mod uses in 1.20.1.

So maybe a quilt incompatibility or just some outright issue when mapping. Maybe old cache not updating the method from an older version when @SemmieDev built the mod and me just doing a fresh build resolved it. :shrug:

This also proves that the fix will likely not fix anything for you in theory. All it would have done is print you that stacktrace every tick to the logs, as I surrounded the method with a try-cratch to prevent any potential new crash.