init.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. -- Ghost/Shade by BlockMen
  2. mobs:register_mob("mobs_shade:shade", {
  3. type = "monster",
  4. passive = false,
  5. damage = 2,
  6. attack_type = "dogfight",
  7. hp_min = 7,
  8. hp_max = 12,
  9. armor = 130,
  10. collisionbox = {-0.3, -0.5, -0.3, 0.3, 0.75, 0.3},
  11. visual = "mesh",
  12. mesh = "creatures_mob.x",
  13. textures = {
  14. {"creatures_ghost.png"},
  15. },
  16. blood_texture = "tnt_smoke.png",
  17. visual_size = {x=1, y=1},
  18. makes_footstep_sound = false,
  19. sounds = {
  20. random = "creatures_ghost",
  21. damage = "creatures_ghost_hit",
  22. death = "creatures_ghost_death"
  23. },
  24. walk_velocity = 2,
  25. run_velocity = 2,
  26. fall_speed = 0,
  27. jump = true,
  28. fly = true,
  29. fly_in = "air",
  30. water_damage = 0,
  31. lava_damage = 0,
  32. light_damage = 2,
  33. view_range = 14,
  34. animation = {
  35. speed_normal = 30, speed_run = 30,
  36. walk_start = 168, walk_end = 187,
  37. },
  38. })
  39. --mobs:register_spawn("mobs_shade:shade", {"default:dirt_with_grass","default:desert_sand"}, 5, 0, 7000, 1, 31000)
  40. mobs:register_egg("mobs_shade:shade", "Shade", "default_cloud.png", 1)
  41. minetest.register_on_dieplayer(function (player)
  42. local pos = vector.round(player:getpos())
  43. local mob = minetest.add_entity(pos, "mobs_shade:shade")
  44. end)