
Update to 1.13.2
juliusfrost opened this issue · 22 comments
Minecraft Forge is still in developpement for 1.13, so for now it's not really possible. But maybe when forge for 1.13 will release.
forge may still be in development but they have now released the first public build
Yes, i saw it. I started to port it but for now it's really low priority for me since the api changes and the changes in minecraft's sound handler are quite significant. And also i am not using 1.13 myself. But this is an open source project so if someone wants to give it a shot they can make a pull request.
I'll probably continue maintaining the mod for as long as i'll still play minecraft because i really love it but i don't know if i can post it to Curseforge, i would need Sonic Ether's and daipenger's approval since they both did the most work on it.
Firstly, thank you for further updating this mod!
As 1.15 is out and 1.14 has been recognized by the Forge team as the new LTS and 1.12 support has been dropped, is there a higher possibility for a port to newer versions?
First working 1.15.2 release Sound-Physics-1.0.8-1.15.2.jar.zip
Lots of things missing, but fun to try anyway.
Based on secret secret
I'm super pleased to hear you wish to keep maintaining this mod. I'm quietly hoping that a 1.14 version with support for fabric comes out, and was wondering now that all of these things (forge, fabric) are about, if you plan to update this mod to those versions?
Sorry for the late reply, I probably won't make a fabric or rift version, i'm just gonna stick to forge for convenience's sake. For now porting it to newer version isn't my main priority mostly because i can't find a easy way to decompile the newer versions and also because most mods are still for 1.12.2.
Out of curiosity, what exactly has to be done to port it to a newer version? I might give it a try myself. I already have Visual Studio Code installed and I have had Java classes at school (no pun intended), so I have some experience with Java programming too.
You would have to update forge gradle, update all the api and then update the injection. The most annoying thing is the injection because i can't find a method to decompile the minecraft sources in 1.13+, in the past you could just run gradlew setupDecompWorkspace and you would get the files but now it doesn't seem to work anymore (maybe it does now, i haven't check in a bit), i also use javap to get the java assembly to find where to inject the instructions. It's not a very complicated process, but it takes a bit of time.
It will help for newer versions but for me it's not that helpful, it's a lot more helpful for people who maintain forge, fabric or other mod loaders to update faster because instead of having to wait for the MCP team to make another mapping they can just use the official one. It will help speed up modding to newer versions which is nice.
Does the fact that Mojang is releasing their obfuscation maps for future versions help with anything? I still haven't really had time to look into this stuff, but they said it was specifically to make life easier for modders.
It seems like someone is porting the mod to 1.14 if anybody's interested, https://github.com/AfterRebelion/Sound-Physics/tree/1.14.
I'm working at a slow pace right now.
Currently checking injection code, and since Paulscode was replaced, lots of the classes and methods were moved, or completely changed. Adding to that all the new sound classes lack mcp mappings, so it's really hard to see. And afaik, there is currently no toolkit that lets you use mojang mappings.
Ah right so they did remove paulscode in 1.14 ? That's really annoying, most of the important mapping have to be redone. It was still in 1.13 but it used kind of a hack to support LWJGL 3 so it made sense to get rid of it i guess. I looked a bit into it and it does look like it's going to be a pain for some stuff like the attenuation, they removed the rolloff one but for the rest, i've got a rough idea of how the injection would look like. If i feel like it, i might help out.
I ported Sound Physics to 1.15.2 as said in #23 and it's fully featured.
So it's a preference choice.
I saw the hack, that's why I was most concerned about it.
TransformationService is a tool for implementing something like Mixins, not for mods to use. That's why you had to hack around it.
The only supported way to do coremods in 1.13+ is using the js API, it's a little hard to understand at first, however you can do most of the things that were possible using the old approach, and CPW is always open for new methods, should moders require it.
The only downside I see is that Intellij want's you to pay for Ultimate to work with it, so I switched to Visual Studio Code instead ;D
Another little detail, is that I saw you still have the part of code that transforms audio streams to mono. This is no longer necessary, as Mojang to the switch to JWJGL3 had to made the change themselves, and all sound resources are already mono (AFAIK, the only sounds that remain stereo are BGM)
If a mod uses stereo positional sounds, that's clearly a bug.
Congratulations on pulling that off!
I saw our approach was really different than mine, however that's expected, as my main goal was to make a coremod-less version (Didn't pull that off, sadly, still needed one coremod)
Looking at the code, I have a lot of questions, however there is one that goes above all else.
I saw you are using a TransformationService, what's the reasoning behind this?
Something like this should be doable using ASMAPI
You can see an example on how I did it here
Would be great to hear your comments on this.
I'm currently focusing on other projects, so keep the up the good work! :D
Thank you, :)
I wanted to use a java coremod because i wanted to be able to turn off some injection using the config but in the end it was not easily doable because the Transformer and the mod used different classloaders. And also i didn't really want to use js to write the coremod. The only way i saw how to make a java coremod was a TransformationService but it wouldn't load the mod in the jar with it when there was one in there so i had to make a bit of a hack to get it to load (See here)
I didn't really want to use the js coremod to be quite honest. I understand the reason behind the move to it but i don't really like it. Nor did i want to use mixins because it would add a dependency (even if i packaged it with Sound Physics). And I'd rather keep Sound Physics a small standalone mod. So I ended up looking at modlauncher & forge's source code for a while to try to find an alternative, and i couldn't find anything better than using a TransformerService to make a java coremod.
I left in the audio downmixing mostly in case some mods use stereo sounds. Already in 1.12.2, it was mostly for dynamic surroundings (at least for me) as most of its sounds were stereo. In 1.12.2 most vanilla sounds were already in mono.
First working 1.15.2 release Sound-Physics-1.0.8-1.15.2.jar.zip
Lots of things missing, but fun to try anyway.
Based on secret secret
Any update to this? How about a 1.16 release?