Fix armor rendering when wearing pumpkin

Before this patch, wearing a pumpkin would make body armor render as a
corrupted item held in the player's left hand instead of on their body.
Some parts of their armor would also get rendered on the player's feet.

(cherry picked from commit 12192d1a8ddffdae1ec13ea8f6efc6fe2465c2b8)
master
epCode 2021-03-16 19:18:07 -07:00 committed by Nils Dagsson Moskopp
parent 3b92d060f4
commit 6bfb97842f
No known key found for this signature in database
GPG Key ID: A3BC671C35191080
1 changed files with 2 additions and 2 deletions

View File

@ -149,8 +149,8 @@ armor.set_player_armor = function(self, player)
if level then
local texture = def.texture or item:gsub("%:", "_")
local enchanted_addition = (mcl_enchanting.is_enchanted(item) and mcl_enchanting.overlay or "")
table.insert(textures, "("..texture..".png"..enchanted_addition..")")
preview = "(player.png^[opacity:0^"..texture.."_preview.png"..enchanted_addition..")"..(preview and "^"..preview or "")
table.insert(textures, texture..".png"..enchanted_addition)
preview = "player.png^[opacity:0^"..texture.."_preview.png"..enchanted_addition..""..(preview and "^"..preview or "")
armor_level = armor_level + level
items = items + 1
mcl_armor_points = mcl_armor_points + (def.groups["mcl_armor_points"] or 0)