Fix stuff #5
10
fox.lua
10
fox.lua
|
@ -18,6 +18,13 @@ local S = minetest.get_translator("extra_mobs")
|
||||||
--################### fox
|
--################### fox
|
||||||
--###################
|
--###################
|
||||||
|
|
||||||
|
local followitem = ""
|
||||||
|
if minetest.get_modpath("mc_sweet_berry") then
|
||||||
|
followitem = "mc_sweet_berry:sweet_berry"
|
||||||
|
else
|
||||||
|
followitem = nil
|
||||||
|
end
|
||||||
|
|
||||||
local fox = {
|
local fox = {
|
||||||
type = "monster",
|
type = "monster",
|
||||||
passive = false,
|
passive = false,
|
||||||
|
@ -108,9 +115,10 @@ local fox = {
|
||||||
do_punch = function(self)
|
do_punch = function(self)
|
||||||
self.state = "runaway"
|
self.state = "runaway"
|
||||||
end,
|
end,
|
||||||
|
follow = followitem,
|
||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
view_range = 16,
|
view_range = 16,
|
||||||
specific_attack = { "mobs_mc:cow", "mobs_mc:sheep", "mobs_mc:chicken" },
|
specific_attack = { "mobs_mc:chicken", "extra_mobs:cod", "extra_mobs:salmon" },
|
||||||
}
|
}
|
||||||
|
|
||||||
mobs:register_mob("extra_mobs:fox", fox)
|
mobs:register_mob("extra_mobs:fox", fox)
|
||||||
|
|
2
mod.conf
2
mod.conf
|
@ -1,3 +1,3 @@
|
||||||
name = extra_mobs
|
name = extra_mobs
|
||||||
depends = mcl_mobs, mobs_mc
|
depends = mcl_mobs, mobs_mc
|
||||||
optional_depends = mc
|
optional_depends = mc_warped_fungus_stick, mc_sweet_berry
|
||||||
|
|
|
@ -117,7 +117,7 @@ local strider = {
|
||||||
|
|
||||||
local controlitem = ""
|
local controlitem = ""
|
||||||
if minetest.get_modpath("mc") then
|
if minetest.get_modpath("mc") then
|
||||||
controlitem = "mc:warped_fungus_stick"
|
controlitem = "mc_warped_fungus_stick:warped_fungus_stick"
|
||||||
else
|
else
|
||||||
controlitem = mobs_mc.items.carrot_on_a_stick
|
controlitem = mobs_mc.items.carrot_on_a_stick
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue