]> git.lizzy.rs Git - Crafter.git/blobdiff - mods/main/nodes.lua
Add animation to minecart
[Crafter.git] / mods / main / nodes.lua
index f47fbdb9c5d9ddb50fb99da97a3fcce7b20de172..cdf328011651e89f5979e2d8046774f7eff39ea6 100644 (file)
@@ -8,6 +8,21 @@ minetest.register_node("main:stone", {
     drop="main:cobble",
 })
 
+local ores = {"coal","iron","gold","diamond"}
+for id,ore in pairs(ores) do
+       local drop = "main:"..ore.."ore"
+       if ore == "diamond" then drop = "main:diamond" elseif ore == "coal" then drop = "main:coal" end
+       
+       minetest.register_node("main:"..ore.."ore", {
+               description = ore:gsub("^%l", string.upper).." Ore",
+               tiles = {"stone.png^"..ore.."ore.png"},
+               groups = {stone = id, hard = id, pickaxe = 1, hand = 4},
+               sounds = main.stoneSound(),
+               --light_source = 14,--debugging ore spawn
+               drop = drop,
+       })
+end
+
 minetest.register_node("main:cobble", {
     description = "Cobblestone",
     tiles = {"cobble.png"},