Make item entities glow if light source node

This commit is contained in:
Wuzzy 2019-12-14 18:11:52 +01:00
parent 53904cca5f
commit 81d97e4004
1 changed files with 4 additions and 0 deletions

View File

@ -70,6 +70,10 @@ minetest.register_entity(
prop.visual_size = {x=0.15, y=0.15}
prop.automatic_rotate = math.pi * 0.5
end
local ndef = minetest.registered_nodes[itemname]
if ndef then
prop.glow = ndef.light_source
end
self.object:set_properties(prop)
end,