jungle.lua 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. mobs:register_mob("tmw_slimes:jungle_slime", {
  2. group_attack = true,
  3. type = "monster",
  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["jungle"],
  19. textures = {
  20. {"tmw_slime_goo_block.png^[colorize:"..tmw_slimes.colors["jungle"],"tmw_slime_goo_block.png^[colorize:"..tmw_slimes.colors["jungle"],"tmw_slime_goo_block.png^[colorize:"..tmw_slimes.colors["jungle"]},
  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:jungle_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.override_item("tmw_slimes:jungle_goo", {on_use = minetest.item_eat(3)})
  54. if minetest.registered_items["mesecons_materials:glue"] then
  55. minetest.register_craft({
  56. type = "cooking",
  57. output = "mesecons_materials:glue",
  58. recipe = "tmw_slimes:jungle_goo"
  59. })
  60. end
  61. mobs:spawn({
  62. name = "tmw_slimes:jungle_slime",
  63. nodes = {
  64. "default:dirt_with_rainforest_litter"
  65. },
  66. min_light = 0,
  67. max_light = 16,
  68. chance = tmw_slimes.pervasive,
  69. active_object_count = tmw_slimes.pervasive_max,
  70. min_height = -31000,
  71. max_height = 31000,
  72. })