1
0
Fork 0

Fix meshhand not updating correctly

This commit is contained in:
AFCMS 2023-07-28 17:15:41 +02:00
parent 4efb5bf8b9
commit 4f0620c7c1
Signed by untrusted user: AFCMS
GPG Key ID: 8720389A25B652E3
4 changed files with 6 additions and 3 deletions

View File

@ -129,7 +129,6 @@ function mcl_inventory.update_inventory(player)
elseif player_gamemode == "survival" then elseif player_gamemode == "survival" then
player:set_inventory_formspec(mcl_inventory.build_survival_formspec(player)) player:set_inventory_formspec(mcl_inventory.build_survival_formspec(player))
end end
mcl_meshhand.update_player(player)
end end
mcl_gamemode.register_on_gamemode_change(function(player, old_gamemode, new_gamemode) mcl_gamemode.register_on_gamemode_change(function(player, old_gamemode, new_gamemode)

View File

@ -1,5 +1,5 @@
name = mcl_inventory name = mcl_inventory
author = BlockMen author = BlockMen
description = Adds the player inventory and creative inventory. 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 optional_depends = mcl_armor, mcl_brewing, mcl_potions, mcl_enchanting, mcl_craftguide, mcl_player

View File

@ -89,6 +89,10 @@ minetest.register_on_joinplayer(function(player)
player:get_inventory():set_size("hand", 1) player:get_inventory():set_size("hand", 1)
end) end)
mcl_gamemode.register_on_gamemode_change(function(player)
mcl_meshhand.update_player(player)
end)
if mcl_skins_enabled then if mcl_skins_enabled then
mcl_player.register_on_visual_change(mcl_meshhand.update_player) mcl_player.register_on_visual_change(mcl_meshhand.update_player)
else else

View File

@ -1,5 +1,5 @@
name = mcl_meshhand name = mcl_meshhand
author = jordan4ibanez author = jordan4ibanez
description = Applies the player skin texture to the hand. 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 optional_depends = mcl_skins, mcl_custom_skins