When trying to register the recipe using a nested for loop, I find that no matter the colour of wool I use, I am given White Glass. Here is the code for my tables and one for loop (the one in which I am testing the recipe loop):
Tables:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
-- HUES: FILES / NAMES
HUES = {
"Black",
"Blue",
"Brown",
"Cyan",
"Green",
"Magenta",
"Orange",
"Pink",
"Red",
"Voilet",
"Yellow",
"White"
}
-- DYES: RECIPE DYE
DYES = {
"black",
"blue",
"brown",
"cyan",
"green",
"magenta",
"orange",
"pink",
"red",
"voilet",
"yellow",
"white"
}
For Loop:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
-- For to Register Stained Glass
for h = 1, 12 do
hues = HUES[h]
for d = 1, 12 do
dyes = DYES[d]
-- Recipe Register
minetest.register_craft({
output = "genesis:stained_glass_" .. (h),
recipe = {
{"genesis:glass_molten", "genesis:glass_molten", "genesis:glass_molten"},
{"genesis:glass_molten", "dye:" .. dyes, "genesis:glass_molten"},
{"genesis:glass_molten", "genesis:glass_molten", "genesis:glass_molten"}
}
})
-- Stained Glass Node Register
minetest.register_node("genesis:stained_glass_" .. (h), {
description = hues .. " Stained Glass",
drawtype = "glasslike_framed_optional",
tiles = {hues .. "_Glass.png", hues .. "_Glass_detail.png"},
inventory_image = minetest.inventorycube(hues .. "_Glass.png"),
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
use_texture_alpha = true,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults()
})
end
end
Thanks, any help would be greatly appreciated. I have tried for over an hour, and this is where I am.