german_shepherd.lua 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. mobs:register_mob('farm_mobs:german_shepherd', {
  2. type = 'animal',
  3. passive = false,
  4. attack_type = 'dogfight',
  5. group_attack = true,
  6. reach = 3,
  7. damage = 10,
  8. hp_min = 50,
  9. hp_max = 150,
  10. armor = 75,
  11. collisionbox = {-0.3, -0.01, -0.3, 0.3, .7, 0.3},
  12. visual = 'mesh',
  13. visual_size = {x=4,y=4},
  14. rotate = 180,
  15. mesh = 'farm_mobs_german_shepherd.b3d',
  16. textures = {
  17. {'farm_mobs_german_shepherd.png'},
  18. },
  19. makes_footstep_sound = true,
  20. sounds = {
  21. random = 'farm_mobs_dog',
  22. attack = 'farm_mobs_dog',
  23. },
  24. walk_velocity = 2,
  25. run_velocity = 5,
  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 = 40,
  35. speed_run = 30,
  36. stand_speed = 7,
  37. stand_start = 75,
  38. stand_end = 95,
  39. stand1_start = 100,
  40. stand1_end = 130,
  41. walk_start = 135,
  42. walk_end = 195,
  43. run_start = 135,
  44. run_end = 195,
  45. punch_start = 200,
  46. punch_end = 250,
  47. sit_start = 0,
  48. sit_end = 20,
  49. },
  50. -- follow = 'mobs:meat_raw',
  51. view_range = 7,
  52. fear_height = 2,
  53. --[[ on_rightclick = function(self, clicker)
  54. self.order = 'stand'
  55. --mobs:set_velocity(self, 0)
  56. self.object:set_animation({x = 0, y = 20}, 12, 0, false)
  57. if mobs:feed_tame(self, clicker, 8, true, true) then
  58. return
  59. end
  60. mobs:capture_mob(self, clicker, 0, 5, 60, false, nil)
  61. end,
  62. --]]
  63. })
  64. mobs:spawn({
  65. name = 'farm_mobs:german_shepherd',
  66. nodes = {'default:dirt_with_coniferous_litter'},
  67. min_height = -15,
  68. max_height = 300,
  69. interval = 100,
  70. chance = 8000,
  71. active_object_count = 3,
  72. })
  73. mobs:register_egg("farm_mobs:german_shepherd", "German Shepherd", "default_grass.png", 1)