Closed PieKing1215 closed 4 years ago
Having had a look at this, I'm not going to fix this. I've switched to using Forge's methods, which enforce the same checks, but should provide more helpful error messages in the general case.
If another mod isn't registering their SoundEvent
(or any other ForgeRegistryEntry
), it's going to blow up sooner or later. The best thing to do is file a report on their end.
Edit: Wrong button, woops.
I'm currently setting up a modpack, and I found that trying to play a modded music disc using "
dj
" causes the server to crash. It's triggering therequireNonNull
on line 75 inPlayRecordClientMessage
: https://github.com/SquidDev-CC/CC-Tweaked/blob/cd879b067fcdd7d8562f5930335d33e475ce55bc/src/main/java/dan200/computercraft/shared/network/client/PlayRecordClientMessage.java#L63-L77 I assume the root of the problem lies with the modded music discs being registered wrongly, but IMO this check could be done in more elegant way, just by adding the null check to the outer if. This way, if it can't play the disc it at least won't crash the server.Here's the stacktrace:
I get this with Pigstep Backport or any of the records from Charm, but not any of the vanilla ones. I haven't tested any other modded ones. The records that crash CC work normally in a normal jukebox.
Let me know if you need more info. (I didn't think the full crash report or logs would really be of much use)