mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-29 05:51:05 +01:00
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:
commit
0364c8d2a6
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue