1
0
Fork 0

Fix shield behavior

dyable-leather-armor
NO411 2022-03-27 19:52:36 +02:00
parent 6afe7cfb58
commit 148be4ea39
1 changed files with 3 additions and 1 deletions

View File

@ -270,7 +270,9 @@ local function handle_blocking(player)
player_shield.blocking = 2
end
elseif shield_in_offhand then
local offhand_can_block = (wielded_item(player) == "" or not mcl_util.get_pointed_thing(player, true))
local offhand_can_block = (wielded_item(player) == "" or not mcl_util.get_pointed_thing(player, true))
and (minetest.get_item_group(wielded_item(player), "bow") ~= 1 and minetest.get_item_group(wielded_item(player), "crossbow") ~= 1)
if not offhand_can_block then
return
end