blood.lua 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. --Blood Bucket and Blood Source items originally from "horror" mod by D00M3D.
  2. minetest.register_node("mobs_creatures:blood_flowing", {
  3. description = "blood_source",
  4. inventory_image = minetest.inventorycube("mobs_creatures_items_blood_source.png"),
  5. drawtype = "flowingliquid",
  6. tiles = {"mobs_creatures_items_blood_source.png"},
  7. special_tiles = {
  8. {
  9. image="mobs_creatures_items_blood_animate.png",
  10. backface_culling=false,
  11. animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=1}
  12. },
  13. {
  14. image="mobs_creatures_items_blood_animate.png",
  15. backface_culling=true,
  16. animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=1}
  17. },
  18. },
  19. alpha = 190,
  20. paramtype = "light",
  21. paramtype2 = "flowingliquid",
  22. walkable = false,
  23. pointable = false,
  24. diggable = false,
  25. buildable_to = true,
  26. is_ground_content = false,
  27. drop = "",
  28. drowning = 1,
  29. liquidtype = "flowing",
  30. liquid_alternative_flowing = "mobs_creatures:blood_flowing",
  31. liquid_alternative_source = "mobs_creatures:blood_source",
  32. liquid_viscosity = 3,
  33. liquid_renewable = false,
  34. post_effect_color = {a=70, r=200, g=70, b=70},
  35. groups = {liquid=3, not_in_creative_inventory=1, dynamic_lava_flowing_destroys=1, dynamic_lava_source_destroys=1 },
  36. })
  37. minetest.register_node("mobs_creatures:blood_source", {
  38. description = "Blood Source",
  39. inventory_image = minetest.inventorycube("mobs_creatures_items_blood_source.png"),
  40. drawtype = "liquid",
  41. tiles = {
  42. {name="mobs_creatures_items_blood_animate.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=1}}
  43. },
  44. special_tiles = {
  45. -- New-style water source material (mostly unused)
  46. {
  47. name="mobs_creatures_items_blood_animate.png",
  48. animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=1},
  49. backface_culling = false,
  50. }
  51. },
  52. alpha = 190,
  53. paramtype = "light",
  54. walkable = false,
  55. pointable = false,
  56. diggable = false,
  57. buildable_to = true,
  58. is_ground_content = false,
  59. drop = "",
  60. drowning = 1,
  61. liquidtype = "source",
  62. liquid_alternative_flowing = "mobs_creatures:blood_flowing",
  63. liquid_alternative_source = "mobs_creatures:blood_source",
  64. liquid_viscosity = 3,
  65. liquid_renewable = false,
  66. post_effect_color = {a=70, r=200, g=70, b=70},
  67. groups = {liquid=3, dynamic_lava_flowing_destroys=1, dynamic_lava_source_destroys=1}
  68. })
  69. --bucket
  70. if minetest.get_modpath("bucket") then
  71. bucket.register_liquid(
  72. "mobs_creatures:blood_source",
  73. "mobs_creatures:blood_flowing",
  74. "mobs_creatures:bucket_blood",
  75. "mobs_creatures_items_blood_bucket.png",
  76. "Blood Bucket"
  77. )
  78. end
  79. -- add dynamic liquid support
  80. if minetest.get_modpath("dynamic_liquid") then
  81. dynamic_liquid.liquid_abm("mobs_creatures:blood_source", "mobs_creatures:blood_flowing", 3)
  82. end