mcl_nether_gold/init.lua

48 lines
1.5 KiB
Lua
Raw Normal View History

2021-07-11 16:54:19 +02:00
local modname = minetest.get_current_modname()
local S = minetest.get_translator(modname)
2021-04-25 23:10:48 +02:00
2021-03-27 14:45:19 +01:00
minetest.register_node("mcl_nether_gold:nether_gold_ore", {
2021-04-25 23:10:48 +02:00
description = S("Nether Gold Ore"),
_doc_items_longdesc = S("Nether gold ore is an ore containing gold nuggets. It is commonly found around netherrack in the Nether."),
2021-03-27 14:45:19 +01:00
stack_max = 64,
2021-07-11 16:54:19 +02:00
tiles = { "mcl_nether_netherrack.png^mcl_nether_gold_ore.png" },
2021-03-27 14:45:19 +01:00
is_ground_content = true,
2021-07-11 16:54:19 +02:00
groups = { pickaxey = 1, building_block = 1, material_stone = 1, xp = 0 },
2021-03-27 14:45:19 +01:00
drop = {
max_items = 1,
items = {
2021-07-11 16:54:19 +02:00
{ items = { "mcl_core:gold_nugget 6" }, rarity = 5 },
{ items = { "mcl_core:gold_nugget 5" }, rarity = 5 },
{ items = { "mcl_core:gold_nugget 4" }, rarity = 5 },
{ items = { "mcl_core:gold_nugget 3" }, rarity = 5 },
{ items = { "mcl_core:gold_nugget 2" } },
2021-03-27 14:45:19 +01:00
}
},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 3,
_mcl_hardness = 3,
_mcl_silk_touch_drop = true,
_mcl_fortune_drop = mcl_core.fortune_drop_ore
})
2021-03-28 16:24:21 +02:00
minetest.register_craft({
type = "cooking",
2021-07-11 16:54:19 +02:00
output = "mcl_core:gold_ingot",
recipe = "mcl_nether_gold:nether_gold_ore",
2021-03-28 16:24:21 +02:00
cooktime = 10,
})
2021-03-27 14:45:19 +01:00
if minetest.settings:get_bool("mcl_generate_ores", true) then
2021-07-11 16:54:19 +02:00
for _, g in pairs({ { 850, 4, 3 }, { 1650, 8, 4 } }) do
minetest.register_ore({
ore_type = "scatter",
ore = "mcl_nether_gold:nether_gold_ore",
wherein = { "mcl_nether:netherrack", "mcl_core:stone" },
clust_scarcity = g[1],
clust_num_ores = g[2],
clust_size = g[3],
y_min = mcl_vars.mg_nether_min,
y_max = mcl_vars.mg_nether_max,
})
end
2021-03-27 14:45:19 +01:00
end