mineral.lua 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. mobs:register_mob("tmw_slimes:mineral_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. sounds = {random = "steps_in_the_mud_shorter",},
  11. damage = tmw_slimes.medium_dmg,
  12. hp_min = 20,
  13. hp_max = 40,
  14. armor = 180,
  15. collisionbox = {-0.2, -0.01, -0.2, 0.2, 0.4, 0.2},
  16. visual_size = {x = 2, y = 2},
  17. visual = "mesh",
  18. mesh = "slime_land.b3d",
  19. blood_texture = "tmw_slime_goo.png^[colorize:"..tmw_slimes.colors["mineral"],
  20. textures = {
  21. {"tmw_slime_goo_block.png^[colorize:"..tmw_slimes.colors["mineral"],"tmw_slime_goo_block.png^[colorize:"..tmw_slimes.colors["mineral"],"tmw_slime_goo_block.png^[colorize:"..tmw_slimes.colors["mineral"]},
  22. },
  23. makes_footstep_sound = false,
  24. walk_velocity = 0.5,
  25. run_velocity = 1.25,
  26. jump_height = 7,
  27. jump = true,
  28. view_range = 15,
  29. --fly_in = {"default:water_source", "default:water_flowing", "default:river_water_source", "default:river_water_flowing"},
  30. drops = {
  31. {name = "tmw_slimes:mineral_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 = 20,
  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.register_craft({
  55. type = "cooking",
  56. output = "default:steel_ingot",
  57. recipe = "tmw_slimes:mineral_goo"
  58. })
  59. mobs:spawn({
  60. name = "tmw_slimes:mineral_slime",
  61. nodes = {
  62. "default:stone"
  63. },
  64. min_light = 0,
  65. max_light = 16,
  66. chance = tmw_slimes.common,
  67. active_object_count = tmw_slimes.common_max,
  68. min_height = -31000,
  69. max_height = -24,
  70. })