DevOnTheRocks / RockyTweaks

A Minecraft Forge mod that adds additional functionality to other mods.
GNU General Public License v3.0
5 stars 2 forks source link

CT Anvil Events (SOLVED/note on adding recipe functions. pls leave open) #36

Open Sethgno opened 5 months ago

Sethgno commented 5 months ago

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

Mohron commented 5 months ago

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.

https://docs.blamejared.com/1.12/en/Mods/RockyTweaks/Anvil

Sethgno commented 5 months ago

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

democat3457 commented 4 months ago

@Sethgno @Mohron Documentation has been updated