1
0
Fork 0

Merge pull request 'Fix ender chest crash + remove map hand reference' (#3387) from ender_chest into master

Reviewed-on: MineClone2/MineClone2#3387
Reviewed-by: ancientmarinerdev <ancientmariner_dev@proton.me>
This commit is contained in:
ancientmarinerdev 2023-02-01 22:09:26 +00:00
commit 855659a2a1
2 changed files with 2 additions and 3 deletions

View File

@ -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

View File

@ -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"