Energy conversion
Armigus opened this issue ยท 4 comments
EE2 had a fuel hierarchy by which lesser fuels like coal could be upgraded into more powerful, and eventually specialized, fuels. I'd like to eventually see the Minium stone combine coal into redstone, then into glowstone, then glowstone blocks and back much the same way you convert matter now. I'd need to study EE2 a bit for the varying fuel types including gunpowder, blaze rods and powder. With a few more tutorials in your video series I could do this myself and send it back to you.
Right now I'm more interested in solid fuels from other mods, especially nikolite from Redpower. It's found in the same general area as redstone, but more bountifully. With much less demand for nikolite than redstone, I tend to have surplus nikolite and shortages of redstone. Obviously I seek a transmutation recipe to resolve this. Thaumcraft treats them as equivalent so I'm looking for a 1:1 exchange both ways.
Of longer term interest is coal coke from Railcraft, peat and bituminous peat from Forestry, and Nitor and Alumentum from Thaumcraft. Coal coke has 4 times the energy and cook time of coal and could prove a powerful, if slow, force multiplier if I could transmute it back to coal even at a reduced rate of 3 or even 2 coal per coke. Then again there's the continuous production of creosote, a lesser fuel once you have a boiler in play.
The main challenge with "foreign" fuels is that the recipes need to be conditional on the availability of the target fuel. With Forge this should be possible but I don't know when in the loading process to make such a check.
There are ways to check if a mod is loaded and this should be done in the @PostInit annotation just to make sure all other mods are initialized before checking an easy 'if' method should be able to check if the requested mod is loaded and add the recipes else terminate the addon module for that mod what I do is I have a CheckHelper class that checks for the mods I wanna interract with and writes the results as simple booleans my AddonManager uses if methods to check these public booleans and load certain addons this could be easily done. (I could really use the Nikolite > Redstone thingy :P)
I'm looking into making an adding pack for ee3 where I am adding features and transmutation possibilities like this
Point out any errors as I am more versed in C# than Java but I think this is right...
@PostInit
public void postInit(FMLPostInitializationEvent event) {
Item target = GameRegistry.findItem("Nikolite","Nikolite")
if (target != null)
{
GameRegistry.addRecipe(new ItemStack(Block.NikoBlock), "xxx", "xxx", "xxx",
'x', ItemStack(target));
GameRegistry.addShapelessRecipe(new ItemStack(target, 9),
new ItemStack(Block.NikoBlock));
}
}
If you already had a Nikolite block made and wanted the conversion to and from nikolite to depend on the availability of nikolite then this should work.
Is there a more granular way of pinging for a specific item in the Forge item or block database and making only a specific recipe rather an entire module dependent on it? I'd use either an attribute or static string member in C# for this but I'm not sure Java supports either. The ideal is a subclass of Recipe called DependentRecipe that has the test built in and waits for @PostInit to try to load. You just supply the external item name(s) via attribute.