Skip to content

Commit

Permalink
Fix "Ignoring CONTENT_IGNORE redefinition" warning
Browse files Browse the repository at this point in the history
Temporarily set register_item_raw to a function doing nothing to avoid registering ignore in the core.
  • Loading branch information
HybridDog committed Dec 30, 2017
1 parent 4e652ea commit 5cd7bcc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions builtin/game/register.lua
Expand Up @@ -346,6 +346,8 @@ core.register_node(":air", {
groups = {not_in_creative_inventory=1},
})

local register_raw_backup = register_item_raw
register_item_raw = function() end -- fixes the ignore registering warning
core.register_node(":ignore", {
description = "Ignore (you hacker you!)",
inventory_image = "ignore.png",
Expand All @@ -361,6 +363,7 @@ core.register_node(":ignore", {
drop = "",
groups = {not_in_creative_inventory=1},
})
register_item_raw = register_raw_backup

-- The hand (bare definition)
core.register_item(":", {
Expand Down

0 comments on commit 5cd7bcc

Please sign in to comment.