OrnitheMC / ornithe-standard-libraries

Apache License 2.0
6 stars 5 forks source link

Override api code #4

Open ItsRedlyXD opened 1 year ago

ItsRedlyXD commented 1 year ago

This is rarely done, but it'd be huge for mods like Vulkan mod, almost removing all of it's compatibility issues. It'd be so awesome to have it!!!

SRAZKVT commented 1 year ago

Mind explain a bit more around this idea ? One of the goals of OSL is to essentially do as little changes to the actual MC codebase, or at least not any that might have repercussions on gameplay.

ItsRedlyXD commented 1 year ago

Yeah, let me explain.

When you have a custom rendering mod (like vulkanmod), you need to override the rendering functions, else almost every mod in existance would crash out.

SRAZKVT commented 1 year ago

Yes, and what is your proposal to avoid that ? There isn't really a way to modify a complete pan of the game while being compatible with other mods doing similar things to the same pan of the game.

ItsRedlyXD commented 1 year ago

It could maybe be an eventhandler with a default value (sorry, I come from c#), that can be modified.

SRAZKVT commented 1 year ago

i don't see how an event would help in this situation

SpaceWalkerRS commented 1 year ago

I think this is best done through specific means for each library. So for the Rendering API, OSL should request a custom implementation from loaded mods, and if no implementation is provided, use a default implementation. I don't know if there is any other area where such a system is needed.