mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-01-10 17:19:35 +01:00
Patch mcl_chests for pickblock
This commit is contained in:
parent
9f49959c48
commit
a883c84345
3 changed files with 7 additions and 0 deletions
|
@ -576,6 +576,8 @@ function mcl_chests.register_chest(basename, d)
|
||||||
names.left.cr = names.right.c
|
names.left.cr = names.right.c
|
||||||
names.right.cr = names.left.c
|
names.right.cr = names.left.c
|
||||||
|
|
||||||
|
local pickblock = "mcl_chests:" .. d.canonical_basename
|
||||||
|
|
||||||
local small_textures = d.tiles.small
|
local small_textures = d.tiles.small
|
||||||
local double_textures = d.tiles.double
|
local double_textures = d.tiles.double
|
||||||
|
|
||||||
|
@ -710,6 +712,7 @@ function mcl_chests.register_chest(basename, d)
|
||||||
on_metadata_inventory_take = log_inventory_take,
|
on_metadata_inventory_take = log_inventory_take,
|
||||||
_mcl_blast_resistance = d.hardness,
|
_mcl_blast_resistance = d.hardness,
|
||||||
_mcl_hardness = d.hardness,
|
_mcl_hardness = d.hardness,
|
||||||
|
_vl_pickblock = pickblock,
|
||||||
|
|
||||||
on_rightclick = function(pos, node, clicker)
|
on_rightclick = function(pos, node, clicker)
|
||||||
local topnode = minetest.get_node({ x = pos.x, y = pos.y + 1, z = pos.z })
|
local topnode = minetest.get_node({ x = pos.x, y = pos.y + 1, z = pos.z })
|
||||||
|
@ -792,6 +795,7 @@ function mcl_chests.register_chest(basename, d)
|
||||||
on_metadata_inventory_take = log_inventory_take,
|
on_metadata_inventory_take = log_inventory_take,
|
||||||
_mcl_blast_resistance = d.hardness,
|
_mcl_blast_resistance = d.hardness,
|
||||||
_mcl_hardness = d.hardness,
|
_mcl_hardness = d.hardness,
|
||||||
|
_vl_pickblock = pickblock,
|
||||||
|
|
||||||
on_rightclick = function(pos, node, clicker)
|
on_rightclick = function(pos, node, clicker)
|
||||||
local pos_other = get_double_container_neighbor_pos(pos, node.param2, "left")
|
local pos_other = get_double_container_neighbor_pos(pos, node.param2, "left")
|
||||||
|
@ -887,6 +891,7 @@ function mcl_chests.register_chest(basename, d)
|
||||||
on_metadata_inventory_take = log_inventory_take,
|
on_metadata_inventory_take = log_inventory_take,
|
||||||
_mcl_blast_resistance = d.hardness,
|
_mcl_blast_resistance = d.hardness,
|
||||||
_mcl_hardness = d.hardness,
|
_mcl_hardness = d.hardness,
|
||||||
|
_vl_pickblock = pickblock,
|
||||||
|
|
||||||
on_rightclick = function(pos, node, clicker)
|
on_rightclick = function(pos, node, clicker)
|
||||||
local pos_other = get_double_container_neighbor_pos(pos, node.param2, "right")
|
local pos_other = get_double_container_neighbor_pos(pos, node.param2, "right")
|
||||||
|
|
|
@ -97,6 +97,7 @@ minetest.register_node("mcl_chests:ender_chest_small", {
|
||||||
_mcl_blast_resistance = 600,
|
_mcl_blast_resistance = 600,
|
||||||
_mcl_hardness = 22.5,
|
_mcl_hardness = 22.5,
|
||||||
_mcl_silk_touch_drop = { "mcl_chests:ender_chest" },
|
_mcl_silk_touch_drop = { "mcl_chests:ender_chest" },
|
||||||
|
_vl_pickblock = "mcl_chests:ender_chest",
|
||||||
on_rotate = mcl_chests.simple_rotate,
|
on_rotate = mcl_chests.simple_rotate,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -297,6 +297,7 @@ for color, desc in pairs(boxtypes) do
|
||||||
on_rotate = mcl_chests.simple_rotate,
|
on_rotate = mcl_chests.simple_rotate,
|
||||||
_mcl_blast_resistance = 2,
|
_mcl_blast_resistance = 2,
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 2,
|
||||||
|
_vl_pickblock = normal_name,
|
||||||
_mcl_hoppers_on_try_push = function(pos, hop_pos, hop_inv, hop_list)
|
_mcl_hoppers_on_try_push = function(pos, hop_pos, hop_inv, hop_list)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
|
|
Loading…
Reference in a new issue