
Item transformer in Item Application recipe type [1.19.2]
Correlander opened this issue ยท 1 comments
When using the script
var brushTransformer = creosotebrush.transformCustom("brush/uses", (item) => {
if (item.damage < 4) {
return item.withDamage(item.damage - 1);
}
return brush;
});
craftingTable.addShapeless("test", treatedplanks, [brushTransformer]);
The item transformer will work, reducing durability until there is more than 4 damage, at which point it replaces it with a different item. I was wondering if it could be made compatible with the item_application recipetype. I ask because while it works in a crafting table, if you look at the script below, it will just keep damaging the item and never return a normal brush when a certain amount of damage is reached.
recipetype:create:item_application.addRecipe("wood/planks/treating", [treatedplanks], tag:items:minecraft:planks, brushTransformer);
I can't say I'm exactly sure why this happens or how it would be changed, but just wondering if the mod could be changed to allow this.