init.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. warthog = warthog or {}
  2. warthog.modpath = minetest.get_modpath("warthog")
  3. -- Warthog by KrupnoPavel. Modified for Enyekala by MustTest.
  4. mobs.register_mob("warthog:warthog", {
  5. description = "Nether Swinepig",
  6. type = "animal",
  7. passive = false,
  8. -- Mob should defend itself but does not attack first.
  9. attack_players = false,
  10. attack_npcs = false,
  11. attack_type = "dogfight",
  12. group_attack = true,
  13. reach = 2,
  14. pathfinding = 1,
  15. pathfinding_chance = 20,
  16. damage = 10,
  17. hp_min = 35,
  18. hp_max = 65,
  19. armor = 50,
  20. armor_level = 2,
  21. collisionbox = {-0.4, -0.01, -0.4, 0.4, 1, 0.4},
  22. visual = "mesh",
  23. mesh = "warthog_warthog.x",
  24. textures = {
  25. {"warthog_warthog.png"},
  26. },
  27. makes_footstep_sound = true,
  28. sounds = {
  29. random = "warthog_warthog",
  30. attack = "warthog_warthog_angry",
  31. },
  32. walk_velocity = 0.5,
  33. run_velocity = 3,
  34. jump = true,
  35. view_range = 30,
  36. drops = {
  37. {name = "mobs:meat_raw_pork", chance = 1, min = 1, max = 2},
  38. {name = "mobs:leather", chance = 2, min = 1, max = 1},
  39. },
  40. water_damage = 1,
  41. lava_damage = 5,
  42. light_damage = 0,
  43. fear_height = 3,
  44. animation = {
  45. speed_normal = 15,
  46. stand_start = 25,
  47. stand_end = 55,
  48. walk_start = 70,
  49. walk_end = 100,
  50. punch_start = 70,
  51. punch_end = 100,
  52. },
  53. makes_bones_in_lava = true,
  54. })
  55. mobs.register_egg("warthog:warthog", "Warthog", "rackstone_rackstone.png", 1)