Fix local variable definition and access

This commit is contained in:
gabriel1379 2024-04-19 07:19:50 +02:00
parent b1364dd921
commit 7b46a699f9
1 changed files with 3 additions and 2 deletions

View File

@ -46,16 +46,17 @@ end
-- Clear recipes
for _, craft_name in ipairs(crafts_to_clear) do
local is_regular = string.sub(craft_name, 1, 7) ~= "nether:"
local shaped_recipe = {}
if is_regular then
-- Regular compression recipes use 2x2 shape.
local shaped_recipe = {
shaped_recipe = {
{craft_name, craft_name},
{craft_name, craft_name},
}
else
-- Nether's compression recipes use 3x3 shape.
local shaped_recipe = {
shaped_recipe = {
{craft_name, craft_name, craft_name},
{craft_name, craft_name, craft_name},
{craft_name, craft_name, craft_name},