tree_monster.lua 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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_acacia.png"},
  19. {"mobs_tree_monster_aspen.png"},
  20. {"mobs_tree_monster_jungle.png"},
  21. {"mobs_tree_monster_pine.png"},
  22. {"mobs_tree_monster_tree.png"},
  23. },
  24. blood_texture = "default_wood.png",
  25. makes_footstep_sound = true,
  26. sounds = {
  27. random = "mobs_treemonster",
  28. },
  29. walk_velocity = 1,
  30. run_velocity = 3,
  31. jump = true,
  32. view_range = 15,
  33. drops = {
  34. {name = "default:sapling", chance = 3, min = 1, max = 2},
  35. {name = "default:junglesapling", chance = 3, min = 1, max = 2},
  36. {name = "default:apple", chance = 2, min = 1, max=3},
  37. },
  38. water_damage = 0,
  39. lava_damage = 0,
  40. light_damage = 2,
  41. fall_damage = 0,
  42. animation = {
  43. speed_normal = 15,
  44. speed_run = 15,
  45. stand_start = 0,
  46. stand_end = 24,
  47. walk_start = 25,
  48. walk_end = 47,
  49. run_start = 48,
  50. run_end = 62,
  51. punch_start = 48,
  52. punch_end = 62,
  53. },
  54. })
  55. mobs:spawn({
  56. name = "mobs_monster:tree_monster",
  57. nodes = {"default:leaves", "default:jungleleaves", "default:acacia_leaves", "default:aspen_leaves"},
  58. max_light = 7,
  59. chance = 7000,
  60. min_height = 0,
  61. day_toggle = false,
  62. })
  63. mobs:register_egg("mobs_monster:tree_monster", S("Tree Monster"), "default_tree_top.png", 1)
  64. mobs:alias_mob("mobs:tree_monster", "mobs_monster:tree_monster") -- compatibility