]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - builtin/game/item_entity.lua
Use defined evaluation order in profiler
[dragonfireclient.git] / builtin / game / item_entity.lua
index 20dd1804497f16bb6dc356773279d5a7a16397d9..9b1b23bfd14d6013297190013b8784dbfcfbf367 100644 (file)
@@ -54,8 +54,9 @@ core.register_entity(":__builtin:item", {
                local max_count = stack:get_stack_max()
                local count = math.min(stack:get_count(), max_count)
                local size = 0.2 + 0.1 * (count / max_count) ^ (1 / 3)
-               local def = core.registered_nodes[itemname]
-               local glow = def and math.floor(def.light_source / 2 + 0.5)
+               local def = core.registered_items[itemname]
+               local glow = def and def.light_source and
+                       math.floor(def.light_source / 2 + 0.5)
 
                self.object:set_properties({
                        is_visible = true,