From 22f6c38c1a1a4060d30ab3088706c1ac292262d3 Mon Sep 17 00:00:00 2001 From: Guy Liner Date: Sun, 2 Jan 2022 19:27:35 -0500 Subject: [PATCH 1/2] Changed hand_range to reflect that of Minecraft Java Edition in both creative and survival --- mods/ITEMS/mcl_tools/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_tools/init.lua b/mods/ITEMS/mcl_tools/init.lua index 118020f0bb..e01687b74b 100644 --- a/mods/ITEMS/mcl_tools/init.lua +++ b/mods/ITEMS/mcl_tools/init.lua @@ -25,11 +25,11 @@ local groupcaps, hand_range, hand_groups if minetest.is_creative_enabled("") then -- Instant breaking in creative mode groupcaps = { creative_breakable = { times = {0}, uses = 0 } } - hand_range = 10 + hand_range = 5 hand_groups = { dig_speed_class = 7 } else groupcaps = {} - hand_range = 4 + hand_range = 4.5 hand_groups = { dig_speed_class = 1 } end minetest.register_tool(":", { From 47efde7f2e89674d827b6f42b6d66ffe792c865a Mon Sep 17 00:00:00 2001 From: cora Date: Sun, 16 Oct 2022 01:45:52 +0200 Subject: [PATCH 2/2] Make hand range configurable --- mods/ITEMS/mcl_tools/init.lua | 4 ++-- settingtypes.txt | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_tools/init.lua b/mods/ITEMS/mcl_tools/init.lua index e01687b74b..860ea756c5 100644 --- a/mods/ITEMS/mcl_tools/init.lua +++ b/mods/ITEMS/mcl_tools/init.lua @@ -25,11 +25,11 @@ local groupcaps, hand_range, hand_groups if minetest.is_creative_enabled("") then -- Instant breaking in creative mode groupcaps = { creative_breakable = { times = {0}, uses = 0 } } - hand_range = 5 + hand_range = tonumber(minetest.settings:get("mcl_hand_range_creative")) or 10 hand_groups = { dig_speed_class = 7 } else groupcaps = {} - hand_range = 4.5 + hand_range = tonumber(minetest.settings:get("mcl_hand_range")) or 4.5 hand_groups = { dig_speed_class = 1 } end minetest.register_tool(":", { diff --git a/settingtypes.txt b/settingtypes.txt index 97464d79ce..832025a774 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -69,6 +69,13 @@ mcl_craftguide_progressive_mode (Learn crafting recipes progressively) bool true # If disabled, the skin of all players will be character.png mcl_enable_skin_customization (Enable player skin customization) bool true +# How far the player hand can reach +# Default:4.5 +mcl_hand_range (Hand range) float 4.5 1 128 + +# How far the player hand can reach in creative mode (not gamemode-creative) +# Default:10 +mcl_hand_range_creative (Creative mode hand range) float 10 1 128 [Mobs] # If enabled, mobs will spawn naturally. This does not affect