chest size detection, protector door bedrock detection, dig doors in mcl
This commit is contained in:
parent
4eeb568234
commit
97b0da0cf9
2 changed files with 5 additions and 2 deletions
|
|
@ -16,6 +16,7 @@ local protector_crafts = minetest.settings:get_bool("protector_crafts") ~= false
|
|||
-- Registers a door
|
||||
function register_door(name, def)
|
||||
def.groups.not_in_creative_inventory = 1
|
||||
def.groups.handy = 1
|
||||
|
||||
local box = {{-0.5, -0.5, -0.5, 0.5, 0.5, -0.5+1.5/16}}
|
||||
|
||||
|
|
@ -550,6 +551,8 @@ end
|
|||
|
||||
-- Protected Chest
|
||||
|
||||
local chest_size = mcl and (9 * 3) or (8 * 4)
|
||||
|
||||
minetest.register_node("protector:chest", {
|
||||
description = S("Protected Chest"),
|
||||
tiles = {
|
||||
|
|
@ -570,7 +573,7 @@ minetest.register_node("protector:chest", {
|
|||
|
||||
meta:set_string("infotext", S("Protected Chest"))
|
||||
meta:set_string("name", S("Protected Chest"))
|
||||
inv:set_size("main", 8 * 4)
|
||||
inv:set_size("main", chest_size)
|
||||
end,
|
||||
|
||||
can_dig = function(pos,player)
|
||||
|
|
|
|||
2
tool.lua
2
tool.lua
|
|
@ -79,7 +79,7 @@ minetest.register_craftitem("protector:tool", {
|
|||
end
|
||||
|
||||
-- do not place protector out of map bounds
|
||||
if minetest.find_node_near(pos, 1, {"ignore"}) then
|
||||
if minetest.find_node_near(pos, 1, {"ignore", "mcl_core:bedrock"}) then
|
||||
return
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue