Start implementing creeper ai

This commit is contained in:
jordan4ibanez 2021-04-20 14:55:22 -04:00
parent 85e531bf10
commit 3d776138e9
3 changed files with 9 additions and 0 deletions

View File

@ -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

View File

@ -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)

View File

@ -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,