I'm making a simple mod to repair armor using ingots of the same type. This is my first mod and I'm hoping to refine it and put it out for other people too. Well I'm stuck!
I explored the .json files first and then made my own. I started with chain body armor. I want you to be able to take your armor in upper slot, put in ingot of same type in the lower, and get your repaired armor back!
The thing is it won't work unless I hard code the ingot type. I'd rather not have to do that as using the variables with name= is a lot more elegant, but is it possible?
{
ingredientPattern: "A L",
ingredients: {
"A": { type: "item", code: "armor-body-chain-*", name: "metal"},
"L": { type: "item", code: "ingot-{metal}" }
},
width: 1,
height: 2,
output: { type: "item", code: "armor-body-chain-{metal}", quantity: 1 }
}
]
That's the whole JSON, the error I get is this.
16:04:36 [Server Error] Grid Recipe with output Item code game:armor-body-chain-copper contains an ingredient that cannot be resolved: Item code game:ingot-{metal}
16:04:36 [Server Error] Grid Recipe with output Item code game:armor-body-chain-tinbronze contains an ingredient that cannot be resolved: Item code game:ingot-{metal}
16:04:36 [Server Error] Grid Recipe with output Item code game:armor-body-chain-bismuthbronze contains an ingredient that cannot be resolved: Item code game:ingot-{metal}
16:04:36 [Server Error] Grid Recipe with output Item code game:armor-body-chain-blackbronze contains an ingredient that cannot be resolved: Item code game:ingot-{metal}
16:04:36 [Server Error] Grid Recipe with output Item code game:armor-body-chain-iron contains an ingredient that cannot be resolved: Item code game:ingot-{metal}
16:04:36 [Server Error] Grid Recipe with output Item code game:armor-body-chain-meteoriciron contains an ingredient that cannot be resolved: Item code game:ingot-{metal}
16:04:36 [Server Error] Grid Recipe with output Item code game:armor-body-chain-steel contains an ingredient that cannot be resolved: Item code game:ingot-{metal}
16:04:36 [Server Error] Grid Recipe with output Item code game:armor-body-chain-gold contains an ingredient that cannot be resolved: Item code game:ingot-{metal}
16:04:36 [Server Error] Grid Recipe with output Item code game:armor-body-chain-silver contains an ingredient that cannot be resolved: Item code game:ingot-{metal}
So it is definitely storing the text at the wildcard in "metal" but .. then can only fetch it for the output.
I've tried hard-coding the ingot type, ex ingot-tinbronze and it works. But why doesn't this?
Thank you!