init.lua 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. -- Creeper by Davedevils (from his subgame MineClone)
  2. mobs:register_mob("creeper:creeper", {
  3. type = "monster",
  4. passive = false,
  5. attack_type = "explode",
  6. explosion_radius = 3,
  7. explosion_timer = 3,
  8. reach = 3,
  9. damage = 21,
  10. hp_min = 30,
  11. hp_max = 40,
  12. armor = 90,
  13. collisionbox = {-0.4, -1, -0.4, 0.4, 0.8, 0.4},
  14. visual = "mesh",
  15. mesh = "mobs_tree_monster.b3d",
  16. textures = {
  17. {"mobs_creeper.png"},
  18. },
  19. blood_texture = "mobs_creeper_inv.png",
  20. makes_footstep_sound = true,
  21. sounds = {
  22. --random = "mobs_treemonster",
  23. attack = "tnt_ignite",
  24. explode = "tnt_explode",
  25. fuse = "tnt_ignite",
  26. },
  27. walk_velocity = 1,
  28. run_velocity = 3,
  29. jump = true,
  30. view_range = 10,
  31. fear_height = 3,
  32. drops = {
  33. {name = "tnt:gunpowder", chance = 1, min = 0, max = 2},
  34. {name = "default:iron_lump", chance = 5, min = 0, max = 2},
  35. {name = "default:coal_lump", chance = 3, min = 0, max = 3},
  36. },
  37. water_damage = 2,
  38. lava_damage = 15,
  39. light_damage = 0,
  40. animation = {
  41. stand_start = 0, stand_end = 24,
  42. walk_start = 25, walk_end = 47,
  43. run_start = 48, run_end = 62,
  44. punch_start = 48, punch_end = 62,
  45. speed_normal = 15, speed_run = 15,
  46. },
  47. })
  48. local spawn_on = "default:dirt_with_grass"
  49. if minetest.get_modpath("ethereal") then
  50. spawn_on = "ethereal:mushroom_dirt"
  51. end
  52. mobs:spawn({
  53. name = "creeper:creeper",
  54. nodes = {spawn_on},
  55. min_light = 0,
  56. max_light = 7,
  57. change = 12000,
  58. min_height = 0,
  59. day_toggle = false,
  60. })
  61. mobs:register_egg("creeper:creeper", "Creeper", "mobs_creeper_inv.png", 1)