quilt-loader
quilt-loader copied to clipboard
Add the current os and architecture as mods
As a logical conclusion to the Java version being declared as a mod for dependencies, I think the platform is the next reasonable step here.
Use cases for depending on a specific os could include relying on os impl detail for libraries and JNI.
Ideally to simplify the dependency hierarchy, if your machine is running macos, the value of the operating system mod would be "macos". This might conflict with the fact we want semver in most spots?
If we end up doing that, are they really "mods" at that point? do they need a better name?
Idea building off of what Hydos said: Provide "System Attributes" that would be able to be declared as dependencies but aren't actually considered mods.
IE: I could depend on Linux or break on AMD GPUs.
Primarily, getting the vendor of your GPU, CPU, and the operating system are probably the 3 biggest ones.
OFC, this is just a spitball idea I got at 3 AM, Ill think up some better ideas tomorrow and post it here or the discord.
Being able to break on certain platforms seems too exploitable to me, see people deliberately blocking an OS they don’t approve of
Idea building off of what Hydos said: Provide "System Attributes" that would be able to be declared as dependencies but aren't actually considered mods.
IE: I could depend on Linux or break on AMD GPUs.
Primarily, getting the vendor of your GPU, CPU, and the operating system are probably the 3 biggest ones.
OFC, this is just a spitball idea I got at 3 AM, Ill think up some better ideas tomorrow and post it here or the discord.
GPU Vendor could be a bit of a weird one, do we use the GPU that java.desktop finds, which may incorrectly return on a machine with optimus?
Being able to break on certain platforms seems too exploitable to me, see people deliberately blocking an OS they don’t approve of
Semantically the only way we can approach the topic of this issue is assuming the users of the system attributes are declaring these requirements in good faith. Falsely adding that declaration to break on some OS(es) for a tribalistic reason is something only the mod developer can run to lose from.
I think getting the gpu from java.desktop is better than getting none at all, though if theres an alternative thats more reliable I would say go for it.
Being able to detect these would be really helpful in situations where say "Optiquiltium Canvas edition with new Iris addon" would be able to see that person x is running on linux with an amd gpu, and the mesa drivers dont work with this mod.
Declaring them as mods is probably not great, but making them available as dependencies sounds like a good idea nonetheless. Minimum System Requirements effectively.
Admittedly I don't actually know a ton about this yet, but wouldn't this also allow for loader plugins to define APIs wrapping around specific hardware or OS libraries? That could be really useful for a mod like Iris Shaders, which wants to make use of as many optimizations as possible.
Mod authors could use it as a way to artificially block platforms for no reason, but that's not really our business. They can also choose to crash your game if they see you have certain mods installed, it is and always has been up to the mod developer whether they want to needlessly frustrate their users.
I do have a mod idea which will only work on Unix like operating systems.
However providing os name as a string version is weird in retrospect.