Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Sethgno opened this issue Apr 9, 2024 · 3 comments
Open
Labels

Comments

@Sethgno
Copy link

Sethgno commented Apr 9, 2024

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
@Sethgno Sethgno changed the title CT Anvil Events CT Anvil Events (SOLVED/note on adding recipe functions. pls leave open) Apr 9, 2024
@Mohron
Copy link
Member

Mohron commented Apr 9, 2024

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
Copy link
Author

Sethgno commented Apr 12, 2024

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
Copy link

@Sethgno @Mohron Documentation has been updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants