Skip to content

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

@Sethgno

Description

@Sethgno

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions