Railcraft

Railcraft

34M Downloads

[REQUEST] UBC Support

bookerthegeek opened this issue ยท 15 comments

commented

Hello!

I am requesting that you register your ores with the UBC if it is installed.

The API can be found HERE.

Thank you for considering my request.

commented

On 1.7.10, there was a mod that used to do that.

commented

wouldn't it be better if UBC just pulled the ores from the oredict itself? then it would support almost all modded ores at once

commented

Do you mean poor ores?

commented

My understanding (my non-java coding understanding) is that UBC does not generate any ores by itself, just replaces your ores as they generate so that it matches the surrounding strata. This allows Railcraft to continue to control its own Ore Generation, while making the ores match their surroundings.

commented

I already use an overlay texture, but I have no idea how it works in 0.9. The documentation is sparse at best.

commented

@liach Thank you for that mod listing.

If you noticed I linked you to the 1.10 version of the API, and not the 1.7.10 version, as the mod that you linked is for. Otherwise I would have used that mod as it does what I am asking for Railcraft to do natively.

commented

I think the best solution is to update that mod.

commented

Rodger. Thank you for taking the time to consider my request.

Please keep up the good work and I look forward to seeing what Railcraft does next.

commented

Can you get a stat on how often UBC is used?

commented

According to Curse download count::

  • 1,171 for MC 1.11
  • 2,764 for MC 1.10.x
  • 106,787 for MC 1.7.x

Granted these are not massive numbers. Personally I think one of the main reasons is due to the fact it did require another mod to have modded ores supported.

Can I ask if my understanding is correct about something? I was under the impression that to add support required very few lines of code and some textures, of which the textures would already exist? My thought on the ease of this request was the only reason I made it. If it is a lot more complicated than that I do apologize.

commented

The hard part is usually learning the system and working out the build script dependencies. But I haven't actually even looked at the mod myself.

commented

Gotcha. I got my thought on the ease of adding supprt from the MCF page.

Snippet from the MCF thread

Code: there are two ways to request your ores get "UB'd". Both require a simple one-line call, wrapped in a try-catch so it runs if UBC is installed and just gets skipped if it's not there.

The first method is to actually request the operation. This has to be done during your pre-init and after UBC has run its pre-init.

try {
 UBAPIHook.ubAPIHook.ubOreTexturizer.
 setupUBOre(<em>oreBlock</em>, <em>overlayTextureName, FMLPreInitializationEvent);
} catch (Exception e) {
 // do nothing; Underground Biomes not installed
}</em>

The second method is to send a request to UBC. UBC stores this in a queue and runs it during its own pre-init. This has to be done before UBC runs its own pre-init.

try {
 UBAPIHook.ubAPIHook.ubOreTexturizer.
 requestUBOreSetup(<em>oreBlock</em>, <em>overlayTextureName);
} catch (Exception e) {
 // log e.toString() somehow so you will know if you called this at the wrong time.
 // UB will throw UBOreTexturizer.BlocksAreAlreadySet (a runtime exception) if you do
}</em>

This was for the 1.7.x version (I think as it points to that part of their API on the forums. I have no idea if it changed for 1.10

As per your suggestion @liach I have posted over at UBC-Ore-Registrar.

commented

@CovertJaguar gradle build script dependancies are not to hard to do, if you want i could help with that

commented

Closing issue as the compatibility mod author has decided to update their mod and is including support for your mod natively.

Thank you guys for looking into it, And I am sorry to have wasted your time.