ocean.lua 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. mobs:register_mob("tmw_slimes:ocean_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.medium_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["ocean"],
  19. textures = {
  20. {"tmw_slime_goo_block.png^[colorize:"..tmw_slimes.colors["ocean"],"tmw_slime_goo_block.png^[colorize:"..tmw_slimes.colors["ocean"].."^[colorize:#FFF:96"},
  21. },
  22. makes_footstep_sound = false,
  23. walk_velocity = 0.5,
  24. run_velocity = 4,
  25. jump_height = 7,
  26. view_range = 48, --This thing will chase you all the way to shore.
  27. jump = true,
  28. fly = true,
  29. fly_in = {"default:water_source", "default:water_flowing", "default:river_water_source", "default:river_water_flowing"},
  30. drops = {
  31. {name = "tmw_slimes:ocean_goo", chance = 1, min = 0, max = 2},
  32. },
  33. water_damage = 0,
  34. lava_damage = 256,
  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:ocean_goo", {on_use = minetest.item_eat(1)})
  55. mobs:spawn({
  56. name = "tmw_slimes:ocean_slime",
  57. nodes = {
  58. "default:water_source",
  59. },
  60. min_light = 0,
  61. max_light = 16,
  62. chance = tmw_slimes.common,
  63. active_object_count = tmw_slimes.common_max,
  64. min_height = -31000,
  65. max_height = 31000,
  66. })