kitten.lua 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. local S = mobs.intllib
  2. -- Kitten by Jordach / BFD
  3. mobs:register_mob("mobs_animal:kitten", {
  4. type = "animal",
  5. passive = true,
  6. hp_min = 5,
  7. hp_max = 10,
  8. armor = 200,
  9. collisionbox = {-0.3, -0.3, -0.3, 0.3, 0.1, 0.3},
  10. visual = "mesh",
  11. visual_size = {x = 0.5, y = 0.5},
  12. mesh = "mobs_kitten.b3d",
  13. textures = {
  14. {"mobs_kitten_striped.png"},
  15. {"mobs_kitten_splotchy.png"},
  16. {"mobs_kitten_ginger.png"},
  17. {"mobs_kitten_sandy.png"},
  18. },
  19. makes_footstep_sound = false,
  20. sounds = {
  21. random = "mobs_kitten",
  22. },
  23. walk_velocity = 0.6,
  24. run_velocity = 2,
  25. runaway = true,
  26. jump = false,
  27. drops = {
  28. {name = "farming:string", chance = 1, min = 1, max = 1},
  29. },
  30. water_damage = 1,
  31. lava_damage = 5,
  32. fear_height = 3,
  33. animation = {
  34. speed_normal = 42,
  35. stand_start = 97,
  36. stand_end = 192,
  37. walk_start = 0,
  38. walk_end = 96,
  39. },
  40. follow = {"mobs_animal:rat", "ethereal:fish_raw", "mobs_fish:clownfish", "mobs_fish:tropical"},
  41. view_range = 8,
  42. on_rightclick = function(self, clicker)
  43. if mobs:feed_tame(self, clicker, 4, true, true) then return end
  44. if mobs:protect(self, clicker) then return end
  45. if mobs:capture_mob(self, clicker, 50, 50, 90, false, nil) then return end
  46. end
  47. })
  48. mobs:spawn({
  49. name = "mobs_animal:kitten",
  50. nodes = {"default:dirt_with_grass", "ethereal:grove_dirt"},
  51. min_light = 12,
  52. chance = 22000,
  53. min_height = 0,
  54. max_height = 31000,
  55. day_toggle = true,
  56. })
  57. mobs:register_egg("mobs_animal:kitten", S("Kitten"), "mobs_kitten_inv.png", 0)
  58. mobs:alias_mob("mobs:kitten", "mobs_animal:kitten") -- compatibility