Files
meatballcraft/scripts/thaumcraft/infusion/LateInfusionRecipes.zs
T
ZHAY10086 79b40286c3 hotfix6
2026-03-22 09:08:35 +08:00

67 lines
2.8 KiB
Plaintext

#modloaded thaumcraft modtweaker
#loader lateAddTC
import native.com.blamejared.compat.thaumcraft.handlers.ThaumCraft;
import native.com.blamejared.mtlib.helpers.InputHelper;
import native.net.minecraft.util.ResourceLocation;
import native.thaumcraft.api.ThaumcraftApi;
import native.thaumcraft.api.ThaumcraftApiHelper;
import native.thaumcraft.api.crafting.InfusionRecipe;
import crafttweaker.item.IIngredient;
import crafttweaker.item.IItemStack;
import thaumcraft.aspect.CTAspectStack;
/*
Infusion recipes that REPLACE existing recipes tied to research. Removal is unnecssary, the recipes will be overwritten.
This is to keep the recipe available in the research page.
*/
var tcAdditions = "thaumadditions";
var tcTinkerer = "thaumictinkerer";
var tcGado = "gadothaumy";
# Fix crystal crusher in JEI
registerInfusionRecipeFromAddon(`${tcAdditions}:crystal_crusher`, "TAR_CRYSTAL_CRUSHER",
<thaumadditions:crystal_crusher>, 3,
[
<aspect:fabrico> * 20, <aspect:exitium> * 20, <aspect:instrumentum> * 20
],
<thaumcraft:mechanism_complex>,
[
makeCrystal(<aspect:aer>), makeCrystal(<aspect:terra>), makeCrystal(<aspect:ignis>),
makeCrystal(<aspect:aqua>), makeCrystal(<aspect:ordo>), makeCrystal(<aspect:perditio>),
<thaumcraft:plate:2>, <thaumcraft:plate:2>, <thaumcraft:plate:2>,
<thaumcraft:slab_arcane_stone>, <thaumcraft:slab_arcane_stone>, <thaumcraft:slab_arcane_stone>,
<thaumadditions:salt_essence>.withTag({Aspects: [{amount: 1, key: "praemunio"}]}), <thaumadditions:salt_essence>.withTag({Aspects: [{amount: 1, key: "praemunio"}]})
]
);
# Unify brass plates
registerInfusionRecipeFromAddon(`${tcAdditions}:crystal_bore`, "TAR_CRYSTAL_BORE",
<thaumadditions:crystal_bore>, 5,
[
<aspect:exitium> * 20, <aspect:terra> * 10, <aspect:perditio> * 30
],
<thaumcraft:morphic_resonator>,
[
<thaumcraft:stone_arcane>, <techreborn:plates:18>, <thaumcraft:stone_arcane>,
<techreborn:plates:18>, <thaumcraft:stone_arcane>, <thaumcraft:mechanism_complex>
]
);
/*
The same as Infusion.registerRecipe(), but allows a namespace in the resource location.
ModTweaker only allows infusion recipes with the "thaumcraft" namespace, this allows any namespace.
*/
function registerInfusionRecipeFromAddon(resourceLocation as string, research as string, output as IItemStack, instability as int,
aspects as CTAspectStack[], centralItem as IIngredient, recipe as IIngredient[]) {
var infusionRecipe = InfusionRecipe(
research, output.native, instability,
ThaumCraft.getAspects(aspects), centralItem.native, InputHelper.toObjects(recipe)
);
ThaumcraftApi.addInfusionCraftingRecipe(ResourceLocation(resourceLocation), infusionRecipe);
}
function makeCrystal(aspect as CTAspectStack) as IItemStack {
return ThaumcraftApiHelper.makeCrystal(ThaumCraft.getAspect(aspect)).wrapper;
}