algae.lua 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. mobs:register_mob("tmw_slimes:algae_slime", {
  2. group_attack = true,
  3. type = "animal",
  4. passive = false,
  5. attack_animals = false,
  6. attack_npcs = false,
  7. attack_monsters = false,
  8. attack_type = "dogfight",
  9. reach = 2,
  10. damage = tmw_slimes.weak_dmg,
  11. hp_min = 20,
  12. hp_max = 40,
  13. armor = 180,
  14. collisionbox = {-0.2, -0.01, -0.2, 0.2, 0.4, 0.2},
  15. visual_size = {x = 2, y = 2},
  16. visual = "mesh",
  17. mesh = "slime_liquid.b3d",
  18. blood_texture = "tmw_slime_goo.png^[colorize:"..tmw_slimes.colors["algae"],
  19. textures = {
  20. {"tmw_slime_goo_block.png^[colorize:"..tmw_slimes.colors["algae"],"tmw_slime_goo_block.png^[colorize:"..tmw_slimes.colors["algae"].."^[colorize:#FFF:96"},
  21. },
  22. makes_footstep_sound = false,
  23. walk_velocity = 0.5,
  24. run_velocity = 1.25,
  25. jump_height = 7,
  26. jump = true,
  27. view_range = 15,
  28. drops = {
  29. {name = "tmw_slimes:algae_goo", chance = 1, min = 0, max = 2},
  30. },
  31. water_damage = 0,
  32. lava_damage = 8,
  33. light_damage = 0,
  34. animation = {
  35. idle_start = 0,
  36. idle_end = 19,
  37. move_start = 21,
  38. move_end = 41,
  39. fall_start = 42,
  40. fall_end = 62,
  41. jump_start = 63,
  42. jump_end = 83
  43. },
  44. do_custom = function(self)
  45. --tmw_slimes.animate(self)
  46. tmw_slimes.absorb_nearby_items(self)
  47. end,
  48. on_die = function(self, pos)
  49. tmw_slimes.drop_items(self, pos)
  50. end
  51. })
  52. minetest.override_item("tmw_slimes:algae_goo", {on_use = minetest.item_eat(2)})
  53. mobs:spawn({
  54. name = "tmw_slimes:algae_slime",
  55. nodes = {
  56. "default:river_water_source","default:river_water_flowing",
  57. },
  58. min_light = 0,
  59. max_light = 16,
  60. chance = tmw_slimes.pervasive,
  61. active_object_count = tmw_slimes.pervasive_max,
  62. min_height = -31000,
  63. max_height = 31000,
  64. })