diff --git a/config/unidict/UniDict.cfg b/config/unidict/UniDict.cfg index ff22e445..64eb5ad6 100644 --- a/config/unidict/UniDict.cfg +++ b/config/unidict/UniDict.cfg @@ -245,6 +245,7 @@ resources { minecraft:gold_ingot_from_block minecraft:gold_ingot_from_nuggets minecraft:gold_block + immersiveengineering:compat/plate_thaumium_brass > # Recipe names that you want to be removed. diff --git a/scripts/TheGreatOreCleanse.zs b/scripts/TheGreatOreCleanse.zs index 7b409c3c..9e195233 100644 --- a/scripts/TheGreatOreCleanse.zs +++ b/scripts/TheGreatOreCleanse.zs @@ -45,12 +45,15 @@ recipes.addShapeless(*9, []); val brassplate = ; brassplate.remove(); +brassplate.remove(); + +recipes.removeByRecipeName("thaumcraft:brassplate"); mods.immersiveengineering.MetalPress.removeRecipe(); mods.immersiveengineering.MetalPress.addRecipe(, , , 2000); -recipes.removeShapeless(, [], true); -recipes.addShapeless(, +recipes.removeShapeless(, [], true); +recipes.addShapeless("plate_brass_ie", , [, ]); @@ -68,8 +71,6 @@ recipes.addShaped(, mods.immersiveengineering.ArcFurnace.removeRecipe(); mods.immersiveengineering.ArcFurnace.addRecipe(, , null, 100, 512, [*3]); mods.immersiveengineering.ArcFurnace.addRecipe(, , null, 100, 512, [*3]); -mods.immersiveengineering.ArcFurnace.addRecipe(, , null, 100, 512, [*3]); -mods.immersiveengineering.ArcFurnace.addRecipe(, , null, 100, 512, [*3]); //================================================================== @@ -286,11 +287,13 @@ silverplate.remove(); silverplate.remove(); silverplate.remove(); +recipes.removeByRecipeName("bewitchment:compat/silver_plate"); + mods.immersiveengineering.MetalPress.removeRecipe(); mods.immersiveengineering.MetalPress.addRecipe(, , , 2000); recipes.removeShapeless(, [], true); -recipes.addShapeless(, +recipes.addShapeless("plate_silver_ie", , [, ]); @@ -691,26 +694,20 @@ irondust.remove(); val ironplate = ; ironplate.remove(); ironplate.remove(); +// ironplate.remove(); ironplate.remove(); ironplate.remove(); -recipes.remove(); -recipes.addShaped(*3, -[[,,]]); +recipes.removeByRecipeName("thaumcraft:ironplate"); mods.immersiveengineering.MetalPress.removeRecipe(); mods.immersiveengineering.MetalPress.addRecipe(, , , 2000); recipes.removeShapeless(, [], true); -recipes.addShapeless(, +recipes.addShapeless("plate_iron_ie", , [, ]); -recipes.addShapeless(*3, -[, -, -]); - mods.immersiveengineering.Crusher.removeRecipe(); mods.immersiveengineering.Crusher.addRecipe(*2, , 2048, , 0.1); mods.immersiveengineering.Crusher.addRecipe(, , 2048); diff --git a/scripts/mixin/thaumcraft/UnifyBoreDrop.zs b/scripts/mixin/thaumcraft/UnifyBoreDrop.zs new file mode 100644 index 00000000..bfd04f57 --- /dev/null +++ b/scripts/mixin/thaumcraft/UnifyBoreDrop.zs @@ -0,0 +1,28 @@ +#modloaded thaumcraft techreborn +#loader mixin + +import native.net.minecraft.item.Item; +import native.net.minecraft.item.ItemStack; + +import native.techreborn.items.ingredients.ItemPlates as TRPlates; + +/* +Unify plate drops for arcane bore. + +Created by ChaosStrikez for Thaumcraft v6.1.BETA-26. +*/ +#mixin {targets: "thaumcraft.common.entities.construct.EntityArcaneBore"} +zenClass mixinEntityArcaneBore { + #mixin Redirect + #{ + # method: "func_70628_a", + # at: { + # value: "NEW", + # target: "(Lnet/minecraft/item/Item;)Lnet/minecraft/item/ItemStack;", + # ordinal: 5 + # } + #} + function mbc_unifyBrassPlate(original as Item) as ItemStack { + return TRPlates.getPlateByName("brass"); + } +} \ No newline at end of file diff --git a/scripts/mixin/thaumcraft/UnifyTurretDrops.zs b/scripts/mixin/thaumcraft/UnifyTurretDrops.zs new file mode 100644 index 00000000..a5ffa83a --- /dev/null +++ b/scripts/mixin/thaumcraft/UnifyTurretDrops.zs @@ -0,0 +1,55 @@ +#modloaded thaumcraft techreborn thermalfoundation +#loader mixin + +import native.net.minecraft.item.Item; +import native.net.minecraft.item.ItemStack; + +import native.cofh.thermalfoundation.item.ItemMaterial as ThermalPlates; +import native.techreborn.items.ingredients.ItemPlates as TRPlates; + +/* +Unify plate drops for advanced crossbow turret. + +Created by ChaosStrikez for Thaumcraft v6.1.BETA-26. +*/ +#mixin {targets: "thaumcraft.common.entities.construct.EntityTurretCrossbowAdvanced"} +zenClass MixinEntityTurretCrossbowAdvanced { + #mixin Redirect + #{ + # method: "func_70628_a", + # at: { + # value: "NEW", + # target: "(Lnet/minecraft/item/Item;II)Lnet/minecraft/item/ItemStack;", + # ordinal: 4 + # } + #} + function mbc_unifyBrassPlate(original as Item, amount as int, meta as int) as ItemStack { + return TRPlates.getPlateByName("brass"); + } + + #mixin Redirect + #{ + # method: "func_70628_a", + # at: { + # value: "NEW", + # target: "(Lnet/minecraft/item/Item;II)Lnet/minecraft/item/ItemStack;", + # ordinal: 5 + # } + #} + function mbc_unifyIronPlate1(original as Item, amount as int, meta as int) as ItemStack { + return ThermalPlates.plateIron.copy(); + } + + #mixin Redirect + #{ + # method: "func_70628_a", + # at: { + # value: "NEW", + # target: "(Lnet/minecraft/item/Item;II)Lnet/minecraft/item/ItemStack;", + # ordinal: 6 + # } + #} + function mbc_unifyIronPlate2(original as Item, amount as int, meta as int) as ItemStack { + return ThermalPlates.plateIron.copy(); + } +} \ No newline at end of file diff --git a/scripts/thaumcraft/UnifyGolemMaterials.zs b/scripts/thaumcraft/UnifyGolemMaterials.zs new file mode 100644 index 00000000..2ca503d8 --- /dev/null +++ b/scripts/thaumcraft/UnifyGolemMaterials.zs @@ -0,0 +1,60 @@ +#modloaded thaumcraft +#loader lateAddTC +import native.net.minecraft.item.ItemStack; +import native.thaumcraft.api.golems.parts.GolemMaterial; +import native.thaumcraft.api.golems.parts.GolemHead; +import native.thaumcraft.api.golems.parts.GolemLeg; + +import crafttweaker.item.IItemStack; +/* +Unify plates visually shown in the golem press. +*/ +var unifiedPlates = { + : , // brass + : , // iron + : , // silver +} as IItemStack[IItemStack]; + +# Materials +for material in GolemMaterial.getMaterials() { + if (isStackValid(material.componentBase)) { + var baseComponent as IItemStack = material.componentBase.wrapper; + material.componentBase = unifyStack(baseComponent, unifiedPlates); + } +} +# Head +for head in GolemHead.getHeads() { + var components = head.components; + for i in 0 to components.length { + var component = components[i]; + if (component instanceof ItemStack && isStackValid(component as ItemStack)) { + var stack as IItemStack = (component as ItemStack).wrapper; + components[i] = unifyStack(stack, unifiedPlates); + } + } +} +# Leg +for leg in GolemLeg.getLegs() { + var components = leg.components; + for i in 0 to components.length { + var component = components[i]; + if (component instanceof ItemStack && isStackValid(component as ItemStack)) { + var stack as IItemStack = (component as ItemStack).wrapper; + components[i] = unifyStack(stack, unifiedPlates); + } + } +} + +function isStackValid(stack as ItemStack) as bool { + return !(isNull(stack) || stack.isEmpty()); +} + +function unifyStack(stackIn as ItemStack, unifiedDict as IItemStack[IItemStack]) as ItemStack { + var stack as IItemStack = stackIn.wrapper; + for original, unified in unifiedDict { + if (stack.anyAmount().matches(original)) { + return (unified * stack.amount).native; + } + } + return stackIn; +} \ No newline at end of file diff --git a/scripts/thaumcraft/infusion/LateInfusionRecipes.zs b/scripts/thaumcraft/infusion/LateInfusionRecipes.zs index bc69273f..65d5196b 100644 --- a/scripts/thaumcraft/infusion/LateInfusionRecipes.zs +++ b/scripts/thaumcraft/infusion/LateInfusionRecipes.zs @@ -92,6 +92,19 @@ registerInfusionRecipeFromAddon(`${tcAdditions}:crystal_crusher`, "TAR_CRYSTAL_C ] ); +# 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.