mineral.lua 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. 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_land.b3d",
  18. blood_texture = "tmw_slime_goo.png^[colorize:"..tmw_slimes.colors["mineral"],
  19. textures = {
  20. {"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"]},
  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. --fly_in = {"default:water_source", "default:water_flowing", "default:river_water_source", "default:river_water_flowing"},
  29. drops = {
  30. {name = "tmw_slimes:mineral_goo", chance = 1, min = 0, max = 2},
  31. },
  32. water_damage = 0,
  33. lava_damage = 8,
  34. light_damage = 0,
  35. animation = {
  36. idle_start = 0,
  37. idle_end = 20,
  38. move_start = 21,
  39. move_end = 41,
  40. fall_start = 42,
  41. fall_end = 62,
  42. jump_start = 63,
  43. jump_end = 83
  44. },
  45. do_custom = function(self)
  46. tmw_slimes.animate(self)
  47. tmw_slimes.absorb_nearby_items(self)
  48. end,
  49. on_die = function(self, pos)
  50. tmw_slimes.drop_items(self, pos)
  51. end
  52. })
  53. minetest.register_craft({
  54. type = "cooking",
  55. output = "default:steel_ingot",
  56. recipe = "tmw_slimes:mineral_goo"
  57. })
  58. mobs:spawn({
  59. name = "tmw_slimes:mineral_slime",
  60. nodes = {
  61. "default:stone"
  62. },
  63. min_light = 0,
  64. max_light = 16,
  65. chance = tmw_slimes.common,
  66. active_object_count = tmw_slimes.common_max,
  67. min_height = -31000,
  68. max_height = -24,
  69. })