cloud.lua 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. mobs:register_mob("tmw_slimes:cloud_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 = 3,
  10. damage = tmw_slimes.strong_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["cloud"],
  19. textures = {
  20. {"tmw_slime_goo_block.png^[colorize:"..tmw_slimes.colors["cloud"],"tmw_slime_goo_block.png^[colorize:"..tmw_slimes.colors["cloud"].."^[colorize:#FFF:96"},
  21. },
  22. makes_footstep_sound = false,
  23. walk_velocity = 0.75,
  24. run_velocity = 5,
  25. jump_height = 7,
  26. jump = true,
  27. view_range = 15,
  28. fly = true,
  29. fly_in = {"air", "default:water_source", "default:water_flowing", "default:river_water_source", "default:river_water_flowing"},
  30. drops = {
  31. {name = "tmw_slimes:cloud_goo", chance = 1, min = 0, max = 2},
  32. },
  33. water_damage = 0,
  34. lava_damage = 8,
  35. light_damage = 0,
  36. animation = {
  37. idle_start = 0,
  38. idle_end = 19,
  39. move_start = 21,
  40. move_end = 41,
  41. fall_start = 42,
  42. fall_end = 62,
  43. jump_start = 63,
  44. jump_end = 83
  45. },
  46. do_custom = function(self)
  47. --tmw_slimes.animate(self)
  48. tmw_slimes.absorb_nearby_items(self)
  49. end,
  50. on_die = function(self, pos)
  51. tmw_slimes.drop_items(self, pos)
  52. end
  53. })
  54. minetest.override_item("tmw_slimes:cloud_goo", {on_use = minetest.item_eat(0)})
  55. mobs:spawn({
  56. name = "tmw_slimes:cloud_slime",
  57. nodes = {
  58. "default:silver_sand",
  59. "default:snowblock",
  60. "default:dirt_with_snow",
  61. "default:dirt_with_grass",
  62. },
  63. min_light = 0,
  64. max_light = 16,
  65. chance = tmw_slimes.common,
  66. active_object_count = tmw_slimes.uncommon_max,
  67. min_height = 1000, --for high cloudlands
  68. max_height = 31000,
  69. })