
CT Anvil Events (SOLVED/note on adding recipe functions. pls leave open)
Sethgno opened this issue ยท 3 comments
recipes made with this arent being read by crafttweaker's PlayerAnvilUpdate event. is this because of the way things are loaded?
is there a way around this? thanks
EDIT:
nvm all good, i found the changelog that mentions it can use crafting function. ( 0.6.0 changelog )
for anyone wondering heres what it looks like with a basic function attatched
Anvil.addRecipe(<minecraft:dirt>, <minecraft:sand>, <minecraft:gravel>, 1,
function(output, input, craftinginfo){
if (!isNull(input.right.tag.display)
&& !isNull(input.right.tag.display.Name)
&& input.right.tag.display.Name == "Good Taco Seasoning"){
return <minecraft:cooked_porkchop>;
}
return output;
}
);
oh and heres the info from the changelog
- Now accepts an optional IRecipeFunction *subject to change #11
- out is passed
- ins is passed with the left and right inputs already marked as left and right.
- cInfo is passed as null as this information is not available
Maybe an update to the documentation would be useful here? I'm not actually sure about the PlayerAnvilUpdate
event. It might be something that was added after I created this mod or I was just otherwise unaware of as I created this because CT lacked anvil support.
oh yeah sorry idk how to update the wiki myself so i thought it would be a good idea to mention the capability here for now, i hope thats okay