1
0
Fork 0

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>
illager_banner_description
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
local stack = player:get_inventory():get_stack("armor", i)
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
end
end