init.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. if minetest.get_modpath("mobs") and not mobs.mod and mobs.mod ~= "redo" then
  2. minetest.log("error", "[mobs_jellyfish] mobs redo API not found!")
  3. return
  4. end
  5. mobs:register_mob("mobs_jellyfish:jellyfish", {
  6. type = "animal",
  7. attack_type = "dogfight",
  8. damage = 5,
  9. reach = 1,
  10. hp_min = 5,
  11. hp_max = 10,
  12. armor = 100,
  13. collisionbox = {-0.25, -0.25, -0.25, 0.25, 0.25, 0.25},
  14. visual = "mesh",
  15. mesh = "jellyfish.b3d",
  16. textures = {
  17. {"jellyfish.png"}
  18. },
  19. makes_footstep_sound = false,
  20. walk_velocity = 0.1,
  21. run_velocity = 0.1,
  22. fly = true,
  23. fly_in = "default:water_source",
  24. fall_speed = 0,
  25. view_range = 10,
  26. water_damage = 0,
  27. lava_damage = 5,
  28. light_damage = 0,
  29. on_rightclick = function(self, clicker)
  30. mobs:capture_mob(self, clicker, 80, 100, 0, true, nil)
  31. end
  32. })
  33. mobs:spawn({
  34. name = "mobs_jellyfish:jellyfish",
  35. nodes = {"default:water_source"},
  36. neighbors = {"default:water_flowing","default:water_source"},
  37. min_light = 5,
  38. interval = 30,
  39. chance = 10000,
  40. max_height = 0,
  41. })
  42. mobs:register_egg("mobs_jellyfish:jellyfish", "Jellyfish", "jellyfish_inv.png", 0)