Skip to content

Commit

Permalink
use "minetest.registered_items" to find an item to override
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Feb 22, 2021
1 parent df7f106 commit fc1fea1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions onplace_restriction.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ for _,entry in ipairs(list) do
print("Restricting placement of " .. entry.name .. " to xp level " .. entry.xp)


local def = minetest.registered_nodes[entry.name]
if not def then
def = minetest.registered_craftitems[entry.name]
end

local def = minetest.registered_items[entry.name]
if not def then
error("node not found: " .. entry.name)
end
Expand Down

0 comments on commit fc1fea1

Please sign in to comment.