Config for all recipes + New addition ( JSON file for adding recipes )
Carbon-Ghost opened this issue · 32 comments
The old GT had a config with all of it's machine recipes in it iirc, would be nice if you include it ^.^ Would basically allow people to modify recipes if they need to for their modpack for x reasons.
Optionnally, it would be nice to have our own JSON file with a basic syntax to add recipes :D ( it would save us time from having to do modtweaker compatibility ), here is an exemple of syntax :
MachineName("x";"y optionnal"){("list of outputs seperated with ; like here") , ("list of additionnal bonus outputs seperated with ; like here")}
You can use UN or OD, in both cases, put your your names in <> and if you use OD, use it like this :
ore:exempleshapeExempleMaterial
add * x for specifying the number of items used.
Exemple :
BlastFurnace(ore:plateCarbon * 32 ; minecraft:iron ) {(ore:ingotDamascusSteel ; ore:dustAsh * 8)}
@jaredlll08 did you ever get around to adding it?
Any pack doing modifications is going to have Minetweaker/Modtweaker installed anyway because they work great, have a extremely easy to use scripting language, and (though generally not recommended) can be updated in real-time and all the features you describe are identical to Minetweaker syntax anyway.
An example of adding a recipe to a Railcraft blast furnace:
//InputStack, matchDamage, matchNBT, Cook time, OutputStack
mods.railcraft.BlastFurnace.addRecipe(minecraft:stone, false, false, 130, minecraft:iron_ingot);
Greg probably only had it because it would have predated Modtweaker.
Even if you do this, strongly consider Minetweaker support additionally/instead.
I am not talking about crafting recipes but machines one, and modtweaker doesn't support us yet and to create support it might take time...
Could either wait for Modtweaker support if someones in close contact with Jared or use the Minetweaker 3 API, detect it on launch and if its not there fall back to standard recipes.
Here's a mod that added Minetweaker support to Gregtech as an example - https://github.com/Dream-Master/Minetweaker-Gregtech-5-Addon
And here is native Minetweaker 3 IC2 support - https://github.com/stanhebben/MineTweaker3/tree/master/MineTweaker3-MC1710-Mod-IC2
I mean, you guys may very well want to write your own config based system, but the Minetweaker API is pretty readily available, if you want to add support at all.
I know Deam-Master, but jared atm have exams and already need to update other mods that worked before like mekanism, that's why ..
Can someone help me make a script to test this, i've never used minetweaker before ;(
You can try if you want ^^ , also sorry, I derped, should have put this issue in TODO Techreborn >.<°
import mods.techreborn.alloySmelter; //Don't know if the import was needed, (IC2 needs it)
//input1, input2, output1, tickTime, euPerTick
mods.techreborn.alloySmelter.addRecipe(minecraft:gold_ingot, minecraft:iron_ingot, minecraft:diamond, 20, 100);
Throwing error - No such member: techreborn
Got further than it did before, not sure of the syntax of your Minetweaker support
I tried - mods.techreborn.alloySmelter.addRecipe(minecraft:gold_ingot, minecraft:iron_ingot, minecraft:diamond, 20, 100);
Before it was saying "No such member - techreborn"
Now its saying "error parsing techreborn.zs, expected -- )"
So I don't know the correct format for the script in this case.
We might need to think how we want to do this, becuase when I export the machine recipes to a json file its 12000 lines long.
https://gist.github.com/modmuss50/e0bb9990eff7f0cf008a
Im not sure of a better way of allowing recipes to be disabled.
That does not include vanilla crafting table recipes, forestry machines, Natura, and thumcraft recipes.
We could use that json format for adding recipes, but im not sure what we would use to disable them
Pinging me is always good ;)
So how many machines are we talking about here?
Do I need to use reflection to add/remove recipes?
Just a heads up, it is usually , ,
Nope, I started on a minetweaker support but I don't know how to do it, I will send you the details on how the system works when I get to a computer. But all the recipes are handled in one array list.
I hope you mean each machine has its own array...
On Tuesday, July 28, 2015, Modmuss50 [email protected] wrote:
Nope, I started on a minetweaker support but I don't know how to do it, I
will send you the details on how the system works when I get to a computer.
But all the recipes are handled in one array list.—
Reply to this email directly or view it on GitHub
#70 (comment)
.
Nope, one array.
Thats an array of IBaseRecipeType, you can get the machine name from there. You can see the list of machines and their names here:
https://github.com/TechReborn/TechReborn/tree/master/src/main/java/techreborn/api/recipe/machines
I had a go at adding support here, https://github.com/TechReborn/TechReborn/blob/master/src/main/java/techreborn/compat/minetweaker/MTAlloySmelter.java
but as @TheQuantumGeneral said it was not working.
I dont mind if you want to add the support into your mod. I hope that is all the info you need.
oh and you can get all the recipes for a certain machine here:
https://github.com/TechReborn/TechReborn/blob/master/src/main/java/techreborn/api/recipe/RecipeHandler.java#L34
@jaredlll08 : Get some rest first, you are sick after all :c It's low priority ^^
I feel bad though, since I had exams, then I went away for a week, now I am
sick, and until the 19th of August I have some tasks to do for school :/
On Tue, Jul 28, 2015 at 4:46 PM, Carbon-Ghost [email protected]
wrote:
@jaredlll08 https://github.com/jaredlll08 : Get some rest first, you
are sick after all :c It's low priority ^^—
Reply to this email directly or view it on GitHub
#70 (comment)
.
Just link me to the classes, that site is automatic, judt needs .java files
On Thursday, August 27, 2015, Modmuss50 [email protected] wrote:
yes!, I will send you a list of all the machines when i've finished adding
support for them—
Reply to this email directly or view it on GitHub
#70 (comment)
.
Thats cool :)
https://github.com/TechReborn/TechReborn/tree/master/src/main/java/techreborn/compat/minetweaker
Ive not finished adding all of our machines, I would wait till I have finished.
mods.techreborn.alloySmelter.addRecipe(minecraft:gold_ingot, minecraft:iron_ingot, minecraft:diamond, 20, 100);
mods.techreborn.assemblingMachine.addRecipe(minecraft:gold_ingot, minecraft:iron_ingot, minecraft:diamond, 20, 100);
mods.techreborn.blastFurnace.addRecipe(minecraft:gold_ingot, minecraft:gold_ingot,minecraft:iron_ingot, minecraft:diamond, 20, 100, 1000);
mods.techreborn.centrifuge.addRecipe(minecraft:gold_ingot, minecraft:iron_ingot, minecraft:gold_ingot, minecraft:iron_ingot, minecraft:diamond, minecraft:diamond, 20, 100);
I will get proper ones done when I have the time, I will look into getting a wiki on the website or something. They all have remove recipe function as well.
Should I add it to
Www.blamejared.com/modtweaker/
On Thursday, August 27, 2015, Modmuss50 [email protected] wrote:
mods.techreborn.alloySmelter.addRecipe(minecraft:gold_ingot,
minecraft:iron_ingot, minecraft:diamond, 20, 100);mods.techreborn.assemblingMachine.addRecipe(minecraft:gold_ingot,
minecraft:iron_ingot, minecraft:diamond, 20, 100);mods.techreborn.blastFurnace.addRecipe(minecraft:gold_ingot,
minecraft:gold_ingot,minecraft:iron_ingot, minecraft:diamond, 20, 100,
1000);mods.techreborn.centrifuge.addRecipe(minecraft:gold_ingot,
minecraft:iron_ingot, minecraft:gold_ingot, minecraft:iron_ingot,
minecraft:diamond, minecraft:diamond, 20, 100);I will get proper ones done when I have the time, I will look into getting
a wiki on the website or something. They all have remove recipe function as
well.—
Reply to this email directly or view it on GitHub
#70 (comment)
.