From 29c12439c439ddafa951e01dd5836217089f417b Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 10 Mar 2019 01:11:29 +0100 Subject: [PATCH] Fix hand range not being applied if wielding item --- mods/PLAYER/mcl_meshhand/depends.txt | 1 + mods/PLAYER/mcl_meshhand/init.lua | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/mods/PLAYER/mcl_meshhand/depends.txt b/mods/PLAYER/mcl_meshhand/depends.txt index f8be59ba7..c86b5f93b 100644 --- a/mods/PLAYER/mcl_meshhand/depends.txt +++ b/mods/PLAYER/mcl_meshhand/depends.txt @@ -1 +1,2 @@ +mcl_tools mcl_skins? diff --git a/mods/PLAYER/mcl_meshhand/init.lua b/mods/PLAYER/mcl_meshhand/init.lua index 87b9e6927..0ef9e2010 100644 --- a/mods/PLAYER/mcl_meshhand/init.lua +++ b/mods/PLAYER/mcl_meshhand/init.lua @@ -1,5 +1,7 @@ local has_mcl_skins = minetest.get_modpath("mcl_skins") ~= nil +local def = minetest.registered_items[""] + -- mcl_skins is enabled if has_mcl_skins == true then --generate a node for every skin @@ -14,6 +16,7 @@ if has_mcl_skins == true then drawtype = "mesh", mesh = "mcl_meshhand.b3d", node_placement_prediction = "", + range = def.range, }) end --change the player's hand to their skin @@ -34,6 +37,7 @@ else drawtype = "mesh", mesh = "mcl_meshhand.b3d", node_placement_prediction = "", + range = def.range, }) minetest.register_on_joinplayer(function(player)