igentuman / NuclearCraft-Neoteric

This is a re-creation of old but gold NuclearCraft on a modern MC version
https://curseforge.com/minecraft/mc-mods/nuclearcraft-neoteric
MIT License
23 stars 13 forks source link

NuclearCraft CraftTweaker Support/Documentation #116

Open acg3203 opened 2 months ago

acg3203 commented 2 months ago

My friend and I are in the process of making our own custom mod pack via forge. I have been on the side of customizing recipes of anything they see fit. We are using CraftTweaker to do so. The only documentation I have been able to find was on the 1.12 NuclearCraft which does not work in 1.19.2. Would it be possible to provide this or point me in the right direction?

CantBeLucifer commented 1 month ago

Hi there. CraftTweaker is kind of useless and outdated in newer versions now everything uses data. It's a better idea to use KubeJS which likely won't directly support nuclearcraft but can even add recipes to unsupported mods (provided they use data). Another option is just to make a datapack (vanilla feature). KubeJS also provides the ability to ship a built-in datapack with your modpack.

Little explanation of the methods above You'll want to check this page https://wiki.latvian.dev/books/kubejs-legacy/page/recipeeventjs for info on how to add recipes with KubeJS. Ctrl+F search for `event.custom` line 82 gives an example of a custom recipe. To find out what format your recipe should be in simply open the mod jar file with 7zip or similar, and browse to `data/modname/recipes`. In there would be all the recipes for the mod, and any data for custom machine recipes. Again you can just make a datapack, just add your own `data/modname/recipes/alloy_smelter/example.json` to a datapack or KubeJS data folder. Adding a recipe to nuclearcraft alloy smelter would be like this in KubeJS: ```javascript event.custom({ type: 'nuclearcraft:alloy_smelter', input: [ Ingredient.of('#forge:gems/diamond').toJson(), Ingredient.of('#forge:gems/emerald').toJson() // inputting with tags, can also specify item ], output: [ Item.of('minecraft:netherite_ingot', 2).toResultJson() // 2 ingots output ], powerModifier: 1.0, radiation: 1.0, timeModifier: 3.0 // takes 3 time longer than normal }) ``` You might find it easier to copy the json file directly then edit from there, which apparently you can do in the javascript, but at that point I would probably just use the datapack method.