dog.lua 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. mobs:register_mob('farm_mobs:dog', {
  2. type = 'animal',
  3. passive = true,
  4. attack_type = 'dogfight',
  5. group_attack = true,
  6. reach = 2,
  7. damage = 4,
  8. hp_min = 5,
  9. hp_max = 20,
  10. armor = 200,
  11. collisionbox = {-0.4, -0.01, -0.4, 0.4, 1, 0.4},
  12. visual = 'mesh',
  13. visual_size = {x=7,y=7},
  14. mesh = 'farm_mobs_dog.b3d',
  15. textures = {
  16. {'farm_mobs_dog.png'},
  17. {'farm_mobs_dog1.png'},
  18. },
  19. makes_footstep_sound = true,
  20. sounds = {
  21. random = 'farm_mobs_dog',
  22. attack = 'farm_mobs_dog',
  23. },
  24. walk_velocity = 1,
  25. run_velocity = 2,
  26. jump = true,
  27. drops = {
  28. {name = 'mobs:meat_raw', chance = 1, min = 1, max = 3},
  29. },
  30. water_damage = 0,
  31. lava_damage = 5,
  32. light_damage = 0,
  33. animation = {
  34. speed_normal = 10,
  35. speed_run = 15,
  36. stand_start = 110,
  37. stand_end = 140,
  38. walk_start = 50,
  39. walk_end = 90,
  40. run_start = 50,
  41. run_end = 90,
  42. punch_start = 0,
  43. punch_end = 40,
  44. },
  45. follow = 'mobs:meat_raw',
  46. view_range = 7,
  47. fear_height = 2,
  48. on_rightclick = function(self, clicker)
  49. if mobs:feed_tame(self, clicker, 8, true, true) then
  50. return
  51. end
  52. mobs:capture_mob(self, clicker, 0, 5, 60, false, nil)
  53. end,
  54. })
  55. mobs:register_egg("farm_mobs:dog", "Dog", "default_grass.png", 1)