From 843294f6072cdb335f56c5192a2fd7fb4519d1a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mikita=20Wi=C5=9Bniewski?= <rudzik8@protonmail.com>
Date: Sat, 4 Jan 2025 14:29:53 +0700
Subject: [PATCH] Fix right-clicking in survival mode

---
 mods/PLAYER/mcl_meshhand/init.lua | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mods/PLAYER/mcl_meshhand/init.lua b/mods/PLAYER/mcl_meshhand/init.lua
index 3baeacb4a..181a44fa4 100644
--- a/mods/PLAYER/mcl_meshhand/init.lua
+++ b/mods/PLAYER/mcl_meshhand/init.lua
@@ -102,6 +102,8 @@ else
 	minetest.register_on_joinplayer(mcl_meshhand.update_player)
 end
 
+local hand_def = minetest.registered_items[""]
+local _on_place = hand_def.on_place
 minetest.override_item("", {
 	-- This is needed to deal damage when punching mobs
 	-- with random items in hand in survival mode
@@ -109,6 +111,7 @@ minetest.override_item("", {
 
 	-- Creative mode Pickblock mechanics
 	on_place = function(itemstack, placer, pointed_thing)
+		_on_place(itemstack, placer, pointed_thing)
 		if minetest.is_creative_enabled(placer:get_player_name()) then
 			return vl_pickblock.pickblock(itemstack, placer, pointed_thing)
 		end