Ores now generate correctly in technic

This commit is contained in:
James David Clarke 2023-12-21 07:59:12 +00:00
parent 35dbebb380
commit 420e63e7a6
No known key found for this signature in database
GPG Key ID: 9F5ECFD0E20F1C4C
4 changed files with 61 additions and 21 deletions

View File

@ -28,7 +28,7 @@ if minetest.get_modpath("dye") then
{rose_ingredient, dye_red .. " 4"},
{viola_ingredient, dye_violet .. " 4"},
{blackberry_ingredient, unifieddyes and "unifieddyes:magenta_s50 4" or dye_violet .. " 4"},
{blueberry_ingredient, unifieddyes and "unifieddyes:magenta_s50 4" or dye_magenta .. " 4"},
{blueberry_ingredient, unifieddyes and "unifieddyes:magenta_s50 4" or ""},
}

View File

@ -90,13 +90,11 @@ local function register_dust(name, ingot)
inventory_image = "technic_"..lname.."_dust.png",
})
if ingot then
data1 = {
minetest.register_craft({
type = "cooking",
recipe = "technic:"..lname.."_dust",
output = ingot,
}
minetest.log("action",minetest.serialize(data1))
minetest.register_craft(data1)
})
technic.register_grinder_recipe({ input = {ingot}, output = "technic:"..lname.."_dust 1" })
end
end

View File

@ -5,45 +5,65 @@ minetest.register_node( ":technic:mineral_uranium", {
description = S("Uranium Ore"),
tiles = { "default_stone.png^technic_mineral_uranium.png" },
is_ground_content = true,
groups = {cracky=3, radioactive=1},
groups = {cracky=3, radioactive=1,pickaxey=5,material_stone=1},
sounds = stone_sounds,
drop = "technic:uranium_lump",
_mcl_hardness = 5,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
_mcl_fortune_drop = mcl_core.fortune_drop_ore
})
minetest.register_node( ":technic:mineral_chromium", {
description = S("Chromium Ore"),
tiles = { "default_stone.png^technic_mineral_chromium.png" },
is_ground_content = true,
groups = {cracky=3},
groups = {cracky=3,pickaxey=3,material_stone=1},
sounds = stone_sounds,
drop = "technic:chromium_lump",
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
_mcl_fortune_drop = mcl_core.fortune_drop_ore
})
minetest.register_node( ":technic:mineral_zinc", {
description = S("Zinc Ore"),
tiles = { "default_stone.png^technic_mineral_zinc.png" },
is_ground_content = true,
groups = {cracky=3},
groups = {cracky=3,pickaxey=2,material_stone=1},
sounds = stone_sounds,
drop = "technic:zinc_lump",
_mcl_hardness = 2,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
_mcl_fortune_drop = mcl_core.fortune_drop_ore
})
minetest.register_node( ":technic:mineral_lead", {
description = S("Lead Ore"),
tiles = { "default_stone.png^technic_mineral_lead.png" },
is_ground_content = true,
groups = {cracky=3},
groups = {cracky=3,pickaxey=2,material_stone=1},
sounds = stone_sounds,
drop = "technic:lead_lump",
_mcl_hardness = 2,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
_mcl_fortune_drop = mcl_core.fortune_drop_ore
})
minetest.register_node( ":technic:mineral_sulfur", {
description = S("Sulfur Ore"),
tiles = { "default_stone.png^technic_mineral_sulfur.png" },
is_ground_content = true,
groups = {cracky=3},
groups = {cracky=3,pickaxey=1,material_stone=1},
sounds = stone_sounds,
drop = "technic:sulfur_lump",
_mcl_hardness = 1,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
_mcl_fortune_drop = mcl_core.fortune_drop_ore
})
if minetest.get_modpath("default") then

View File

@ -37,10 +37,32 @@ local lead_params = {
persist = 0.7
}
local lead_threshold = 0.3
local mcl_core_modpath = minetest.get_modpath("mcl_core")
local stone_id = mcl_core_modpath and "mcl_core:stone" or "default:stone"
local lava_source_id = mcl_core_modpath and "mcl_core:lava_source" or "default:lava_source"
local lava_flowing_id = mcl_core_modpath and "mcl_core:lava_flowing" or "default:lava_flowing"
local stone_id = minetest.get_modpath("mcl_core") and "mcl_core:stone" or "default:stone"
local lava_source_id = minetest.get_modpath("mcl_core") and "mcl_core:lava_source" or "default:lava_source"
local lava_flowing_id = minetest.get_modpath("mcl_core") and "mcl_core:lava_flowing" or "default:lava_flowing"
-- Define default values for y_min and y_max
local uranium_y_min = -300
local uranium_y_max = -80
local chromium_y_min = -200
local chromium_y_max = -100
local zinc_y_min = -32
local zinc_y_max = 2
local lead_y_min = -16
local lead_y_max = 16
-- Update values if MineClone2 is detected
if mcl_core_modpath then
uranium_y_min = -57
uranium_y_max = 100
chromium_y_min = -57
chromium_y_max = 100
zinc_y_min = -57
zinc_y_max = 100
lead_y_min = -57
lead_y_max = 100
end
-- Uranium
minetest.register_ore({
@ -50,8 +72,8 @@ minetest.register_ore({
clust_scarcity = 8*8*8,
clust_num_ores = 4,
clust_size = 3,
y_min = -300,
y_max = -80,
y_min = uranium_y_min,
y_max = uranium_y_max,
noise_params = uranium_params,
noise_threshold = uranium_threshold,
})
@ -64,8 +86,8 @@ minetest.register_ore({
clust_scarcity = 8*8*8,
clust_num_ores = 2,
clust_size = 3,
y_min = -200,
y_max = -100,
y_min = chromium_y_min,
y_max = chromium_y_max,
noise_params = chromium_params,
noise_threshold = chromium_threshold,
})
@ -78,8 +100,8 @@ minetest.register_ore({
clust_scarcity = 8*8*8,
clust_num_ores = 5,
clust_size = 7,
y_min = -32,
y_max = 2,
y_min = zinc_y_min,
y_max = zinc_y_max,
noise_params = zinc_params,
noise_threshold = zinc_threshold,
})
@ -92,8 +114,8 @@ minetest.register_ore({
clust_scarcity = 9*9*9,
clust_num_ores = 5,
clust_size = 3,
y_min = -16,
y_max = 16,
y_min = lead_y_min,
y_max = lead_y_max,
noise_params = lead_params,
noise_threshold = lead_threshold,
})