Open buttilda opened 9 years ago
Some mods might violate the typical usage of things like ingots/blocks. (terrafirmacraft for instance adds an interface called ISmeltable to its metal items.) If they were to decide to use a system like this, would there be any way to attach functionality to these items, maybe by registering handler classes for each mod that needs something special? (personally i think they should just recognize the metal items and handle that stuff internally, but its just a thought.)
Most mods do that sort of thing with customized recipes and such. It just occurred to me that some don't and would probably need to refactor to use this.
not that doing so would be a bad thing. Adding functionality directly to materials classes in a modding environment where people should be sharing materials classes seems a bit wrong to me.
You couldn't really allow them to subclass it and submit it back into the registry, because if 2 mods wanted to do that the system would break.
I think the nearly universal practice of doing this via recipes and setting items/blocks to simply render and be recognized by mods' internal code is the better way to go.
if they absolutely needed to, they could probably use reflection and ASM editing to inject their own methods.
(edit: unified my comments)
This would be a mod that would sit on top of AOBD (or perhaps be independent from it), it would allow for other mods to register and query for different materials.
Registering a material (e.g. copper) would make any form of that material available to other modders (nugget, ingot, ore, block, fluids, etc)
This is the basic idea. To be expanded in the future.
Tagging @kotoroshinoto since it was his/her idea.