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

Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/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

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