2017-07-07 16:52:28 +02:00
|
|
|
-- Glass nodes
|
2021-05-29 16:12:33 +02:00
|
|
|
local S = minetest.get_translator(minetest.get_current_modname())
|
2019-03-24 10:31:58 +01:00
|
|
|
local mod_doc = minetest.get_modpath("doc")
|
2017-07-07 16:52:28 +02:00
|
|
|
|
2017-07-07 16:37:05 +02:00
|
|
|
------------------------
|
2021-05-23 00:09:07 +02:00
|
|
|
-- Create Color Glass --
|
2017-07-07 16:37:05 +02:00
|
|
|
------------------------
|
|
|
|
|
2024-06-08 02:30:49 +02:00
|
|
|
function mcl_core.add_stained_glass(desc, recipeitem, colorgroup, color)
|
2017-07-07 16:37:05 +02:00
|
|
|
minetest.register_node("mcl_core:glass_"..color, {
|
|
|
|
description = desc,
|
2021-12-23 18:02:43 +01:00
|
|
|
drawtype = "glasslike_framed_optional",
|
2017-07-07 16:37:05 +02:00
|
|
|
is_ground_content = false,
|
2021-12-23 18:02:43 +01:00
|
|
|
tiles = {"mcl_core_glass_"..color..".png", "mcl_core_glass_"..color.."_detail.png"},
|
2017-07-07 16:37:05 +02:00
|
|
|
paramtype = "light",
|
2021-12-23 18:02:43 +01:00
|
|
|
paramtype2 = "glasslikeliquidlevel",
|
2019-01-30 04:54:30 +01:00
|
|
|
sunlight_propagates = true,
|
2021-02-18 10:39:19 +01:00
|
|
|
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true,
|
2017-07-07 16:37:05 +02:00
|
|
|
stack_max = 64,
|
|
|
|
-- TODO: Add color to groups
|
|
|
|
groups = {handy=1, glass=1, building_block=1, material_glass=1},
|
|
|
|
sounds = mcl_sounds.node_sound_glass_defaults(),
|
|
|
|
drop = "",
|
2020-04-15 13:27:29 +02:00
|
|
|
_mcl_blast_resistance = 0.3,
|
2017-07-07 16:37:05 +02:00
|
|
|
_mcl_hardness = 0.3,
|
2020-11-02 19:09:23 +01:00
|
|
|
_mcl_silk_touch_drop = true,
|
2017-07-07 16:37:05 +02:00
|
|
|
})
|
2021-05-23 00:09:07 +02:00
|
|
|
|
2017-07-07 16:37:05 +02:00
|
|
|
minetest.register_craft({
|
2021-05-29 16:12:33 +02:00
|
|
|
output = "mcl_core:glass_"..color.." 8",
|
2017-07-07 16:37:05 +02:00
|
|
|
recipe = {
|
2021-05-29 16:12:33 +02:00
|
|
|
{"mcl_core:glass","mcl_core:glass","mcl_core:glass"},
|
|
|
|
{"mcl_core:glass",recipeitem,"mcl_core:glass"},
|
|
|
|
{"mcl_core:glass","mcl_core:glass","mcl_core:glass"},
|
2017-07-07 16:37:05 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
end
|