From 4f0620c7c1d8ea7b253b40f42dd34efd06610549 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Fri, 28 Jul 2023 17:15:41 +0200 Subject: [PATCH] Fix meshhand not updating correctly --- mods/HUD/mcl_inventory/init.lua | 1 - mods/HUD/mcl_inventory/mod.conf | 2 +- mods/PLAYER/mcl_meshhand/init.lua | 4 ++++ mods/PLAYER/mcl_meshhand/mod.conf | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mods/HUD/mcl_inventory/init.lua b/mods/HUD/mcl_inventory/init.lua index 8762213c8..cf484101c 100644 --- a/mods/HUD/mcl_inventory/init.lua +++ b/mods/HUD/mcl_inventory/init.lua @@ -129,7 +129,6 @@ function mcl_inventory.update_inventory(player) elseif player_gamemode == "survival" then player:set_inventory_formspec(mcl_inventory.build_survival_formspec(player)) end - mcl_meshhand.update_player(player) end mcl_gamemode.register_on_gamemode_change(function(player, old_gamemode, new_gamemode) diff --git a/mods/HUD/mcl_inventory/mod.conf b/mods/HUD/mcl_inventory/mod.conf index d37a3e372..66f175c3b 100644 --- a/mods/HUD/mcl_inventory/mod.conf +++ b/mods/HUD/mcl_inventory/mod.conf @@ -1,5 +1,5 @@ name = mcl_inventory author = BlockMen description = Adds the player inventory and creative inventory. -depends = mcl_init, mcl_formspec, mcl_enchanting, mcl_gamemode, mcl_meshhand +depends = mcl_init, mcl_formspec, mcl_enchanting, mcl_gamemode optional_depends = mcl_armor, mcl_brewing, mcl_potions, mcl_enchanting, mcl_craftguide, mcl_player diff --git a/mods/PLAYER/mcl_meshhand/init.lua b/mods/PLAYER/mcl_meshhand/init.lua index 6d1177b18..c42ff8081 100644 --- a/mods/PLAYER/mcl_meshhand/init.lua +++ b/mods/PLAYER/mcl_meshhand/init.lua @@ -89,6 +89,10 @@ minetest.register_on_joinplayer(function(player) player:get_inventory():set_size("hand", 1) end) +mcl_gamemode.register_on_gamemode_change(function(player) + mcl_meshhand.update_player(player) +end) + if mcl_skins_enabled then mcl_player.register_on_visual_change(mcl_meshhand.update_player) else diff --git a/mods/PLAYER/mcl_meshhand/mod.conf b/mods/PLAYER/mcl_meshhand/mod.conf index 687932514..fd10c259c 100644 --- a/mods/PLAYER/mcl_meshhand/mod.conf +++ b/mods/PLAYER/mcl_meshhand/mod.conf @@ -1,5 +1,5 @@ name = mcl_meshhand author = jordan4ibanez description = Applies the player skin texture to the hand. -depends = mcl_tools, mcl_player +depends = mcl_tools, mcl_player, mcl_gamemode optional_depends = mcl_skins, mcl_custom_skins