penguin.lua 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. local S = mobs.intllib
  2. -- Penguin by D00Med
  3. mobs:register_mob("mobs_animal:penguin", {
  4. type = "animal",
  5. passive = true,
  6. reach = 1,
  7. hp_min = 5,
  8. hp_max = 10,
  9. armor = 200,
  10. collisionbox = {-0.2, -0.0, -0.2, 0.2, 0.5, 0.2},
  11. visual = "mesh",
  12. mesh = "mobs_penguin.b3d",
  13. visual_size = {x = 0.25, y = 0.25},
  14. textures = {
  15. {"mobs_penguin.png"},
  16. },
  17. sounds = {},
  18. makes_footstep_sound = true,
  19. walk_velocity = 1,
  20. run_velocity = 2,
  21. runaway = true,
  22. jump = false,
  23. stepheight = 1.1,
  24. drops = {
  25. {name = "mobs:meat_raw", chance = 1, min = 1, max = 1},
  26. },
  27. water_damage = 0,
  28. lava_damage = 4,
  29. light_damage = 0,
  30. fear_height = 2,
  31. animation = {
  32. speed_normal = 15,
  33. stand_start = 1,
  34. stand_end = 20,
  35. walk_start = 25,
  36. walk_end = 45,
  37. fly_start = 75, -- swim animation
  38. fly_end = 95,
  39. -- 50-70 is slide/water idle
  40. },
  41. fly_in = "default:water_source",
  42. floats = 0,
  43. follow = {"ethereal:fish_raw", "mobs_fish:clownfish", "mobs_fish:tropicalfishing:fish_raw"},
  44. view_range = 5,
  45. on_rightclick = function(self, clicker)
  46. -- feed or tame
  47. if mobs:feed_tame(self, clicker, 4, false, true) then return end
  48. if mobs:protect(self, clicker) then return end
  49. if mobs:capture_mob(self, clicker, 5, 50, 80, false, nil) then return end
  50. end,
  51. })
  52. mobs:spawn({
  53. name = "mobs_animal:penguin",
  54. nodes = {"default:snowblock"},
  55. min_light = 10,
  56. chance = 20000,
  57. min_height = 0,
  58. day_toggle = true,
  59. })
  60. mobs:register_egg("mobs_animal:penguin", S("Penguin"), "default_snow.png", 1)