fixes and improvments
parent
ad6d26d748
commit
73fae32e71
84
alchemy.lua
84
alchemy.lua
|
@ -1,4 +1,16 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
local function vadd(a, b)
|
||||
return {
|
||||
x = (a.x or 0) + (b.x or 0),
|
||||
|
@ -477,4 +489,76 @@ minetest.register_craftitem("potions:book_silver_snake", {
|
|||
|
||||
|
||||
|
||||
minetest.register_node("potions:cauldron", {
|
||||
description = "Cauldron",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
tiles = {"default_steel_block.png^[colorize:black:160"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-.45, .45, -.45, 0.45, .5, 0.45},
|
||||
{-.5, -.3, -.5, 0.5, .3, 0.5},
|
||||
{-.4, -.4, -.4, 0.4, .45, 0.4},
|
||||
{-.3, -.5, -.3, 0.3, -.4, 0.3},
|
||||
},
|
||||
},
|
||||
groups = {cracky=3,},
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory();
|
||||
|
||||
inv:set_size("main", 4*4)
|
||||
|
||||
local formspec =
|
||||
"size[8,9]" ..
|
||||
"list[current_name;main;2,0.3;4,4;]" ..
|
||||
"list[current_player;main;0,4.85;8,1;]" ..
|
||||
"list[current_player;main;0,6.08;8,3;8]" ..
|
||||
"listring[nodemeta:" .. spos .. ";main]" ..
|
||||
"listring[current_player;main]" ..
|
||||
default.get_hotbar_bg(0,4.85)
|
||||
|
||||
meta:set_string("formspec", formspec)
|
||||
end,
|
||||
|
||||
can_dig = function(pos, player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main")
|
||||
end,
|
||||
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
-- take water out of bucket
|
||||
end,
|
||||
|
||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
return stack:get_count()
|
||||
end,
|
||||
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
return stack:get_count()
|
||||
end,
|
||||
|
||||
})
|
||||
|
||||
minetest.register_node("potions:still", {
|
||||
description = "Still",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
tiles = {"default_copper_block.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-.45, -5, -.45, 0.45, -.45, 0.45},
|
||||
{-.1, -.45, -.1, 0.1, .4, 0.1},
|
||||
{-.1, .3, -.1, 1.1, .4, 0.1},
|
||||
{1.1, -.5, -.1, .9, .4, .1},
|
||||
},
|
||||
},
|
||||
groups = {cracky=3,},
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
|
565
geodes.lua
565
geodes.lua
|
@ -1,185 +1,6 @@
|
|||
|
||||
|
||||
|
||||
function potions.register_geode(name, opts)
|
||||
local tiles = opts.tiles or "default_diamond.png"
|
||||
if type(tiles) == "string" then
|
||||
tiles = {tiles}
|
||||
end
|
||||
|
||||
local desc = opts.desc or opts.description or (name.." Crystal")
|
||||
|
||||
local drops = opts.drops
|
||||
|
||||
potions.geodes[name] = {
|
||||
name = name,
|
||||
drops = drops,
|
||||
}
|
||||
|
||||
minetest.register_node("potions:geode_"..name.."_1", {
|
||||
description = desc,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
tiles = tiles,
|
||||
drops = drops,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-.5, -.5, -.5, 0.5, -.4, 0.5}
|
||||
},
|
||||
},
|
||||
groups = {cracky=3, geode_wall = 1 },
|
||||
on_construct = function(pos) potions.orient_geode_wall(pos) end,
|
||||
})
|
||||
|
||||
minetest.register_node("potions:geode_"..name.."_2", {
|
||||
description = desc,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
tiles = tiles,
|
||||
drops = drops .. " 2",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-.5, -.5, -.5, 0.5, -.4, 0.5},
|
||||
{-.5, -.5, -.5, -.4, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
groups = {cracky=3, geode_wall = 1 },
|
||||
})
|
||||
|
||||
minetest.register_node("potions:geode_"..name.."_22", {
|
||||
description = desc,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
tiles = tiles,
|
||||
drops = drops .. " 2",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-.5, -.5, -.5, 0.5, -.4, 0.5},
|
||||
{-.5, 0.4, -.5, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
groups = {cracky=3, geode_wall = 1 },
|
||||
})
|
||||
|
||||
minetest.register_node("potions:geode_"..name.."_3", {
|
||||
description = desc,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
tiles = tiles,
|
||||
drops = drops .. " 3",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-.5, -.5, -.5, 0.5, -.4, 0.5},
|
||||
{-.5, -.5, -.5, -.4, 0.5, 0.5},
|
||||
{-.5, -.5, -.5, 0.5, 0.5, -.4},
|
||||
},
|
||||
},
|
||||
groups = {cracky=3, geode_wall = 1 },
|
||||
})
|
||||
|
||||
minetest.register_node("potions:geode_"..name.."_32", {
|
||||
description = desc,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
tiles = tiles,
|
||||
drops = drops .. " 3",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-.5, -.5, -.5, 0.5, -.4, 0.5},
|
||||
{-.5, -.5, -.5, -.4, 0.5, 0.5},
|
||||
{ .4, -.5, -.5, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
groups = {cracky=3, geode_wall = 1 },
|
||||
})
|
||||
|
||||
minetest.register_node("potions:geode_"..name.."_4", {
|
||||
description = desc,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
tiles = tiles,
|
||||
drops = drops .. " 4",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-.5, -.5, -.5, 0.5, -.4, 0.5},
|
||||
{-.5, -.5, -.5, -.4, 0.5, 0.5},
|
||||
{-.5, -.5, -.5, 0.5, 0.5, -.4},
|
||||
{ .4, -.5, -.5, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
groups = {cracky=3, geode_wall = 1 },
|
||||
})
|
||||
|
||||
minetest.register_node("potions:geode_"..name.."_42", {
|
||||
description = desc,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
tiles = tiles,
|
||||
drops = drops .. " 4",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-.5, -.5, -.5, 0.5, -.4, 0.5},
|
||||
{-.5, -.5, -.5, -.4, 0.5, 0.5},
|
||||
{-.5, .4, -.5, 0.5, 0.5, 0.5},
|
||||
{ .4, -.5, -.5, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
groups = {cracky=3, geode_wall = 1 },
|
||||
})
|
||||
|
||||
minetest.register_node("potions:geode_"..name.."_5", {
|
||||
description = desc,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
tiles = tiles,
|
||||
drops = drops .. " 5",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-.5, -.5, -.5, 0.5, -.4, 0.5},
|
||||
{-.5, -.5, -.5, -.4, 0.5, 0.5},
|
||||
{-.5, -.5, -.5, 0.5, 0.5, -.4},
|
||||
{ .4, -.5, -.5, 0.5, 0.5, 0.5},
|
||||
{-.5, .4, -.5, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
groups = {cracky=3, geode_wall = 1 },
|
||||
})
|
||||
|
||||
minetest.register_node("potions:geode_"..name.."_6", {
|
||||
description = desc,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
tiles = tiles,
|
||||
drops = drops .. " 6",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-.5, -.5, -.5, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
groups = {cracky=3, geode_wall = 1},
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
local function probe_geode_neighbor(pos, v)
|
||||
|
@ -288,7 +109,7 @@ local orient_data = {
|
|||
|
||||
|
||||
|
||||
local function orient_geode_wall(pos)
|
||||
local function orient_geode_wall(pos, name)
|
||||
|
||||
local xp = probe_geode_neighbor(pos, {x=1, y=0, z=0})
|
||||
local xm = probe_geode_neighbor(pos, {x=-1, y=0, z=0})
|
||||
|
@ -299,16 +120,245 @@ local function orient_geode_wall(pos)
|
|||
|
||||
local s = xp..xm..yp..ym..zp..zm
|
||||
local od = orient_data[s]
|
||||
print("["..pos.x..", "..pos.y..", "..pos.z.."] s: "..s)
|
||||
-- print("["..pos.x..", "..pos.y..", "..pos.z.."] s: "..s)
|
||||
if od.n == 0 then
|
||||
minetest.set_node(pos, {name = "air"})
|
||||
else
|
||||
minetest.swap_node(pos, {name="potions:crystal_"..od.n, param2 = od.o})
|
||||
minetest.swap_node(pos, {name="potions:geode_"..name.."_"..od.n, param2 = od.o})
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function potions.register_geode(name, opts)
|
||||
local tiles = opts.tiles or "default_diamond.png"
|
||||
if type(tiles) == "string" then
|
||||
tiles = {tiles}
|
||||
end
|
||||
|
||||
local desc = opts.desc or opts.description or (name.." Crystal")
|
||||
|
||||
local drops = opts.drops
|
||||
|
||||
potions.geodes[name] = {
|
||||
name = name,
|
||||
drops = drops,
|
||||
}
|
||||
|
||||
minetest.register_node("potions:geode_"..name.."_1", {
|
||||
description = desc,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
tiles = tiles,
|
||||
drops = drops,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-.5, -.5, -.5, 0.5, -.4, 0.5}
|
||||
},
|
||||
},
|
||||
groups = {cracky=3, geode_wall = 1, },
|
||||
-- for testing orient functions
|
||||
-- on_construct = function(pos) potions.orient_geode_wall(pos) end,
|
||||
geode_name = name,
|
||||
})
|
||||
|
||||
minetest.register_node("potions:geode_"..name.."_2", {
|
||||
description = desc,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
tiles = tiles,
|
||||
drops = drops .. " 2",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-.5, -.5, -.5, 0.5, -.4, 0.5},
|
||||
{-.5, -.5, -.5, -.4, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
groups = {cracky=3, geode_wall = 1, not_in_creative_inventory = 1 },
|
||||
geode_name = name,
|
||||
})
|
||||
|
||||
minetest.register_node("potions:geode_"..name.."_22", {
|
||||
description = desc,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
tiles = tiles,
|
||||
drops = drops .. " 2",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-.5, -.5, -.5, 0.5, -.4, 0.5},
|
||||
{-.5, 0.4, -.5, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
groups = {cracky=3, geode_wall = 1, not_in_creative_inventory = 1 },
|
||||
geode_name = name,
|
||||
})
|
||||
|
||||
minetest.register_node("potions:geode_"..name.."_3", {
|
||||
description = desc,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
tiles = tiles,
|
||||
drops = drops .. " 3",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-.5, -.5, -.5, 0.5, -.4, 0.5},
|
||||
{-.5, -.5, -.5, -.4, 0.5, 0.5},
|
||||
{-.5, -.5, -.5, 0.5, 0.5, -.4},
|
||||
},
|
||||
},
|
||||
groups = {cracky=3, geode_wall = 1, not_in_creative_inventory = 1 },
|
||||
geode_name = name,
|
||||
})
|
||||
|
||||
minetest.register_node("potions:geode_"..name.."_32", {
|
||||
description = desc,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
tiles = tiles,
|
||||
drops = drops .. " 3",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-.5, -.5, -.5, 0.5, -.4, 0.5},
|
||||
{-.5, -.5, -.5, -.4, 0.5, 0.5},
|
||||
{ .4, -.5, -.5, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
groups = {cracky=3, geode_wall = 1, not_in_creative_inventory = 1 },
|
||||
geode_name = name,
|
||||
})
|
||||
|
||||
minetest.register_node("potions:geode_"..name.."_4", {
|
||||
description = desc,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
tiles = tiles,
|
||||
drops = drops .. " 4",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-.5, -.5, -.5, 0.5, -.4, 0.5},
|
||||
{-.5, -.5, -.5, -.4, 0.5, 0.5},
|
||||
{-.5, -.5, -.5, 0.5, 0.5, -.4},
|
||||
{ .4, -.5, -.5, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
groups = {cracky=3, geode_wall = 1, not_in_creative_inventory = 1 },
|
||||
geode_name = name,
|
||||
})
|
||||
|
||||
minetest.register_node("potions:geode_"..name.."_42", {
|
||||
description = desc,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
tiles = tiles,
|
||||
drops = drops .. " 4",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-.5, -.5, -.5, 0.5, -.4, 0.5},
|
||||
{-.5, -.5, -.5, -.4, 0.5, 0.5},
|
||||
{-.5, .4, -.5, 0.5, 0.5, 0.5},
|
||||
{ .4, -.5, -.5, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
groups = {cracky=3, geode_wall = 1, not_in_creative_inventory = 1 },
|
||||
geode_name = name,
|
||||
})
|
||||
|
||||
minetest.register_node("potions:geode_"..name.."_5", {
|
||||
description = desc,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
tiles = tiles,
|
||||
drops = drops .. " 5",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-.5, -.5, -.5, 0.5, -.4, 0.5},
|
||||
{-.5, -.5, -.5, -.4, 0.5, 0.5},
|
||||
{-.5, -.5, -.5, 0.5, 0.5, -.4},
|
||||
{ .4, -.5, -.5, 0.5, 0.5, 0.5},
|
||||
{-.5, .4, -.5, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
groups = {cracky=3, geode_wall = 1, not_in_creative_inventory = 1 },
|
||||
geode_name = name,
|
||||
})
|
||||
|
||||
minetest.register_node("potions:geode_"..name.."_6", {
|
||||
description = desc,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
tiles = tiles,
|
||||
drops = drops .. " 6",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-.5, -.5, -.5, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
groups = {cracky=3, geode_wall = 1, not_in_creative_inventory = 1},
|
||||
geode_name = name,
|
||||
})
|
||||
|
||||
|
||||
-- generation nodes
|
||||
|
||||
minetest.register_node("potions:geode_seed_"..name, {
|
||||
description = "geode mapgen seed "..name,
|
||||
drawtype = "node",
|
||||
tiles = {"default_cobble.png"},
|
||||
drop = "default:cobble",
|
||||
groups = {cracky = 1, geode_seed = 1},
|
||||
geode_name = name,
|
||||
})
|
||||
|
||||
minetest.register_node("potions:geode_wall_"..name, {
|
||||
description = "geode mapgen wall "..name,
|
||||
drawtype = "node",
|
||||
tiles = {"default_cobble.png"},
|
||||
drop = "default:cobble",
|
||||
groups = {cracky = 1, geode_wall = 1, not_in_creative_inventory = 1},
|
||||
on_timer = function(pos)
|
||||
orient_geode_wall(pos, name)
|
||||
-- minetest.set_node(pos, {name="d"})
|
||||
end,
|
||||
geode_name = name,
|
||||
})
|
||||
|
||||
-- minetest.register_ore({
|
||||
-- ore_type = "scatter",
|
||||
-- ore = "potions:geode_seed_"..name,
|
||||
-- wherein = opts.wherein or "default:stone",
|
||||
-- clust_scarcity = 48 * 48 * 48,
|
||||
-- clust_num_ores = 1,
|
||||
-- clust_size = 1,
|
||||
-- y_max = opts.y_min,
|
||||
-- y_min = opts.y_max,
|
||||
-- })
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
minetest.register_abm({
|
||||
name = "potions:geode_tester",
|
||||
nodenames = "group:geode_wall",
|
||||
|
@ -325,26 +375,7 @@ minetest.register_abm({
|
|||
|
||||
|
||||
|
||||
minetest.register_node("potions:geode_seed", {
|
||||
description = "geode mapgen seed",
|
||||
drawtype = "node",
|
||||
tiles = {"default_cobble.png"},
|
||||
drop = "default:cobble",
|
||||
groups = {cracky = 1},
|
||||
})
|
||||
|
||||
minetest.register_node("potions:geode_wall", {
|
||||
description = "geode mapgen wall",
|
||||
drawtype = "node",
|
||||
tiles = {"default_cobble.png"},
|
||||
drop = "default:cobble",
|
||||
groups = {cracky = 1, geode_wall = 1},
|
||||
on_timer = function(pos)
|
||||
orient_geode_wall(pos)
|
||||
-- minetest.set_node(pos, {name="d"})
|
||||
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
local function dist3(a, b)
|
||||
|
@ -368,16 +399,19 @@ end
|
|||
|
||||
minetest.register_abm({
|
||||
name = "potions:geode_grow",
|
||||
nodenames = "potions:geode_seed",
|
||||
nodenames = "group:geode_seed",
|
||||
chance = 1,
|
||||
interval = 2,
|
||||
interval = 10,
|
||||
action = function(pos, node)
|
||||
|
||||
local def = minetest.registered_nodes[node.name]
|
||||
local name = def.geode_name
|
||||
|
||||
local w = math.random(4) == 1
|
||||
|
||||
|
||||
-- most geodes are small, rare exponential size increase
|
||||
local a = math.random(500)
|
||||
|
||||
local r = math.min(20, pow((a / 431), 63) / 1160) + .1
|
||||
|
||||
-- local r = (math.random(50)) / math.log(50)) + 1
|
||||
|
@ -401,7 +435,7 @@ minetest.register_abm({
|
|||
minetest.set_node(p, {name = "air"})
|
||||
end
|
||||
elseif dd < 1 then
|
||||
minetest.set_node(p, {name = "potions:geode_wall"})
|
||||
minetest.set_node(p, {name = "potions:geode_wall_"..name})
|
||||
minetest.get_node_timer(p):start(1)
|
||||
elseif dd <= 1.8 then
|
||||
minetest.set_node(p, {name = "default:stone"})
|
||||
|
@ -416,3 +450,124 @@ minetest.register_abm({
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
minetest.register_craftitem("potions:quartz_crystal", {
|
||||
description = "Quartz Crystal",
|
||||
inventory_image = "potions_quartz_crystal.png",
|
||||
-- y_min, y_max, biome, wherein, rarity
|
||||
})
|
||||
potions.register_geode("quartz", {
|
||||
description = "Quartz",
|
||||
drops = "potions:quartz_crystal",
|
||||
tiles = "default_diamond_block.png^[colorize:white:120"
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craftitem("potions:smoky_quartz_crystal", {
|
||||
description = "Smoky Quartz Crystal",
|
||||
inventory_image = "potions_smoky_quartz_crystal.png",
|
||||
})
|
||||
potions.register_geode("smoky_quartz", {
|
||||
description = "Smoky Quartz",
|
||||
drops = "potions:smoky_quartz_crystal",
|
||||
tiles = "default_diamond_block.png^[colorize:brown:50"
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craftitem("potions:amethyst_crystal", {
|
||||
description = "Amethyst Crystal",
|
||||
inventory_image = "potions_amethyst_crystal.png",
|
||||
})
|
||||
potions.register_geode("amethyst", {
|
||||
description = "Amethyst",
|
||||
drops = "potions:amethyst_crystal",
|
||||
tiles = "default_diamond_block.png^[colorize:purple:60"
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craftitem("potions:epidote_crystal", {
|
||||
description = "Epidote Crystal",
|
||||
inventory_image = "potions_epidote_crystal.png",
|
||||
})
|
||||
potions.register_geode("epidote", {
|
||||
description = "Epidote",
|
||||
drops = "potions:epidote_crystal",
|
||||
tiles = "default_diamond_block.png^[colorize:green:220^[colorize:black:120"
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craftitem("potions:emerald_crystal", {
|
||||
description = "Emerald Crystal",
|
||||
inventory_image = "potions_emerald_crystal.png",
|
||||
})
|
||||
potions.register_geode("emerald", {
|
||||
description = "Emerald",
|
||||
drops = "potions:emerald_crystal",
|
||||
tiles = "default_diamond_block.png^[colorize:green:120"
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_craftitem("potions:ruby_crystal", {
|
||||
description = "Ruby Crystal",
|
||||
inventory_image = "potions_ruby_crystal.png",
|
||||
})
|
||||
potions.register_geode("ruby", {
|
||||
description = "Ruby",
|
||||
drops = "potions:ruby_crystal",
|
||||
tiles = "default_diamond_block.png^[colorize:red:120"
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craftitem("potions:sapphire_crystal", {
|
||||
description = "Sapphire Crystal",
|
||||
inventory_image = "potions_sapphire_crystal.png",
|
||||
})
|
||||
potions.register_geode("sapphire", {
|
||||
description = "Sapphire",
|
||||
drops = "potions:sapphire_crystal",
|
||||
tiles = "default_diamond_block.png^[colorize:blue:120"
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_craftitem("potions:garnet_crystal", {
|
||||
description = "Garnet Crystal",
|
||||
inventory_image = "potions_garnet_crystal.png",
|
||||
})
|
||||
potions.register_geode("garnet", {
|
||||
description = "Garnet",
|
||||
drops = "potions:garnet_crystal",
|
||||
tiles = "default_diamond_block.png^[colorize:red:120^[colorize:black:60"
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_craftitem("potions:zircon_crystal", {
|
||||
description = "Zircon Crystal",
|
||||
inventory_image = "potions_zircon_crystal.png",
|
||||
})
|
||||
potions.register_geode("zircon", {
|
||||
description = "Zircon",
|
||||
drops = "potions:zircon_crystal",
|
||||
tiles = "default_diamond_block.png^[colorize:yellow:70"
|
||||
})
|
||||
|
||||
|
||||
--[[
|
||||
cinnabar
|
||||
lazurite
|
||||
pyrite
|
||||
gypsum
|
||||
flourite
|
||||
calcite
|
||||
halite
|
||||
|
||||
cutting and polishing crystals into gems
|
||||
|
||||
]]
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -345,9 +345,11 @@ minetest.register_abm({
|
|||
chance = 180,
|
||||
interval = 30,
|
||||
action = function(pos, node)
|
||||
local p = minetest.find_node_near(pos, 1, "air")
|
||||
if p then
|
||||
minetest.set_node(p, {name="potions:sulphur_deposit_1"})
|
||||
-- TODO: place sulphur on sides too
|
||||
pos.y = pos.y + 1
|
||||
local n = minetest.get_node(pos)
|
||||
if n.name == "air" then
|
||||
minetest.set_node(pos, {name="potions:sulphur_deposit_1"})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue