From f4888a42a961fc43ef94ef2e4fb62f4e8a0d5028 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 14 Dec 2019 18:56:59 +0100 Subject: [PATCH] Add glow to falling light source nodes --- mods/ENTITIES/mcl_falling_nodes/init.lua | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/mods/ENTITIES/mcl_falling_nodes/init.lua b/mods/ENTITIES/mcl_falling_nodes/init.lua index 540745673..d5dd6c479 100644 --- a/mods/ENTITIES/mcl_falling_nodes/init.lua +++ b/mods/ENTITIES/mcl_falling_nodes/init.lua @@ -81,11 +81,8 @@ minetest.register_entity(":__builtin:falling_node", { set_node = function(self, node, meta) self.node = node self.meta = meta or {} - self.object:set_properties({ - is_visible = true, - textures = {node.name}, - }) local def = core.registered_nodes[node.name] + local glow -- Set correct entity yaw if def and node.param2 ~= 0 then if (def.paramtype2 == "facedir" or def.paramtype2 == "colorfacedir") then @@ -93,7 +90,15 @@ minetest.register_entity(":__builtin:falling_node", { elseif (def.paramtype2 == "wallmounted" or def.paramtype2 == "colorwallmounted") then self.object:set_yaw(core.dir_to_yaw(core.wallmounted_to_dir(node.param2))) end + if def.light_source then + glow = def.light_source + end end + self.object:set_properties({ + is_visible = true, + textures = {node.name}, + glow = glow, + }) end, get_staticdata = function(self)