Fix reference dupes for droppers and dispensers

This commit is contained in:
Elias Fleckenstein 2021-11-29 19:12:49 +01:00
parent 2127bb3ef1
commit d3015edeb9
No known key found for this signature in database
GPG Key ID: 06927A5199D6C9B2
3 changed files with 6 additions and 6 deletions

@ -82,7 +82,7 @@ local dispenserdef = {
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
local meta = minetest.get_meta(pos)
local meta2 = meta
local meta2 = meta:to_table()
meta:from_table(oldmetadata)
local inv = meta:get_inventory()
for i=1, inv:get_size("main") do
@ -92,7 +92,7 @@ local dispenserdef = {
minetest.add_item(p, stack)
end
end
meta:from_table(meta2:to_table())
meta:from_table(meta2)
end,
_mcl_blast_resistance = 3.5,
_mcl_hardness = 3.5,

@ -55,7 +55,7 @@ local dropperdef = {
sounds = mcl_sounds.node_sound_stone_defaults(),
after_dig_node = function(pos, oldnode, oldmetadata, digger)
local meta = minetest.get_meta(pos)
local meta2 = meta
local meta2 = meta:to_table()
meta:from_table(oldmetadata)
local inv = meta:get_inventory()
for i=1, inv:get_size("main") do
@ -65,7 +65,7 @@ local dropperdef = {
minetest.add_item(p, stack)
end
end
meta:from_table(meta2:to_table())
meta:from_table(meta2)
end,
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
local name = player:get_player_name()

@ -53,7 +53,7 @@ local dropperdef = {
sounds = mcl_sounds.node_sound_stone_defaults(),
after_dig_node = function(pos, oldnode, oldmetadata, digger)
local meta = minetest.get_meta(pos)
local meta2 = meta
local meta2 = meta:to_table()
meta:from_table(oldmetadata)
local inv = meta:get_inventory()
for i=1, inv:get_size("main") do
@ -63,7 +63,7 @@ local dropperdef = {
minetest.add_item(p, stack)
end
end
meta:from_table(meta2:to_table())
meta:from_table(meta2)
end,
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
local name = player:get_player_name()