Merge pull request 'Piglins no longer aggro for enchanted gold armour' (#3713) from fix_piglin_gold_aggression into master

Reviewed-on: MineClone2/MineClone2#3713
Reviewed-by: PrairieWind <prairiewind@noreply.git.minetest.land>
This commit is contained in:
PrairieWind 2023-05-12 22:30:32 +00:00
commit 0364c8d2a6
1 changed files with 4 additions and 1 deletions

View File

@ -25,7 +25,10 @@ function mobs_mc.player_wears_gold(player)
for i=1, 6 do for i=1, 6 do
local stack = player:get_inventory():get_stack("armor", i) local stack = player:get_inventory():get_stack("armor", i)
local item = stack:get_name() local item = stack:get_name()
if item == "mcl_armor:chestplate_gold" or item == "mcl_armor:leggings_gold" or item == "mcl_armor:helmet_gold" or item == "mcl_armor:boots_gold" then if string.find(item, "mcl_armor:chestplate_gold")
or string.find(item, "mcl_armor:leggings_gold")
or string.find(item, "mcl_armor:helmet_gold")
or string.find(item, "mcl_armor:boots_gold") then
return true return true
end end
end end