tree_monster_apple.lua 1.4 KB

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