#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"; # KAMI armor registerInfusionRecipeFromAddon(`${tcTinkerer}:kami_helm`, "TT_KAMIHELM", , 32, [ * 150, * 125, * 125, * 60, * 250, * 125 ], , [ , , , , , , .withTag({Potion: "minecraft:night_vision"}), , , , , ] ); registerInfusionRecipeFromAddon(`${tcTinkerer}:kami_chest`, "TT_KAMICHEST", , 32, [ * 150, * 125, * 125, * 125, * 250, * 60 ], , [ , , , , , , , , , , , ] ); registerInfusionRecipeFromAddon(`${tcTinkerer}:kami_legs`, "TT_KAMILEGS", , 32, [ * 150, * 125, * 125, * 125, * 250, * 60 ], , [ , , , , , , .withTag({Potion: "minecraft:fire_resistance"}), , , , , ] ); registerInfusionRecipeFromAddon(`${tcTinkerer}:kami_boots`, "TT_KAMIBOOTS", , 32, [ * 150, * 125, * 125, * 125, * 250, * 60, * 60 ], , [ , , , , , , , , , , , ] ); # Fix crystal crusher in JEI registerInfusionRecipeFromAddon(`${tcAdditions}:crystal_crusher`, "TAR_CRYSTAL_CRUSHER", , 3, [ * 20, * 20, * 20 ], , [ makeCrystal(), makeCrystal(), makeCrystal(), makeCrystal(), makeCrystal(), makeCrystal(), , , , , , , .withTag({Aspects: [{amount: 1, key: "praemunio"}]}), .withTag({Aspects: [{amount: 1, key: "praemunio"}]}) ] ); # Unify brass plates registerInfusionRecipeFromAddon(`${tcAdditions}:crystal_bore`, "TAR_CRYSTAL_BORE", , 5, [ * 20, * 10, * 30 ], , [ , , , , , ] ); /* 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; }