Crafting Functions
Lanse505 opened this issue ยท 1 comments
As discussed in Discord DMs.
The current implementation of the crafting syntax does not support CraftTweaker Crafting Functions.
(See Below).
This is a feature that'd be great to have supported if the idea to move recipes over to Artisan Worktables would be off any solid ground since some developers use crafting functions quite in-depth.
They'd also play quite nicely into the current weighted output system and could be used to implement a potential "weighted XP lottery" recipe for example.
Example of Standard Crafting Functions:
recipes.addShapeless("ore_uses_xp", <contenttweaker:material_part:95>,
[<minecraft:iron_ingot>],
function(output, inputs, crafting) {
if crafting.player.xp >= 1 {
return output;
} else {
return null;
}},
function(output, crafting, player){
player.removeXP(1);
player.sendChat("Removed 1 XP.");
});
I've gone about trying to implement this feature at three different points in development and failed. At this point, I've blown tens of hours on this one and I have to cut my losses and put it on the back burner.
I agree it would be a nice addition and I may look at it again in the future, but right now I need to focus the time I have on wrapping up the planned feature set before 1.13.