Shapeless Recipe - ShaneBeee/SkBee GitHub Wiki

Shapeless recipes do not hold a specific shape, the player can place the items in the crafting grid in any order they choose.

Here is the basic Syntax:

register [new] shapeless recipe for %itemtype% (using|with ingredients) %itemtypes% with id %string% [in group %string%]

Let's break it down:

Registering a recipe for an item:

register [new] shapeless recipe for %itemtype% 

Here we are setting the item which will be the result of this recipe.

Special Note:

Recipes should be registered in a Skript load event. This is due to the fact that recipes are only sent to the player when they log onto the server. If a recipe is registered after the player joins, they will need to re-log to receive the recipe. By only using the Skript load event this ensures all recipes are only registered when the server starts up.

Setting the ingredients:

(using|with ingredients) %itemtypes%

Here we are going to set the ingredient for this recipe. You can use up to 9 items.
If you input 4 or less items, this recipe will be craftable in the player's personal crafting grid, as well as in a crafting table.
If you input more than 4 items, this recipe will only be craftable in a crafting table.
It doesn't matter which order items are added to a recipe.

Setting the ID:

with id %string%

Here we set the ID (namespace) for the recipe. This will register the recipe to the server with a specific namespace, ex:

with id "my_item"

this will register as SkRecipe:my_item
This id can be used to unlock recipes with this addon, or via Minecraft's recipe command, ie:

/minecraft:recipe give player_name SkRecipe:my_item

When unlocking a recipe via this addon, SkRecipe: is not required, this only required when typing it into Minecraft's commands.

Setting a group:

[in group %string%]

Groups are optional. This will group multiple recipes together. When you open up your recipe book, the recipes will be stacked, when you hover over the recipe you will see the item cycling thru the available recipes, when you right click the recipe, it'll show all the available recipes in this group.
Here is a visual representation showing the groups by setting in group "custom_swords":

Let's bring it all together:

Setting some recipes:

on skript load:
	register new shapeless recipe for blue concrete using blue concrete powder, blue concrete powder, blue concrete powder and blue concrete powder with id "blue_concrete"
	set {_i1} to furnace named "Faster Furnace"
	set {_i2} to furnace named "Super Fast Furnace"
	register new shapeless recipe for {_i1} using furnace, furnace, diamond and furnace with id "faster_furnace" in group "furnaces"
	register new shapeless recipe for {_i2} using furnace, furnace, diamond, diamond and furnace with id "super_fast_furnace" in group "furnaces"

In the first example I only used 4 items, so this will be craftable in the player grid as well as a crafting table.
In the second example I made sure to use more than 4 items, which makes this recipe only craftable in a crafting table. (9 items are not required)