Unify thaumcraft plates in research rewards

This commit is contained in:
jchung01
2025-07-08 20:52:39 -07:00
parent dd5b82f2c1
commit 0da8ecd252
3 changed files with 49 additions and 20 deletions
+27
View File
@@ -0,0 +1,27 @@
#modloaded thaumcraft
#loader lateAddTC
#priority 10
import native.net.minecraft.item.ItemStack;
import crafttweaker.item.IItemStack;
static unifiedPlates as IItemStack[IItemStack] = {
<thaumcraft:plate:0>: <techreborn:plates:18>, // brass
<thaumcraft:plate:1>: <thermalfoundation:material:32>, // iron
<bewitchment:silver_plate>: <thermalfoundation:material:322>, // silver
};
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;
}
function unifyPlates(stackIn as ItemStack) as ItemStack {
return unifyStack(stackIn, unifiedPlates);
}