init.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. if not minetest.global_exists("warthog") then warthog = {} end
  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*500,
  17. damage_group = "snappy",
  18. hp_min = 35*500,
  19. hp_max = 65*500,
  20. armor = 50,
  21. armor_level = 2,
  22. collisionbox = {-0.4, -0.01, -0.4, 0.4, 1, 0.4},
  23. visual = "mesh",
  24. mesh = "warthog_warthog.x",
  25. textures = {
  26. {"warthog_warthog.png"},
  27. },
  28. makes_footstep_sound = true,
  29. sounds = {
  30. random = "warthog_warthog",
  31. attack = "warthog_warthog_angry",
  32. },
  33. walk_velocity = 0.5,
  34. run_velocity = 3,
  35. jump = true,
  36. view_range = 30,
  37. drops = {
  38. {name = "mobs:meat_raw_pork", chance = 1, min = 1, max = 2},
  39. {name = "mobs:leather", chance = 2, min = 1, max = 1},
  40. },
  41. water_damage = 1*500,
  42. lava_damage = 5*500,
  43. light_damage = 0,
  44. fear_height = 3,
  45. animation = {
  46. speed_normal = 15,
  47. stand_start = 25,
  48. stand_end = 55,
  49. walk_start = 70,
  50. walk_end = 100,
  51. punch_start = 70,
  52. punch_end = 100,
  53. },
  54. makes_bones_in_lava = true,
  55. })
  56. mobs.register_egg("warthog:warthog", "Warthog", "rackstone_rackstone.png", 1)