tree_monster.lua 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. local S = mobs.intllib
  2. -- Tree Monster (or Tree Gollum) by PilzAdam
  3. mobs:register_mob("mobs_monster:tree_monster", {
  4. type = "monster",
  5. passive = false,
  6. attack_type = "dogfight",
  7. attack_animals = true,
  8. --specific_attack = {"player", "mobs_animal:chicken"},
  9. reach = 2,
  10. damage = 2,
  11. hp_min = 7,
  12. hp_max = 33,
  13. armor = 100,
  14. collisionbox = {-0.4, -1, -0.4, 0.4, 0.8, 0.4},
  15. visual = "mesh",
  16. mesh = "mobs_tree_monster.b3d",
  17. textures = {
  18. {"mobs_tree_monster.png"},
  19. {"mobs_tree_monster2.png"},
  20. },
  21. blood_texture = "default_wood.png",
  22. makes_footstep_sound = true,
  23. sounds = {
  24. random = "mobs_treemonster",
  25. },
  26. walk_velocity = 1,
  27. run_velocity = 3,
  28. jump = true,
  29. view_range = 15,
  30. drops = {
  31. {name = "default:stick", chance = 1, min = 0, max = 2},
  32. {name = "default:sapling", chance = 2, min = 0, max = 2},
  33. {name = "default:junglesapling", chance = 3, min = 0, max = 2},
  34. {name = "default:apple", chance = 4, min = 1, max = 2},
  35. },
  36. water_damage = 0,
  37. lava_damage = 0,
  38. light_damage = 2,
  39. fall_damage = 0,
  40. -- immune_to = {
  41. -- {"default:axe_diamond", 5},
  42. -- {"default:sapling", -5}, -- saplings heal
  43. -- {"all", 0},
  44. -- },
  45. animation = {
  46. speed_normal = 15,
  47. speed_run = 15,
  48. stand_start = 0,
  49. stand_end = 24,
  50. walk_start = 25,
  51. walk_end = 47,
  52. run_start = 48,
  53. run_end = 62,
  54. punch_start = 48,
  55. punch_end = 62,
  56. },
  57. })
  58. mobs:spawn({
  59. name = "mobs_monster:tree_monster",
  60. nodes = {"default:leaves", "default:jungleleaves"},
  61. max_light = 7,
  62. chance = 7000,
  63. min_height = 0,
  64. day_toggle = false,
  65. })
  66. mobs:register_egg("mobs_monster:tree_monster", S("Tree Monster"), "default_tree_top.png", 1)
  67. mobs:alias_mob("mobs:tree_monster", "mobs_monster:tree_monster") -- compatibility