penguin.lua 1.5 KB

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