Closed SisterJacq closed 9 years ago
Hey @ReikaKalseki would you be okay with this?
In case you aren't familiar: AOBD finds ores dynamically and makes those ores processable on several mods that I add support to. So basically this would make any ore added by any mod processable by your machines.
As long as the API is used properly (i.e. all ores are registered appropriately - e.g. "banded iron" is iron, not tin, and ore rarities are specified accurately), and nothing conflicts with my native handling here and here, this should be fine.
You can add ores as native ores too, using this: https://github.com/ReikaKalseki/RotaryCraft/blob/master/API/ExtractAPI.java#L42
AOBD would just add ores that are not already supported by your mod, so it shouldn't override any pre-existing behaviour.
I was just thinking of cases like AOBD trying to add ores like Certus Quartz which it did not realize I supported, or new versions of existing ores.
It would only support ores that have an item named ingotX and a ore named oreX (ingotCopper and oreCopper for example) in the ore dictionary, so that excludes gems, quartz and etc.
I already support many, many metals, including copper, tin, silver, nickel, iridium, chromite, uranium, cobalt, ardite, osmium, zinc, cadmium, and 30+ others.
That's a lot XD AOBD would, though, make sure that any metal you happened to miss would be supported (Metallurgy metals, or really any metals anyone decides to make)
Hey @ReikaKalseki, having some problems using your API. I understood it fine, but it's not working as I believe is intended. Where can we discuss this? Is here fine or should I contact you somewhere else?
Here is fine. What exactly is not working (and is there a stacktrace being generated)?
Well firstly, not sure if this is a dev environment issue only, but I can't run your mod unless BloodMagic is also running. Something to do with the teleposer.
The ExtractAPI is having some issues. https://github.com/ReikaKalseki/RotaryCraft/blob/master/API/ExtractAPI.java
Calling : ExtractAPI.addCustomExtractEntry(...) throws a null pointer exception at line 64. This is due to the field "product" being null
"product" is null because an exception is thrown when the API is being initiated (in that static block you have at the bottom of the class)
The log says: [15:52:01] [Client thread/INFO] [FML/aobd]: Could not load Extracts API!
The game still loads but no recipe is added.
Through reflection I was able to set the necessary fields (bypassing the failed static init) which worked! The items are created just like expected but the NEI recipe viewing for them doesn't work (either that or the recipe is not actually being added)
Another problem I noticed is that the items created are not registered in the ore dictionary, I created a recipe that has an ingot as output and that ingot wasn't registered anywhere (and therefore was useless)
The "product" field was null because it is an internal class. I will fix this.
As for the teleposer issue, my @Strippable does not run in the dev environment, so you will need to either add the Blood Magic API (including the new TeleposeEvent) or add BM itself.
Finally, as for the OreDict, that would be because this system was designed for things not in the oreDict. I might be able to fix it.
Done.
If you want I can add the ingot myself to the ore dictionary? I wasn't sure if this would cause issues with your mod.
Oh and there's something else... The metal colours, they are final fields, any chance you change that? AOBD defines the item colours just before the server starts, far too late for items to be created. I solved it for now by using reflection again.
What about the recipes not showing in NEI?
I already handled the OreDict support; as for the color, go ahead and reflect if you want; I would rather not un-final the field because of the tampering possibility.
As for NEI, that would be because the Extractor handler does not normally load this registry, as far as I know. I will look into it, but I am working on CC renders at the moment.
The NEI handler has been rewritten and now includes the custom-added ores.
Awesome. Thank you :)
It should also be faster, though FPS matters rather less in a GUI. :P
Hi!
When I am using AOBD-2.6.0 together with RotaryCraft 1.7.10 V6f and DragonAPI 1.7.10 V6f, the extractor is not able to process any of the non-vanilla ores (certus quartz, silicon, tin etc)
Checking the logs i found this exception:
[03/5/2015 06:04:42 AM] [Client thread/INFO] [FML]: Could not load Extracts API!
[03/5/2015 06:04:42 AM] [06:04:42] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: java.lang.NoSuchFieldException: modOres
[03/5/2015 06:04:42 AM] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.Class.getDeclaredField(Unknown Source)
[03/5/2015 06:04:42 AM] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at Reika.RotaryCraft.API.ExtractAPI.
@ReikaKalseki I think that's something broken inside RotaryCraft, all I'm doing in the line the error points at is call the ExtractAPI.addCustomExtractEntry method
Fixed for v7.
I was trying out the manual config to add ores to the Extractor today, but I thought, "Hey, as Reika recently (in v5) added an API for the Extractor, this seems like a job for AOBD," and as such, am suggesting it. :P