mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-26 09:59:33 +01:00
Iron golems pick and pick up one (stack of) poppy
This commit is contained in:
parent
5dafeaadc6
commit
e353ec3b16
1 changed files with 19 additions and 0 deletions
|
@ -41,7 +41,26 @@ mobs:register_mob("mobs_mc:iron_golem", {
|
|||
group_attack = true,
|
||||
attacks_monsters = true,
|
||||
attack_type = "dogfight",
|
||||
_got_poppy = false,
|
||||
pick_up = {"mcl_flowers:poppy"},
|
||||
on_pick_up = function(self,n)
|
||||
if n.itemstring:find("mcl_flowers:poppy") then
|
||||
if not self._got_poppy then
|
||||
self._got_poppy=true
|
||||
return
|
||||
end
|
||||
return true
|
||||
end
|
||||
end,
|
||||
replace_what = {"mcl_flowers:poppy"},
|
||||
replace_with = {"air"},
|
||||
on_replace = function(self, pos, oldnode, newnode)
|
||||
if not self.got_poppy and oldnode.name == "mcl_flowers:poppy" then
|
||||
self._got_poppy=true
|
||||
return
|
||||
end
|
||||
return false
|
||||
end,
|
||||
drops = {
|
||||
{name = mobs_mc.items.iron_ingot,
|
||||
chance = 1,
|
||||
|
|
Loading…
Reference in a new issue