Apparently the index starts at 0 despite the fact that lua indexes start at 1. I'm now getting an error:
Lua engine: attempting to push a plain pointer, pushing nil instead. This indicates an unimplemented part of MCS bindings
Stack trace:
Stack trace end
Looks like you can create a custom crafting recipe by filling the recipe with created items
Then after setting all of the ingredient slots you set the result:
Then you use a for loop to compare the Grid items to the recipe items:
Then you just return true if it matches and false if it doesn't.
Lua engine: attempting to push a plain pointer, pushing nil instead. This indicates an unimplemented part of MCS bindings
Stack trace:
Stack trace end
Looks like you can create a custom crafting recipe by filling the recipe with created items
Recipe:SetIngredient(0,0,E_ITEM_Iron, 1, 0)
Then after setting all of the ingredient slots you set the result:
Recipe:SetResult(88, 1, 0)
Then you use a for loop to compare the Grid items to the recipe items:
local count = 0 for x=0,2,1 do for y=0,2,1 do if Grid:GetItem(x,y):IsSameType(Recipe:GetIngredient(x,y)) then count = count + 1 end end end
Then you just return true if it matches and false if it doesn't.