mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-09-12 00:56:53 +02:00
Fix ender chest crash + remove map hand reference
This commit is contained in:
parent
2ad60b06ea
commit
8793ed211e
@ -1061,8 +1061,8 @@ minetest.register_allow_player_inventory_action(function(player, action, inv, in
|
||||
or action == "take" and info.listname == "enderchest"
|
||||
) then
|
||||
local def = player:get_wielded_item():get_definition()
|
||||
|
||||
if not minetest.find_node_near(player:get_pos(), def and def.range or ItemStack():get_definition().range, "mcl_chests:ender_chest_small", true) then
|
||||
local range = (def and def.range or player:get_inventory():get_stack("hand", 1):get_definition().range) + 1
|
||||
if not minetest.find_node_near(player:get_pos(), range, "mcl_chests:ender_chest_small", true) then
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
@ -238,7 +238,6 @@ filled_wield_def.wield_scale = { x = 1, y = 1, z = 1 }
|
||||
filled_wield_def.paramtype = "light"
|
||||
filled_wield_def.drawtype = "mesh"
|
||||
filled_wield_def.node_placement_prediction = ""
|
||||
filled_wield_def.range = minetest.registered_items[""].range
|
||||
filled_wield_def.on_place = mcl_util.call_on_rightclick
|
||||
filled_wield_def._mcl_wieldview_item = "mcl_maps:filled_map"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user