mirror of
https://codeberg.org/tenplus1/mobs_animal.git
synced 2025-02-05 14:50:28 +01:00
add pick_up and on_pick_up example to cow.lua
This commit is contained in:
parent
810239fadc
commit
b8dade7498
13
cow.lua
13
cow.lua
@ -55,6 +55,19 @@ mobs:register_mob("mobs_animal:cow", {
|
|||||||
{"group:grass", "air", 0},
|
{"group:grass", "air", 0},
|
||||||
{"default:dirt_with_grass", "default:dirt", -1}
|
{"default:dirt_with_grass", "default:dirt", -1}
|
||||||
},
|
},
|
||||||
|
--[[
|
||||||
|
pick_up = {"default:grass_1", "default:dry_grass_1"},
|
||||||
|
on_pick_up = function(self, entity)
|
||||||
|
|
||||||
|
local istack = ItemStack(entity.itemstring)
|
||||||
|
|
||||||
|
print("-- took", istack:get_name())
|
||||||
|
|
||||||
|
istack:take_item(1)
|
||||||
|
|
||||||
|
return istack
|
||||||
|
end,
|
||||||
|
]]
|
||||||
-- stay_near = {{"farming:straw", "group:grass"}, 10},
|
-- stay_near = {{"farming:straw", "group:grass"}, 10},
|
||||||
fear_height = 2,
|
fear_height = 2,
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user