many worldgen mods and gonna try technic now

This commit is contained in:
2026-09-13 03:30:48 -06:00
parent bac6ac94a3
commit 548749cb1a
4811 changed files with 163271 additions and 1 deletions
@@ -0,0 +1,15 @@
technic.config = technic.config or Settings(minetest.get_worldpath().."/technic.conf")
local conf_table = technic.config:to_table()
local defaults = {
enable_granite_generation = "true",
enable_marble_generation = "true",
enable_rubber_tree_generation = "true",
}
for k, v in pairs(defaults) do
if conf_table[k] == nil then
technic.config:set(k, v)
end
end
@@ -0,0 +1,194 @@
local S = technic.worldgen.gettext
minetest.register_craftitem(":technic:uranium_lump", {
description = S("Uranium Lump"),
inventory_image = "technic_uranium_lump.png",
})
minetest.register_alias("technic:uranium", "technic:uranium_lump")
minetest.register_craftitem(":technic:uranium_ingot", {
description = S("Uranium Ingot"),
inventory_image = "technic_uranium_ingot.png",
groups = {uranium_ingot=1},
})
minetest.register_craftitem(":technic:chromium_lump", {
description = S("Chromium Lump"),
inventory_image = "technic_chromium_lump.png",
})
minetest.register_craftitem(":technic:chromium_ingot", {
description = S("Chromium Ingot"),
inventory_image = "technic_chromium_ingot.png",
})
minetest.register_craftitem(":technic:zinc_lump", {
description = S("Zinc Lump"),
inventory_image = "technic_zinc_lump.png",
})
minetest.register_craftitem(":technic:zinc_ingot", {
description = S("Zinc Ingot"),
inventory_image = "technic_zinc_ingot.png",
})
minetest.register_craftitem(":technic:lead_lump", {
description = S("Lead Lump"),
inventory_image = "technic_lead_lump.png",
})
minetest.register_craftitem(":technic:lead_ingot", {
description = S("Lead Ingot"),
inventory_image = "technic_lead_ingot.png",
})
minetest.register_craftitem(":technic:sulfur_lump", {
description = S("Sulfur Lump"),
inventory_image = "technic_sulfur_lump.png",
})
minetest.register_alias("technic:wrought_iron_ingot", "default:steel_ingot")
minetest.override_item("default:steel_ingot", {
description = S("Wrought Iron Ingot"),
-- make the color of the ingot a bit darker to separate it better from tin
inventory_image = "technic_wrought_iron_ingot.png^[multiply:#bbbbbbff",
})
minetest.register_craftitem(":technic:cast_iron_ingot", {
description = S("Cast Iron Ingot"),
inventory_image = "technic_cast_iron_ingot.png",
})
minetest.register_craftitem(":technic:carbon_steel_ingot", {
description = S("Carbon Steel Ingot"),
inventory_image = "technic_carbon_steel_ingot.png",
})
minetest.register_craftitem(":technic:stainless_steel_ingot", {
description = S("Stainless Steel Ingot"),
inventory_image = "technic_stainless_steel_ingot.png",
})
local function register_block(block, ingot)
minetest.register_craft({
output = block,
recipe = {
{ingot, ingot, ingot},
{ingot, ingot, ingot},
{ingot, ingot, ingot},
}
})
minetest.register_craft({
output = ingot.." 9",
recipe = {
{block}
}
})
end
register_block("technic:uranium_block", "technic:uranium_ingot")
register_block("technic:chromium_block", "technic:chromium_ingot")
register_block("technic:zinc_block", "technic:zinc_ingot")
register_block("technic:lead_block", "technic:lead_ingot")
register_block("technic:cast_iron_block", "technic:cast_iron_ingot")
register_block("technic:carbon_steel_block", "technic:carbon_steel_ingot")
register_block("technic:stainless_steel_block", "technic:stainless_steel_ingot")
register_block("technic:sulfur_block", "technic:sulfur_lump")
minetest.register_craft({
type = 'cooking',
recipe = "technic:zinc_lump",
output = "technic:zinc_ingot",
})
minetest.register_craft({
type = 'cooking',
recipe = "technic:chromium_lump",
output = "technic:chromium_ingot",
})
minetest.register_craft({
type = 'cooking',
recipe = "technic:uranium_lump",
output = "technic:uranium_ingot",
})
minetest.register_craft({
type = 'cooking',
recipe = "technic:lead_lump",
output = "technic:lead_ingot",
})
minetest.register_craft({
type = 'cooking',
recipe = minetest.registered_aliases["technic:wrought_iron_ingot"],
output = "technic:cast_iron_ingot",
})
minetest.register_craft({
type = 'cooking',
recipe = "technic:cast_iron_ingot",
cooktime = 2,
output = "technic:wrought_iron_ingot",
})
minetest.register_craft({
type = 'cooking',
recipe = "technic:carbon_steel_ingot",
cooktime = 2,
output = "technic:wrought_iron_ingot",
})
local function for_each_registered_item(action)
local already_reg = {}
for k, _ in pairs(minetest.registered_items) do
table.insert(already_reg, k)
end
local really_register_craftitem = minetest.register_craftitem
minetest.register_craftitem = function(name, def)
really_register_craftitem(name, def)
action(string.gsub(name, "^:", ""))
end
local really_register_tool = minetest.register_tool
minetest.register_tool = function(name, def)
really_register_tool(name, def)
action(string.gsub(name, "^:", ""))
end
local really_register_node = minetest.register_node
minetest.register_node = function(name, def)
really_register_node(name, def)
action(string.gsub(name, "^:", ""))
end
for _, name in ipairs(already_reg) do
action(name)
end
end
local steel_to_iron = {}
for _, i in ipairs({
"default:axe_steel",
"default:pick_steel",
"default:shovel_steel",
"default:sword_steel",
"doors:door_steel",
"farming:hoe_steel",
"glooptest:hammer_steel",
"glooptest:handsaw_steel",
"glooptest:reinforced_crystal_glass",
"mesecons_doors:op_door_steel",
"mesecons_doors:sig_door_steel",
"vessels:steel_bottle",
}) do
steel_to_iron[i] = true
end
for_each_registered_item(function(item_name)
local item_def = minetest.registered_items[item_name]
if steel_to_iron[item_name] and string.find(item_def.description, "Steel") then
minetest.override_item(item_name, { description = string.gsub(item_def.description, "Steel", S("Iron")) })
end
end)
@@ -0,0 +1,9 @@
default
basic_materials
intllib?
mg?
doors?
farming?
glooptest?
mesecons_doors?
vessels?
@@ -0,0 +1,26 @@
local modpath = minetest.get_modpath("technic_worldgen")
technic = rawget(_G, "technic") or {}
technic.worldgen = {
gettext = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end,
}
dofile(modpath.."/config.lua")
dofile(modpath.."/nodes.lua")
dofile(modpath.."/oregen.lua")
dofile(modpath.."/crafts.lua")
-- Rubber trees, moretrees also supplies these
if not minetest.get_modpath("moretrees") then
dofile(modpath.."/rubber.lua")
else
-- older versions of technic provided rubber trees regardless
minetest.register_alias("technic:rubber_sapling", "moretrees:rubber_tree_sapling")
minetest.register_alias("technic:rubber_tree_empty", "moretrees:rubber_tree_trunk_empty")
end
-- mg suppport
if minetest.get_modpath("mg") then
dofile(modpath.."/mg.lua")
end
@@ -0,0 +1,39 @@
# German Translation for technic_worldgen
# Deutsche Übersetzung von technic_worldgen
# by Xanthin
## crafts.lua
Uranium Lump = Uranklumpen
Uranium Ingot = Uranbarren
Chromium Lump = Chromklumpen
Chromium Ingot = Chrombarren
Zinc Lump = Zinkklumpen
Zinc Ingot = Zinkbarren
Brass Ingot = Messingbarren
Wrought Iron Ingot = Schmiedeeisenbarren
Cast Iron Ingot = Gusseisenbarren
Carbon Steel Ingot = Kohlenstoffstahlbarren
Stainless Steel Ingot = Edelstahlbarren
Iron = Eisen
## nodes.lua
Uranium Ore = Uranerz
Chromium Ore = Chromerz
Zinc Ore = Zinkerz
Granite = Granit
Marble = Marmor
Marble Bricks = Marmorziegel
Uranium Block = Uranblock
Chromium Block = Chromblock
Zinc Block = Zinkblock
Wrought Iron Block = Schmiedeeisenblock
Cast Iron Block = Gusseisenblock
Carbon Steel Block = Kohlenstoffstahlblock
Stainless Steel Block = Edelstahlblock
Brass Block = Messingblock
Wrought Iron = Schmiedeeisen
## rubber.lua
Rubber Tree Sapling = Gummibaumsetzling
Rubber Tree = Gummibaum
@@ -0,0 +1,36 @@
# technic_worldgen traducido por Carlos Barraza
###crafts.lua
Uranium Lump = Pepita de Uranio
Uranium Ingot = Lingote de Uranio
Chromium Lump = Pepita de Cromo
Chromium Ingot = Lingote de Cromo
Zinc Lump = Pepita de Zinc
Zinc Ingot = Lingote de Zinc
Brass Ingot = Lingote de Latón
Wrought Iron Ingot = Lingote de Hierro Forjado
Cast Iron Ingot = Lingote de Hierro Fundido
Carbon Steel Ingot = Lingote de Acero al Carbon
Stainless Steel Ingot = Lingote de Acero inoxidable
Iron = Lingote
###nodes.lua
Uranium Ore = Mineral de Uranio
Chromium Ore = Mineral de Cromo
Zinc Ore = Mineral de Zinc
Granite = Granito
Marble = Mármol
Marble Bricks = Ladrillos de Mármol
Uranium Block = Bloque de Uranio
Chromium Block = Bloque de Cromo
Zinc Block = Bloque de Zinc
Wrought Iron Block = Bloque de Hierro Forjado
Cast Iron Block = Bloque de Hierro Fundido
Carbon Steel Block = Bloque de Acero al Carbon
Stainless Steel Block = Bloque de Acero Inoxidable
Brass Block = Bloque de Latón
Wrought Iron = Hierro Forjado
###rubber.lua
Rubber Tree Sapling = Retoño de Árbol de Goma
Rubber Tree = Árbol de Goma
@@ -0,0 +1,37 @@
# template.txt
# technic_worldgen translation template
###crafts.lua
Uranium Lump = Morceau d'uranium
Uranium Ingot = Lingot d'uranium
Chromium Lump = Morceau de chrome
Chromium Ingot = Lingot de chrome
Zinc Lump = Morceau de zinc
Zinc Ingot = Lingot de zinc
Brass Ingot = Lingot de laiton
Wrought Iron Ingot = Lingot de fer forgé
Cast Iron Ingot = Lingot de fonte
Carbon Steel Ingot = Lingot d'acier au carbone
Stainless Steel Ingot = Lingot d'acier inoxydable
Iron = Fer
###nodes.lua
Uranium Ore = Minerai d'uranium
Chromium Ore = Minerai de chrome
Zinc Ore = Minerai de zinc
Granite = Granite
Marble = Marbre
Marble Bricks = Briques en marbre
Uranium Block = Bloc d'uranium
Chromium Block = Bloc de chrome
Zinc Block = Bloc de zinc
Wrought Iron Block = Bloc de fer forgé
Cast Iron Block = Bloc de fonte
Carbon Steel Block = Bloc d'acier au carbone
Stainless Steel Block = Bloc d'acier inoxydable
Brass Block = Bloc de laiton
Wrought Iron = Fer forgé
###rubber.lua
Rubber Tree Sapling = Pousse d'arbre à caoutchouc
Rubber Tree = Arbre à caoutchouc
@@ -0,0 +1,38 @@
# Polish Translation for technic_worldgen
# Polskie tłumaczenie technic_worldgen
# by mat9117
###crafts.lua
Uranium Lump = Bryłka uranu
Uranium Ingot = Sztabka uranu
Chromium Lump = Bryłka chromu
Chromium Ingot = Sztabka chromu
Zinc Lump = Bryłka cynku
Zinc Ingot = Sztabka cynku
Brass Ingot = Sztabka mosiądzu
Wrought Iron Ingot = Sztabka kutego żelaza
Cast Iron Ingot = Sztabka żelaziwa
Carbon Steel Ingot = Sztabka stali węglowej
Stainless Steel Ingot = Sztabka nierdzewnej stali
Iron = Żelazo
###nodes.lua
Uranium Ore = Ruda uranu
Chromium Ore = Ruda chromu
Zinc Ore = Ruda cynku
Granite = Granit
Marble = Marmur
Marble Bricks = Marmurowe cegły
Uranium Block = Blok uranu
Chromium Block = Blok chromu
Zinc Block = Blok cynku
Wrought Iron Block = Blok kutego żelaza
Cast Iron Block = Blok żelaziwa
Carbon Steel Block = Blok stali węglowej
Stainless Steel Block = Blok stali nierdzewnej
Brass Block = Blok mosiądzu
Wrought Iron = Kute żelazo
###rubber.lua
Rubber Tree Sapling = Sadzonka kauczukowca
Rubber Tree = Kauczukowiec
@@ -0,0 +1,38 @@
# Braziliam portuguese translation for technic_worldgen
# Tradução portuguesa brasileira para technic_worldgen
# By Sires
###crafts.lua
Uranium Lump = Pedaço de Urânio
Uranium Ingot = Lingote de Urânio
Chromium Lump = Pedaço de Crômio
Chromium Ingot = Lingote de Crômio
Zinc Lump = Pedaço de Zinco
Zinc Ingot = Lingote de Zinco
Brass Ingot = Lingote de Latão
Wrought Iron Ingot = Lingote de Ferro Forjado
Cast Iron Ingot = Lingote de Ferro Fundido
Carbon Steel Ingot = Lingote de Aço Carbono
Stainless Steel Ingot = Lingote de Ferro Inoxidável
Iron = Ferro
###nodes.lua
Uranium Ore = Minério de Urânio
Chromium Ore = Minério de Crômio
Zinc Ore = Minério de Zinco
Granite = Granito
Marble = Mármore
Marble Bricks = Tijolos de Mármore
Uranium Block = Bloco de Urânio
Chromium Block = Bloco de Crômio
Zinc Block = Bloco de Zinco
Wrought Iron Block = Bloco de Ferro Forjado
Cast Iron Block = Bloco de Ferro Fundido
Carbon Steel Block = Bloco de Aço Carbono
Stainless Steel Block = Bloco de Aço Inoxidável
Brass Block = Bloco de Latão
Wrought Iron = Ferro Forjado
###rubber.lua
Rubber Tree Sapling = Muda de Árvore de Borracha
Rubber Tree = Árvore de Borracha
@@ -0,0 +1,37 @@
# template.txt
# technic_worldgen translation template
###crafts.lua
Uranium Lump =
Uranium Ingot =
Chromium Lump =
Chromium Ingot =
Zinc Lump =
Zinc Ingot =
Brass Ingot =
Wrought Iron Ingot =
Cast Iron Ingot =
Carbon Steel Ingot =
Stainless Steel Ingot =
Iron =
###nodes.lua
Uranium Ore =
Chromium Ore =
Zinc Ore =
Granite =
Marble =
Marble Bricks =
Uranium Block =
Chromium Block =
Zinc Block =
Wrought Iron Block =
Cast Iron Block =
Carbon Steel Block =
Stainless Steel Block =
Brass Block =
Wrought Iron =
###rubber.lua
Rubber Tree Sapling =
Rubber Tree =
@@ -0,0 +1,38 @@
# Turkish translation
# mahmutelmas06@hotmail.com
# Türkçe çeviri
###crafts.lua
Uranium Lump = Uranyum yığını
Uranium Ingot = Uranyum külçesi
Chromium Lump = Krom yığını
Chromium Ingot = Krom külçesi
Zinc Lump = Çinko yığını
Zinc Ingot = Çünko külçesi
Brass Ingot = Pirinç yığını
Wrought Iron Ingot = İşlenmiş demir yığını
Cast Iron Ingot = Döküm demir yığını
Carbon Steel Ingot = Karbon çelik külçe
Stainless Steel Ingot =Paslanmaz çelik külçe
Iron = Demir
###nodes.lua
Uranium Ore = Uranyum madeni
Chromium Ore = Krom madeni
Zinc Ore = Çinko madeni
Granite = Granit
Marble = Mermer
Marble Bricks = Mermer tuğla
Uranium Block = Uranyum blok
Chromium Block = Karbon blok
Zinc Block = Çinko blok
Wrought Iron Block = İşlenmiş demir blok
Cast Iron Block = Döküm demir blok
Carbon Steel Block = Karbon çelik blok
Stainless Steel Block = Paslanmaz çelik blok
Brass Block = Pirinç blok
Wrought Iron = İşlenmiş demir
###rubber.lua
Rubber Tree Sapling = Kauçuk ağacı fidanı
Rubber Tree = Kauçuk ağacı
@@ -0,0 +1,30 @@
# Author: wzy2006 <3450354617@qq.com>
Uranium Lump =铀粒
Uranium Ingot =铀锭
Chromium Lump =铬粒
Chromium Ingot =铬锭
Zinc Lump =锌粒
Zinc Ingot =锌锭
Brass Ingot =黄铜锭
Wrought Iron Ingot =熟铁锭
Cast Iron Ingot =铸铁锭
Carbon Steel Ingot =碳钢锭
Stainless Steel Ingot =不锈钢锭
Iron =铁
Uranium Ore =铀矿石
Chromium Ore =铬矿
Zinc Ore =锌矿
Granite =花岗岩
Marble =大理石
Marble Bricks =大理石砖
Uranium Block =铀块
Chromium Block =铬块
Zinc Block =锌块
Wrought Iron Block =熟铁块
Cast Iron Block =铸铁块
Carbon Steel Block =碳钢块
Stainless Steel Block =不锈钢块
Brass Block =黄铜块
Wrought Iron =熟铁
Rubber Tree Sapling =橡胶树苗
Rubber Tree =橡胶树
+90
View File
@@ -0,0 +1,90 @@
mg.register_ore({
name = "technic:mineral_uranium",
wherein = "default:stone",
seeddiff = 11,
maxvdistance = 10.5,
maxheight = -80,
minheight = -300,
sizen = 20,
sizedev = 10,
seglenghtn = 3,
seglenghtdev = 1,
segincln = 0.4,
segincldev = 0.6,
turnangle = 57,
numperblock = 1,
fork_chance = 0
})
mg.register_ore({
name = "technic:mineral_chromium",
wherein = "default:stone",
seeddiff = 12,
maxvdistance = 10.5,
maxheight = -100,
sizen = 50,
sizedev = 20,
seglenghtn = 8,
seglenghtdev = 3,
segincln = 0,
segincldev = 0.6,
turnangle = 57,
forkturnangle = 57,
numperblock = 2
})
mg.register_ore({
name = "technic:mineral_zinc",
wherein = "default:stone",
seeddiff = 13,
maxvdistance = 10.5,
maxheight = 2,
seglenghtn = 15,
seglenghtdev = 6,
segincln = 0,
segincldev = 0.6,
turnangle = 57,
forkturnangle = 57,
numperblock = 2
})
mg.register_ore({
name = "technic:mineral_lead",
wherein = "default:stone",
seeddiff = 14,
maxvdistance = 10.5,
maxheight = 16,
seglenghtn = 15,
seglenghtdev = 6,
segincln = 0,
segincldev = 0.6,
turnangle = 57,
forkturnangle = 57,
numperblock = 3
})
if technic.config:get_bool("enable_granite_generation") then
mg.register_ore_sheet({
name = "technic:granite",
wherein = "default:stone",
height_min = -31000,
height_max = -150,
tmin = 3,
tmax = 6,
threshhold = 0.4,
noise_params = {offset=0, scale=15, spread={x=130, y=130, z=130}, seed=24, octaves=3, persist=0.70}
})
end
if technic.config:get_bool("enable_marble_generation") then
mg.register_ore_sheet({
name = "technic:marble",
wherein = "default:stone",
height_min = -31000,
height_max = -50,
tmin = 3,
tmax = 6,
threshhold = 0.4,
noise_params = {offset=0, scale=15, spread={x=130, y=130, z=130}, seed=23, octaves=3, persist=0.70}
})
end
@@ -0,0 +1,3 @@
name = technic_worldgen
depends = default, basic_materials
optional_depends = intllib, mg, doors, farming, glooptest, mesecons_doors, vessels
@@ -0,0 +1,196 @@
local S = technic.worldgen.gettext
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},
sounds = default.node_sound_stone_defaults(),
drop = "technic:uranium_lump",
})
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},
sounds = default.node_sound_stone_defaults(),
drop = "technic:chromium_lump",
})
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},
sounds = default.node_sound_stone_defaults(),
drop = "technic:zinc_lump",
})
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},
sounds = default.node_sound_stone_defaults(),
drop = "technic:lead_lump",
})
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},
sounds = default.node_sound_stone_defaults(),
drop = "technic:sulfur_lump",
})
minetest.register_node( ":technic:granite", {
description = S("Granite"),
tiles = { "technic_granite.png" },
is_ground_content = true,
groups = {cracky=1},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node( ":technic:marble", {
description = S("Marble"),
tiles = { "technic_marble.png" },
is_ground_content = true,
groups = {cracky=3, marble=1},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node( ":technic:marble_bricks", {
description = S("Marble Bricks"),
tiles = { "technic_marble_bricks.png" },
is_ground_content = true,
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node(":technic:uranium_block", {
description = S("Uranium Block"),
tiles = { "technic_uranium_block.png" },
is_ground_content = true,
groups = {uranium_block=1, cracky=1, level=2, radioactive=2},
sounds = default.node_sound_stone_defaults()
})
minetest.register_node(":technic:chromium_block", {
description = S("Chromium Block"),
tiles = { "technic_chromium_block.png" },
is_ground_content = true,
groups = {cracky=1, level=2},
sounds = default.node_sound_stone_defaults()
})
minetest.register_node(":technic:zinc_block", {
description = S("Zinc Block"),
tiles = { "technic_zinc_block.png" },
is_ground_content = true,
groups = {cracky=1, level=2},
sounds = default.node_sound_stone_defaults()
})
minetest.register_node(":technic:lead_block", {
description = S("Lead Block"),
tiles = { "technic_lead_block.png" },
is_ground_content = true,
groups = {cracky=1, level=2},
sounds = default.node_sound_stone_defaults()
})
minetest.register_alias("technic:wrought_iron_block", "default:steelblock")
minetest.override_item("default:steelblock", {
description = S("Wrought Iron Block"),
tiles = { "technic_wrought_iron_block.png" },
})
minetest.register_node(":technic:cast_iron_block", {
description = S("Cast Iron Block"),
tiles = { "technic_cast_iron_block.png" },
is_ground_content = true,
groups = {cracky=1, level=2},
sounds = default.node_sound_stone_defaults()
})
minetest.register_node(":technic:carbon_steel_block", {
description = S("Carbon Steel Block"),
tiles = { "technic_carbon_steel_block.png" },
is_ground_content = true,
groups = {cracky=1, level=2},
sounds = default.node_sound_stone_defaults()
})
minetest.register_node(":technic:stainless_steel_block", {
description = S("Stainless Steel Block"),
tiles = { "technic_stainless_steel_block.png" },
is_ground_content = true,
groups = {cracky=1, level=2},
sounds = default.node_sound_stone_defaults()
})
minetest.register_node(":technic:sulfur_block", {
description = S("Sulfur Block"),
tiles = { "technic_sulfur_block.png" },
is_ground_content = true,
groups = {cracky = 3},
sounds = default.node_sound_stone_defaults()
})
minetest.register_craft({
output = 'technic:marble_bricks 4',
recipe = {
{'technic:marble','technic:marble'},
{'technic:marble','technic:marble'}
}
})
minetest.register_alias("technic:diamond_block", "default:diamondblock")
minetest.register_alias("technic:diamond", "default:diamond")
minetest.register_alias("technic:mineral_diamond", "default:stone_with_diamond")
local function for_each_registered_node(action)
local really_register_node = minetest.register_node
minetest.register_node = function(name, def)
really_register_node(name, def)
action(name:gsub("^:", ""), def)
end
for name, def in pairs(minetest.registered_nodes) do
action(name, def)
end
end
for_each_registered_node(function(node_name, node_def)
if node_name ~= "default:steelblock" and
node_name:find("steelblock", 1, true) and
node_def.description:find("Steel", 1, true) then
minetest.override_item(node_name, {
description = node_def.description:gsub("Steel", S("Wrought Iron")),
})
end
local tiles = node_def.tiles or node_def.tile_images
if tiles then
local new_tiles = {}
local do_override = false
if type(tiles) == "string" then
tiles = {tiles}
end
for i, t in ipairs(tiles) do
if type(t) == "string" and t == "default_steel_block.png" then
do_override = true
t = "technic_wrought_iron_block.png"
end
table.insert(new_tiles, t)
end
if do_override then
minetest.override_item(node_name, {
tiles = new_tiles
})
end
end
end)
@@ -0,0 +1,227 @@
local uranium_params = {
offset = 0,
scale = 1,
spread = {x = 100, y = 100, z = 100},
seed = 420,
octaves = 3,
persist = 0.7
}
local uranium_threshold = 0.55
local chromium_params = {
offset = 0,
scale = 1,
spread = {x = 100, y = 100, z = 100},
seed = 421,
octaves = 3,
persist = 0.7
}
local chromium_threshold = 0.55
local zinc_params = {
offset = 0,
scale = 1,
spread = {x = 100, y = 100, z = 100},
seed = 422,
octaves = 3,
persist = 0.7
}
local zinc_threshold = 0.5
local lead_params = {
offset = 0,
scale = 1,
spread = {x = 100, y = 100, z = 100},
seed = 423,
octaves = 3,
persist = 0.7
}
local lead_threshold = 0.3
minetest.register_ore({
ore_type = "scatter",
ore = "technic:mineral_uranium",
wherein = "default:stone",
clust_scarcity = 8*8*8,
clust_num_ores = 4,
clust_size = 3,
y_min = -300,
y_max = -80,
noise_params = uranium_params,
noise_threshold = uranium_threshold,
})
minetest.register_ore({
ore_type = "scatter",
ore = "technic:mineral_chromium",
wherein = "default:stone",
clust_scarcity = 8*8*8,
clust_num_ores = 2,
clust_size = 3,
y_min = -200,
y_max = -100,
noise_params = chromium_params,
noise_threshold = chromium_threshold,
})
minetest.register_ore({
ore_type = "scatter",
ore = "technic:mineral_chromium",
wherein = "default:stone",
clust_scarcity = 6*6*6,
clust_num_ores = 2,
clust_size = 3,
y_min = -31000,
y_max = -200,
flags = "absheight",
noise_params = chromium_params,
noise_threshold = chromium_threshold,
})
minetest.register_ore({
ore_type = "scatter",
ore = "technic:mineral_zinc",
wherein = "default:stone",
clust_scarcity = 8*8*8,
clust_num_ores = 5,
clust_size = 7,
y_min = -32,
y_max = 2,
noise_params = zinc_params,
noise_threshold = zinc_threshold,
})
minetest.register_ore({
ore_type = "scatter",
ore = "technic:mineral_zinc",
wherein = "default:stone",
clust_scarcity = 6*6*6,
clust_num_ores = 4,
clust_size = 3,
y_min = -31000,
y_max = -32,
flags = "absheight",
noise_params = zinc_params,
noise_threshold = zinc_threshold,
})
minetest.register_ore({
ore_type = "scatter",
ore = "technic:mineral_lead",
wherein = "default:stone",
clust_scarcity = 9*9*9,
clust_num_ores = 5,
clust_size = 3,
y_min = -16,
y_max = 16,
noise_params = lead_params,
noise_threshold = lead_threshold,
})
minetest.register_ore({
ore_type = "scatter",
ore = "technic:mineral_lead",
wherein = "default:stone",
clust_scarcity = 8*8*8,
clust_num_ores = 5,
clust_size = 3,
y_min = -128,
y_max = -16,
noise_params = lead_params,
noise_threshold = lead_threshold,
})
minetest.register_ore({
ore_type = "scatter",
ore = "technic:mineral_lead",
wherein = "default:stone",
clust_scarcity = 6*6*6,
clust_num_ores = 5,
clust_size = 3,
y_min = -31000,
y_max = -128,
flags = "absheight",
noise_params = lead_params,
noise_threshold = lead_threshold,
})
-- Sulfur
local sulfur_buf = {}
local sulfur_noise
minetest.register_on_generated(function(minp, maxp)
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
local a = VoxelArea:new({MinEdge=emin, MaxEdge=emax})
vm:get_data(sulfur_buf)
local pr = PseudoRandom(17 * minp.x + 42 * minp.y + 101 * minp.z)
sulfur_noise = sulfur_noise or minetest.get_perlin(9876, 3, 0.5, 100)
local c_lava = minetest.get_content_id("default:lava_source")
local c_lava_flowing = minetest.get_content_id("default:lava_flowing")
local c_stone = minetest.get_content_id("default:stone")
local c_sulfur = minetest.get_content_id("technic:mineral_sulfur")
local grid_size = 5
for x = minp.x + math.floor(grid_size / 2), maxp.x, grid_size do
for y = minp.y + math.floor(grid_size / 2), maxp.y, grid_size do
for z = minp.z + math.floor(grid_size / 2), maxp.z, grid_size do
local c = sulfur_buf[a:index(x, y, z)]
if (c == c_lava or c == c_lava_flowing)
and sulfur_noise:get3d({x = x, y = z, z = z}) >= 0.4 then
for i in a:iter(
math.max(minp.x, x - grid_size),
math.max(minp.y, y - grid_size),
math.max(minp.z, z - grid_size),
math.min(maxp.x, x + grid_size),
math.min(maxp.y, y + grid_size),
math.min(maxp.z, z + grid_size)
) do
if sulfur_buf[i] == c_stone and pr:next(1, 10) <= 7 then
sulfur_buf[i] = c_sulfur
end
end
end
end
end
end
vm:set_data(sulfur_buf)
vm:write_to_map(sulfur_buf)
end)
if technic.config:get_bool("enable_marble_generation") then
minetest.register_ore({
ore_type = "sheet",
ore = "technic:marble",
wherein = "default:stone",
clust_scarcity = 1,
clust_num_ores = 1,
clust_size = 3,
y_min = -31000,
y_max = -50,
noise_threshold = 0.4,
noise_params = {
offset = 0, scale = 15, spread = {x = 150, y = 150, z = 150},
seed = 23, octaves = 3, persist = 0.70
}
})
end
if technic.config:get_bool("enable_granite_generation") then
minetest.register_ore({
ore_type = "sheet",
ore = "technic:granite",
wherein = "default:stone",
clust_scarcity = 1,
clust_num_ores = 1,
clust_size = 4,
y_min = -31000,
y_max = -150,
noise_threshold = 0.4,
noise_params = {
offset = 0, scale = 15, spread = {x = 130, y = 130, z = 130},
seed = 24, octaves = 3, persist = 0.70
}
})
end
@@ -0,0 +1,100 @@
-- Code of rubber tree by PilzAdam
local S = technic.worldgen.gettext
minetest.register_node(":moretrees:rubber_tree_sapling", {
description = S("Rubber Tree Sapling"),
drawtype = "plantlike",
tiles = {"technic_rubber_sapling.png"},
inventory_image = "technic_rubber_sapling.png",
wield_image = "technic_rubber_sapling.png",
paramtype = "light",
walkable = false,
groups = {dig_immediate=3, flammable=2, sapling=1},
sounds = default.node_sound_defaults(),
})
minetest.register_craft({
type = "fuel",
recipe = "moretrees:rubber_tree_sapling",
burntime = 10
})
minetest.register_node(":moretrees:rubber_tree_trunk", {
description = S("Rubber Tree"),
tiles = {"default_tree_top.png", "default_tree_top.png",
"technic_rubber_tree_full.png"},
groups = {tree=1, snappy=1, choppy=2, oddly_breakable_by_hand=1,
flammable=2},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_node(":moretrees:rubber_tree_trunk_empty", {
description = S("Rubber Tree"),
tiles = {"default_tree_top.png", "default_tree_top.png",
"technic_rubber_tree_empty.png"},
groups = {tree=1, snappy=1, choppy=2, oddly_breakable_by_hand=1,
flammable=2, not_in_creative_inventory=1},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_node(":moretrees:rubber_tree_leaves", {
drawtype = "allfaces_optional",
description = S("Rubber Tree Leaves"),
tiles = {"technic_rubber_leaves.png"},
paramtype = "light",
groups = {snappy=3, leafdecay=3, flammable=2, leaves=1},
drop = {
max_items = 1,
items = {{
items = {"moretrees:rubber_tree_sapling"},
rarity = 20,
},
{
items = {"moretrees:rubber_tree_leaves"},
}
}
},
sounds = default.node_sound_leaves_defaults(),
})
technic.rubber_tree_model={
axiom = "FFFFA",
rules_a = "[&FFBFA]////[&BFFFA]////[&FBFFA]",
rules_b = "[&FFA]////[&FFA]////[&FFA]",
trunk = "moretrees:rubber_tree_trunk",
leaves = "moretrees:rubber_tree_leaves",
angle = 35,
iterations = 3,
random_level = 1,
trunk_type = "double",
thin_branches = true
}
minetest.register_abm({
nodenames = {"moretrees:rubber_tree_sapling"},
label = "Worldgen: grow rubber tree sapling",
interval = 60,
chance = 20,
action = function(pos, node)
minetest.remove_node(pos)
minetest.spawn_tree(pos, technic.rubber_tree_model)
end
})
if technic.config:get_bool("enable_rubber_tree_generation") then
minetest.register_on_generated(function(minp, maxp, blockseed)
if math.random(1, 100) > 5 then
return
end
local tmp = {
x = (maxp.x - minp.x) / 2 + minp.x,
y = (maxp.y - minp.y) / 2 + minp.y,
z = (maxp.z - minp.z) / 2 + minp.z}
local pos = minetest.find_node_near(tmp, maxp.x - minp.x,
{"default:dirt_with_grass"})
if pos ~= nil then
minetest.spawn_tree({x=pos.x, y=pos.y+1, z=pos.z}, technic.rubber_tree_model)
end
end)
end
Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 649 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 649 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 583 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B