init.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. ghost_stone = ghost_stone or {}
  2. ghost_stone.modpath = minetest.get_modpath("ghost_stone")
  3. if not ghost_stone.run_once then
  4. minetest.register_node("ghost_stone:cobble", {
  5. description = "Ghost Stone",
  6. drawtype = "glasslike",
  7. paramtype = "light",
  8. -- Don't confuse with cobble while in inventory. Avoids accidental trashing.
  9. inventory_image = "ghost_stone.png",
  10. wield_image = "ghost_stone.png",
  11. tiles = {"default_cobble.png"}, -- Hard to see/looks like cobble.
  12. is_ground_content = false,
  13. groups = utility.dig_groups("cobble"),
  14. sounds = rackstone.rackstone_sounds(),
  15. walkable = false, -- Player can hide inside/walk through/fall through.
  16. post_effect_color = {a = 100, r = 255, g = 0, b = 40},
  17. drowning = 8,
  18. })
  19. minetest.register_craft({
  20. output = "ghost_stone:cobble 8",
  21. recipe = {
  22. {"default:cobble", "default:cobble", "default:cobble"},
  23. {"default:cobble", "rackstone:evilrack", "default:cobble"},
  24. {"default:cobble", "default:cobble", "default:cobble"},
  25. },
  26. })
  27. local c = "ghost_stone:core"
  28. local f = ghost_stone.modpath .. "/init.lua"
  29. reload.register_file(c, f, false)
  30. ghost_stone.run_once = true
  31. end