Support for CrT recipe ingredient Transformers
thephoenixlodge opened this issue ยท 5 comments
I'd love for it to be possible to use the likes .reuse(), .giveBack(), .transformAndReplace() etc to have even more interesting recipes.
A particular usecase I have for this would be to use dummy items to set out and not be consumed for a recipe that's similar for many different items (eg things like wooden furniture, which are the same except for the wood type used) and just use the secondary inputs as the determiner for exactly which variant of the item is crafted.
As is stands currently, there's also a slight visual bug where trying to use these in a script doesn't cause actual errors, but strangely just doesn't show the items with the transformers on in the JEI recipe lookup, though trying to actually craft the recipe still requires (and still consumes) them like normal.
... there's also a slight visual bug ... doesn't show the items with the transformers on in the JEI recipe ...
Pretty sure the same thing causing #93 is causing that.
I've gone ahead and implemented the same item transformers for the secondary ingredients.
The following have been implemented and should work. I haven't tested them all.
// confirmed working
item.reuse();
item.transformReplace(IItemStack);
// untested
item.transformDamage();
item.transformDamage(int);
item.noReturn();
CrT has two types of transformers internally, old and new. They are moving away from the old transformers in favor of the new and I've been informed that the old transformers are deprecated and will likely be removed in 1.13. Because of this, I will not be implementing the old transformers.
Transformers that will not be implemented:
item.giveBack(IItemStack);
item.transformConsume(int);
Item transformers for secondary ingredients have not been implemented. I'm still thinking through this one.
@thephoenixlodge If your plan is to use .reuse()
on the secondary ingredients, you can also use setConsumeSecondaryIngredients(false)
to force the recipe to not consume the secondary ingredients.
http://artisan-worktables.readthedocs.io/en/latest/recipes/secondaryingredients/