Skip to content


Browse files Browse the repository at this point in the history
Fix "Ignoring CONTENT_IGNORE redefinition" warning (#4393)
minetest.override_item still passes to core
  • Loading branch information
HybridDog authored and SmallJoker committed Feb 18, 2018
1 parent ae6aed1 commit 46bbace
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion builtin/game/register.lua
Expand Up @@ -116,6 +116,8 @@ function core.register_item(name, itemdef)
end = name

local is_overriding = core.registered_items[name]

-- Apply defaults and add to registered_* table
if itemdef.type == "node" then
-- Use the nodebox as selection box if it's not set manually
Expand Down Expand Up @@ -177,7 +179,13 @@ function core.register_item(name, itemdef)
--core.log("Registering item: " ..
core.registered_items[] = itemdef
core.registered_aliases[] = nil

-- Used to allow builtin to register ignore to registered_items
if name ~= "ignore" then
elseif is_overriding then
core.log("warning", "Attempted redefinition of \"ignore\"")

function core.unregister_item(name)
Expand Down

0 comments on commit 46bbace

Please sign in to comment.