mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-16 20:15:11 +00:00
Fix crash when trying to craft banner in 2×2 grid
This commit is contained in:
parent
2d38852f90
commit
ea7c1e6446
1 changed files with 6 additions and 3 deletions
|
@ -395,9 +395,6 @@ local banner_pattern_craft = function(itemstack, player, old_craft_grid, craft_i
|
|||
-- This complex code just iterates through the pattern slots one-by-one and compares them with the pattern
|
||||
for p=1, #pattern do
|
||||
local row = pattern[p]
|
||||
if inv_i > max_i then
|
||||
break
|
||||
end
|
||||
for r=1, #row do
|
||||
local itemname = old_craft_grid[inv_i]:get_name()
|
||||
local pitem = row[r]
|
||||
|
@ -407,6 +404,12 @@ local banner_pattern_craft = function(itemstack, player, old_craft_grid, craft_i
|
|||
else
|
||||
end
|
||||
inv_i = inv_i + 1
|
||||
if inv_i > max_i then
|
||||
break
|
||||
end
|
||||
end
|
||||
if inv_i > max_i then
|
||||
break
|
||||
end
|
||||
end
|
||||
-- Everything matched! We found our pattern!
|
||||
|
|
Loading…
Reference in a new issue