Created
January 11, 2022 01:30
-
-
Save corarona/18e524e5eef1a5261fb325214c757b10 to your computer and use it in GitHub Desktop.
replace_locked_chests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
minetest.register_lbm({ | |
label = "Replace locked chests with normal ones", | |
name = "replace_locked_chests:lbm", | |
nodenames = {"default:chest_locked"}, | |
run_at_every_load = true, | |
action = function(pos, node) | |
local m=minetest.get_meta(pos):to_table() | |
local p1=node.param1 | |
local p2=node.param2 | |
m.fields={} | |
minetest.set_node(pos,{name="default:chest",param1=p1,param2=p2}) | |
minetest.get_meta(pos):from_table(m) | |
end, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment