mirror of
https://codeberg.org/tenplus1/mobs_animal.git
synced 2025-07-26 12:00:21 +02:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
30
warthog.lua
30
warthog.lua
@ -1,6 +1,7 @@
|
||||
|
||||
local S = mobs.intllib_animal
|
||||
|
||||
|
||||
-- Warthog originally by KrupnoPavel, B3D model by sirrobzeroone
|
||||
|
||||
mobs:register_mob("mobs_animal:pumba", {
|
||||
@ -38,7 +39,7 @@ mobs:register_mob("mobs_animal:pumba", {
|
||||
{name = "mobs:pork_raw", chance = 1, min = 1, max = 3},
|
||||
{name = "maptools:silver_coin", chance = 10, min = 0, max = 1}
|
||||
},
|
||||
water_damage = 0,
|
||||
water_damage = 0.01,
|
||||
lava_damage = 5,
|
||||
light_damage = 0,
|
||||
fear_height = 2,
|
||||
@ -57,6 +58,7 @@ mobs:register_mob("mobs_animal:pumba", {
|
||||
die_loop = false,
|
||||
die_rotate = true
|
||||
},
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
if mobs:feed_tame(self, clicker, 8, true, true) then return end
|
||||
@ -65,6 +67,7 @@ mobs:register_mob("mobs_animal:pumba", {
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
local spawn_on = {"default:dirt_with_grass"}
|
||||
local spawn_by = {"group:grass"}
|
||||
|
||||
@ -79,19 +82,22 @@ if minetest.get_modpath("ethereal") then
|
||||
end
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "mobs_animal:pumba",
|
||||
nodes = spawn_on,
|
||||
neighbors = spawn_by,
|
||||
min_light = 14,
|
||||
interval = 60,
|
||||
chance = 8000, -- 15000
|
||||
min_height = 0,
|
||||
max_height = 200,
|
||||
day_toggle = true
|
||||
})
|
||||
|
||||
mobs:spawn({
|
||||
name = "mobs_animal:pumba",
|
||||
nodes = spawn_on,
|
||||
neighbors = spawn_by,
|
||||
min_light = 14,
|
||||
interval = 60,
|
||||
chance = 8000,
|
||||
min_height = 0,
|
||||
max_height = 200,
|
||||
day_toggle = true
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
-- spawn egg
|
||||
mobs:register_egg("mobs_animal:pumba", S("Warthog"), "mobs_pumba_inv.png")
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user