need suggestion: "custom recipe"

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

cheatchki

Supporter ++
Jun 26, 2017
49
1
8
24
So I am looking at creating a special workbench which is really just a dispenser with an enchantment table next to it. I have that all set up it recognizes the block but now I'm not sure how to do recipes, I would like to input the recipe into the dispenser and you right click the enchantment table and bam the item is made!
What would be the most effective method of figuring out if a recipe is defined or not?

I was thinking like
code_language.skript:
if slot 0 of dispenser is air
    if slot 1 of dispenser is diamond
        if slot 2.... etc....
    else if slot 1 is... etc

and so on but that list would become huge and annoying to navigate

Do any of you know of a better method to compare the "custom recipes" or is the my best bet?
 
So I am looking at creating a special workbench which is really just a dispenser with an enchantment table next to it. I have that all set up it recognizes the block but now I'm not sure how to do recipes, I would like to input the recipe into the dispenser and you right click the enchantment table and bam the item is made!
What would be the most effective method of figuring out if a recipe is defined or not?

I was thinking like
code_language.skript:
if slot 0 of dispenser is air
    if slot 1 of dispenser is diamond
        if slot 2.... etc....
    else if slot 1 is... etc

and so on but that list would become huge and annoying to navigate

Do any of you know of a better method to compare the "custom recipes" or is the my best bet?
The only other ways I could think of are a bit convoluted as well, but possibly looping the items contained in the block next to the enchant table when it's clicked, and if they match a "recipe list variable" then replacing the items or giving the custom item to the player.
 
Last edited by a moderator:
I would make a nice system by combining MundoSK custom events and a function to register recipes. If you wanted extra points, you can use packets to make the dispenser display as a crafting bench and still have it be a dispenser server side
 
Status
Not open for further replies.