forked from VoxeLibre/VoxeLibre
Start implementing creeper ai
This commit is contained in:
parent
85e531bf10
commit
3d776138e9
|
@ -318,6 +318,8 @@ function mobs:register_mob(name, def)
|
|||
swim_in = def.swim_in or {mobs_mc.items.water_source, "mcl_core:water_flowing", mobs_mc.items.river_water_source},
|
||||
pitch_switch = "static",
|
||||
jump_only = def.jump_only,
|
||||
hostile = def.hostile,
|
||||
neutral = def.neutral,
|
||||
--end j4i stuff
|
||||
|
||||
-- MCL2 extensions
|
||||
|
|
|
@ -596,6 +596,10 @@ mobs.mob_step = function(self, dtime)
|
|||
end
|
||||
|
||||
|
||||
if self.hostile then
|
||||
print("I'm a bad boi")
|
||||
end
|
||||
|
||||
-- can mob be pushed, if so calculate direction -- do this last (overrides everything)
|
||||
if self.pushable then
|
||||
mobs.collision(self)
|
||||
|
|
|
@ -12,6 +12,9 @@ local S = minetest.get_translator("mobs_mc")
|
|||
mobs:register_mob("mobs_mc:creeper", {
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
hostile = true,
|
||||
neutral = false,
|
||||
rotate = 270,
|
||||
hp_min = 20,
|
||||
hp_max = 20,
|
||||
xp_min = 5,
|
||||
|
|
Loading…
Reference in New Issue