Compare commits

...

5 Commits

22 changed files with 209 additions and 68 deletions

View File

@ -90,7 +90,7 @@ minetest.register_ore({
ore_type = "blob",
ore = "mineralz:lapis_lazuli_ore",
wherein = {"default:stone"},
clust_scarcity = 12 * 12 * 12,
clust_scarcity = 18 * 18 * 18,
clust_num_ores = 8,
clust_size = 4,
y_min = -256,
@ -133,4 +133,24 @@ minetest.register_ore({
octaves = 1,
persist = 0.64
},
})
})
minetest.register_ore({
ore_type = "scatter",
ore = "mineralz:salt_ore",
wherein = {"default:sandstone"},
clust_scarcity = 8 * 8 * 8,
clust_num_ores = 32,
clust_size=6,
y_min = -33000,
y_max = 5,
noise_threshold=0.0625,
noise_params = {
offset = 0,
scale = 2,
spread = {x = 32, y = 32, z = 32},
seed = -3195,
octaves = 1,
persist = 0.54
},
})

View File

@ -1,4 +1,4 @@
-- Hey it is redundantly named!
-- Yeah it is redundantly named, so what.
minetest.register_craftitem("mineralz:emerald", {
description = "Emerald",
@ -82,4 +82,35 @@ minetest.register_node("mineralz:stone_with_malachite", {
rarity = 1,
},
},
})
})
minetest.register_craftitem("mineralz:salt", {
description = "Salt",
inventory_image = "mineralz_salt.png",
})
minetest.register_node("mineralz:salt_block", {
description = "Salt block",
tiles = {"mineralz_salt_block.png"},
is_ground_content = true,
drawtype = "glasslike",
paramtype = "light",
groups = {cracky=2, level=1},
sounds = default.node_sound_glass_defaults,
})
minetest.register_node("mineralz:sandstone_with_salt", {
description = "Sandstone with Salt",
tiles = {"default_sandstone.png^mineralz_salt_ore.png"},
is_ground_content = true,
groups = {cracky=1,level=1},
sounds = default.node_sound_stone_defaults,
drops = {
max_items=2,
items = {
items = {"mineralz:salt"},
rarity = 1,
},
},
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

View File

@ -38,8 +38,9 @@ puzzleblock_flat = {
}
minetest.register_node("puzzleblocks:paper_block", {
description "Block of Paper",
description = "Block of Paper",
tiles = {"puzzleblocks_paper_block.png"},
-- paramtype2 = "color" --TODO
is_ground_content = false,
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3, flammable = 3, paper=1},
sounds = default.node_sound_leaves_defaults()
@ -47,7 +48,7 @@ minetest.register_node("puzzleblocks:paper_block", {
minetest.register_craft({
type = "shapeless",
output = "xbuild:paper_block 1",
output = "puzzleblocks:paper_block 1",
recipe = {
"default:paper", "default:paper", "default:paper",
"default:paper", "default:paper", "default:paper",
@ -60,6 +61,7 @@ minetest.register_node("puzzleblocks:puzzleblock_flat", {
tiles = {"puzzleblocks_paper_block.png"},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir", -- TODO: change to color_facedir
walkable = false,
node_box = {
type = "fixed",
@ -68,10 +70,11 @@ minetest.register_node("puzzleblocks:puzzleblock_flat", {
})
minetest.register_craft({
output = "xbuild:puzzleblock_flat 1",
type = "shaped",
output = "puzzleblocks:puzzleblock_flat",
recipe = {
"default:paper", "default:paper", "default:paper",
"", "default:paper", "",
"default:paper", "default:paper", "default:paper",
{"default:paper", "default:paper", "default:paper"},
{"", "default:paper", ""},
{"default:paper", "default:paper", "default:paper"},
},
})

View File

@ -1,3 +1,3 @@
default
moreblocks?
xdefault?
gloopblocks?

View File

@ -1,5 +1,5 @@
-- The rockz mod ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- License of everything LGP v3 --
-- License of everything GPL v3.0 or later --
-- Stones ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -38,8 +38,12 @@ local stonez = {
{"basalt", "Basalt", {cracky = 2, level = 2}},
{"whitestone", "Whitestone", {cracky = 1}},
{"bedrock", "Bedrock", {cracky = 3, level = 3, immortal = 1}},
{"pumice", "Pumice", {cracky=1, level=1}},
{"bedrock2", "Indestructable Bedrock", {unbreakable = 1, immortal = 1, level=10}},
}
-- TODO: optional insertions of other stones from other mods. TODO: darkage support
for _,stonetype in pairs(stonez) do
local stonename = stonetype[1]
local stonedesc = stonetype[2]
@ -184,6 +188,20 @@ minetest.register_node("rockz:packed_ice", {
-- node table
local rockznodes = {
"packed_ice",
}
for _,rock in pairs(stonez) do
local stone = rock[1]
-- block_form denotes what the name of the blocks to insert should be with @ being replaced with the local stone variable. eg @_cobble = andesite_cobble
local block_form = {"@_cobble", "@_block", "@_brick", "polished_@", "polished_@_block", "polished_@_brick"}
for _,form in pairs(block_form) do
--table.insert(rockznodes, #rockznodes+1, form:gsub("@",stone)) -- Why?
rockznodes[#rockznodes+1] = form:gsub("@",stone)
end
end
--[[local rockznodes = {
"andesite",
"diorite",
"granite",
@ -193,7 +211,8 @@ local rockznodes = {
"basalt",
"whitestone",
"bedrock",
"andesite_cobble",
"pumice",
"andesite_cobble",
"diorite_cobble",
"granite_cobble",
"turquoise_cobble",
@ -202,6 +221,7 @@ local rockznodes = {
"basalt_cobble",
"whitestone_cobble",
"bedrock_cobble",
"pumice_cobble",
"andesite_block",
"diorite_block",
"granite_block",
@ -249,64 +269,14 @@ local rockznodes = {
"polished_bedrock_brick",
"packed_ice",
}
]]
--[[local rockznodesmb = {
"andesite",
"diorite",
"granite",
"turquoise",
"jade",
"marble",
"basalt",
"whitestone",
"bedrock",
"andesite_block",
"diorite_block",
"granite_block",
"turquoise_block",
"jade_block",
"marble_block",
"basalt_block",
"whitestone_block",
"bedrock_block",
"polished_andesite",
"polished_diorite",
"polished_granite",
"polished_turquoise",
"polished_jade",
"polished_marble",
"polished_basalt",
"polished_whitestone",
"polished_bedrock",
"andesite_brick",
"diorite_brick",
"granite_brick",
"turqqoise_brick",
"jade_brick",
"marble_brick",
"basalt_brick",
"whitestone_brick",
"bedrock_brick",
"polished_andesite_brick",
"polished_diorite_brick",
"polished_granite_brick",
"polished_turquoise_brick",
"polished_jade_brick",
"polished_marble_brick",
"polished_basalt_brick",
"polished_whitestone_brick",
"polished_bedrock_brick",
"packed_ice",
}]]
rockznodesmb = rockznodes
local nodestowall = {
""}
-- lava cooling
dofile(mpath.."/lavacooling.lua")
-- moreblocks stuff
if minetest.get_modpath("moreblocks") then
for _, name in pairs(rockznodesmb) do
for _, name in pairs(rockznodes) do
local nodename = "rockz:"..name
local ndef = minetest.registered_nodes[nodename]
if ndef then
@ -326,4 +296,4 @@ if minetest.get_modpath("moreblocks") then
end
end
end
dofile(mpath.."/mapgen.lua")
dofile(mpath.."/mapgen.lua")

117
rockz/lavacooling.lua Normal file
View File

@ -0,0 +1,117 @@
local function search_nearby(pos,nodes)
local found = {}
for x = -1,1 do
for y = -1,1 do
for z = -1,1 do
local offset = {x=pos.x+x,y=pos.y+y,z=pos.z+z}
local what_is_here = minetest.get_node(offset)
for _,node in pairs(nodes) do
if what_is_here.name == node then
table.insert(found, #found+1, {name=what_is_here.name, param1=what_is_here.param1, param2=what_is_here.param2, pos=offset})
end
end
end
end
end
if found[1] == nil then
return nil
else
return found
end
end
if minetest.settings:get_bool("enable_lavacooling") ~= false then
if minetest.get_modpath("gloopblocks") == true then
default.cool_lava = function(pos, node)
local neighbors={
source=search_nearby(pos, {"default:water_source","default:river_water_source"}),
flowing=search_nearby(pos,{"default:water_flowing","default:river_water_flowing"}),
ice=search_nearby(pos,{"default:ice"}),
}
if node.name == "default:lava_source" then
if neighbors.source ~= nil or neighbors.flowing ~= nil then
minetest.sound_play("default_cool_lava", {pos = pos, max_hear_distance = 16, gain = 0.25})
minetest.set_node(pos, {name="default:obsidian"})
elseif neighbors.ice ~= nil then
minetest.sound_play("default_cool_lava", {pos = pos, max_hear_distance = 16, gain = 0.25})
minetest.set_node(pos, {name="default:obsidian"})
for _,node in pairs(neighbors.ice) do
minetest.set_node(node.pos, {name="rockz:pumice"}) -- use rockz pumice because it is more poppy looking
end
end
else -- Lava flowing
if neighbors.source ~= nil then
minetest.sound_play("default_cool_lava", {pos = pos, max_hear_distance = 16, gain = 0.25})
minetest.set_node(pos, {name="gloopblocks:basalt"}) -- use gloopblocks basalt because it looks a little less like it has been there for milenia than rockz basalt does
for _,node in pairs(neighbors.source) do
if math.random(1,2) == 1 then
if math.random(1,10) == 1 then
minetest.set_node(node.pos, {name="rockz:basalt"})
else
minetest.set_node(node.pos, {name="default:stone"})
end
end
end
elseif neighbors.flowing ~= nil then
minetest.sound_play("default_cool_lava", {pos = pos, max_hear_distance = 16, gain = 0.25})
minetest.set_node(pos, {name="gloopblocks:pumice"}) -- use gloopblocks pumice because it looks less like it all just happened super high pressured and quick
elseif neighbors.ice ~= nil then
minetest.sound_play("default_cool_lava", {pos = pos, max_hear_distance = 16, gain = 0.25})
minetest.set_node(pos, {name="rockz:pumice"})
for _,node in pairs(neighbors.ice) do
if math.random(1,3) == 1 then
minetest.set_node(node.pos, {name="rockz:pumice"})
end
end
end
end
end
else
default.cool_lava = function(pos, node)
local neighbors={
source=search_nearby(pos, {"default:water_source","default:river_water_source"}),
flowing=search_nearby(pos,{"default:water_flowing","default:river_water_flowing"}),
ice=search_nearby(pos,{"default:ice"}),
}
if node.name == "default:lava_source" then
if neighbors.source ~= nil or neighbors.flowing ~= nil then
minetest.sound_play("default_cool_lava", {pos = pos, max_hear_distance = 16, gain = 0.25})
minetest.set_node(pos, {name="default:obsidian"})
elseif neighbors.ice ~= nil then
minetest.sound_play("default_cool_lava", {pos = pos, max_hear_distance = 16, gain = 0.25})
minetest.set_node(pos, {name="default:obsidian"})
for _,node in pairs(neighbors.ice) do
minetest.set_node(node.pos, {name="rockz:pumice"}) -- use rockz pumice because it is more poppy looking
end
end
else -- Lava flowing
if neighbors.source ~= nil then
minetest.sound_play("default_cool_lava", {pos = pos, max_hear_distance = 16, gain = 0.25})
minetest.set_node(pos, {name="rockz:basalt"}) -- use gloopblocks basalt because it looks a little less like it has been there for milenia than rockz basalt does
for _,node in pairs(neighbors.source) do
if math.random(1,2) == 1 then
if math.random(1,10) == 1 then
minetest.set_node(node.pos, {name="rockz:basalt"})
else
minetest.set_node(node.pos, {name="default:stone"})
end
end
end
elseif neighbors.flowing ~= nil then
minetest.sound_play("default_cool_lava", {pos = pos, max_hear_distance = 16, gain = 0.25})
minetest.set_node(pos, {name="gloopblocks:pumice"}) -- personally I see no reason to have _cooled nodes
elseif neighbors.ice ~= nil then
minetest.sound_play("default_cool_lava", {pos = pos, max_hear_distance = 16, gain = 0.25})
minetest.set_node(pos, {name="rockz:pumice"})
for _,node in pairs(neighbors.ice) do
if math.random(1,3) == 1 then
minetest.set_node(node.pos, {name="rockz:pumice"})
end
end
end
end
end
end
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 981 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 978 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 972 KiB