I cant get my crafting recipes to work

  • 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 community!

    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!

Mamason_

New Member
Apr 5, 2024
5
0
1
command craft:
trigger:
open chest inventory with 9 rows named "&fCrafting" to player
set slot 0,1,2,3,4,5,6,7,8,9,14,15,16,17,18,22,24,25,26,27,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,51,52,53 and 13 of player's current inventory to gray stained glass pane named "&b"
set slot 49 of player's current inventory to barrier block named "&cExit"
set {craftslots.%player's uuid%::*} to slot 10,11,19,20,21,28,29,30, and 12 of player's current inventory

every second:
loop all players:
if display name of loop-player's current inventory is "&fCrafting":
if {craftslots.%loop-player's uuid%::*} = {recipe.icejacket::*}:
set slot 23 of loop-player's current inventory to dirt

on inventory click:
if display name of event-inventory is "&fCrafting":
if event-item is gray stained glass pane named "&b":
cancel event
if event-item is barrier block named "&cExit":
close player's inventory

on inventory close:
if display name of event-inventory is "&fCrafting":
give slot 10,11,19,20,21,28,29,30,23 and 12 of player's current inventory to player

on load:
set {recipe.icejacket::*} to dirt,air,air,air,air,air,air,air, and air
 
I am trying to make a recipe (test) for dirt by using dirt, air, air, air, air, air, air, air, and air but it wont work
 
i realised i should be setting {craftslots.%player's uuid%::*} to slot 10,11,19,20,21,28,29,30, and 12 of player's current inventory every second but it wont work even when i do that
 
Using the SkBee addon for Skript, you can declare your own crafting recipes very easily, like this
Code:
on load:
    register new shaped recipe for dirt using dirt, air, air, air, air, air, air and air with id "recipe_dirt"
It also supports shapeless recipes (remember not to specify air blocks when declaring a shapeless recipe), recipe book stuff, furnace recipes, brewing stand recipes, stonecutter recipes, smithing table recipes, etc. Full documentation can be found here
https://skripthub.net/docs/?search=recipe&addon=SkBee

As for your /craft command, You can also just use this effect from base skript, as long as you're on... skript 2.0+, iirc
Code:
open crafting table to player
Documentation here: https://skripthub.net/docs/?id=1133

If you only want to able to use your custom recipe in the custom /craft table, you can give the /craft inventory a custom name (open crafting table named "e" to player) and check if that's the name of the inventory when they craft an item with the specific ID of your custom recipe. Oh, forgot to mention, your current on inventory close event allows you to easily duplicate the result of the recipe.
 
Last edited:
the skbee recipes werent working for me, and i also just wanted the special crafting gui
 
Either way, this is an incredibly inefficient and ineffective way of doing it. I still recommend the SkBee recipes, because there should already be syntax for editing the crafting gui.