2014-11-09 11:17:41 -08:00
|
|
|
-- Vines
|
|
|
|
minetest.register_node("ethereal:vine", {
|
|
|
|
description = "Vine",
|
|
|
|
drawtype = "signlike",
|
|
|
|
tiles = {"vine.png"},
|
|
|
|
inventory_image = "vine.png",
|
|
|
|
wield_image = "vine.png",
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "wallmounted",
|
|
|
|
walkable = false,
|
|
|
|
climbable = true,
|
|
|
|
is_ground_content = false,
|
|
|
|
selection_box = {
|
|
|
|
type = "wallmounted",
|
|
|
|
},
|
2015-07-04 04:22:39 -07:00
|
|
|
groups = {choppy = 3, oddly_breakable_by_hand = 1},
|
2014-11-09 11:17:41 -08:00
|
|
|
legacy_wallmounted = true,
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "ethereal:vine 2",
|
|
|
|
recipe = {
|
|
|
|
{"group:leaves", "group:leaves", ""},
|
|
|
|
{"group:leaves", "group:leaves", ""},
|
|
|
|
{"group:leaves", "group:leaves", ""},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- stone Ladder
|
|
|
|
minetest.register_node("ethereal:stone_ladder", {
|
|
|
|
description = "Stone Ladder",
|
|
|
|
drawtype = "signlike",
|
|
|
|
tiles = {"stone_ladder.png"},
|
|
|
|
inventory_image = "stone_ladder.png",
|
|
|
|
wield_image = "stone_ladder.png",
|
|
|
|
paramtype = "light",
|
2015-07-04 04:22:39 -07:00
|
|
|
sunlight_propagates = true,
|
2014-11-09 11:17:41 -08:00
|
|
|
paramtype2 = "wallmounted",
|
|
|
|
walkable = false,
|
|
|
|
climbable = true,
|
|
|
|
is_ground_content = false,
|
|
|
|
selection_box = {
|
|
|
|
type = "wallmounted",
|
|
|
|
},
|
2015-07-04 04:22:39 -07:00
|
|
|
groups = {cracky = 3, oddly_breakable_by_hand = 1},
|
2014-11-09 11:17:41 -08:00
|
|
|
legacy_wallmounted = true,
|
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "ethereal:stone_ladder 4",
|
|
|
|
recipe = {
|
|
|
|
{"default:cobble", "", "default:cobble"},
|
|
|
|
{"default:cobble", "default:cobble", "default:cobble"},
|
|
|
|
{"default:cobble", "", "default:cobble"},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Paper Wall
|
|
|
|
minetest.register_node("ethereal:paper_wall", {
|
|
|
|
drawtype = "nodebox",
|
|
|
|
description = ("Paper Wall"),
|
2015-11-23 12:43:48 -08:00
|
|
|
tiles = {"paper_wall.png"},
|
|
|
|
inventory_image_image = "paper_wall.png",
|
|
|
|
wield_image = "paper_wall.png",
|
2014-11-09 11:17:41 -08:00
|
|
|
paramtype = "light",
|
2015-07-04 04:22:39 -07:00
|
|
|
groups = {snappy = 3},
|
2014-11-09 11:17:41 -08:00
|
|
|
sounds = default.node_sound_wood_defaults(),
|
|
|
|
walkable = true,
|
2015-06-24 02:00:12 -07:00
|
|
|
is_ground_content = false,
|
2015-11-23 12:43:48 -08:00
|
|
|
sunlight_propagates = true,
|
2014-11-09 11:17:41 -08:00
|
|
|
paramtype2 = "facedir",
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.5, -0.5, 5/11, 0.5, 0.5, 8/16 }
|
|
|
|
},
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{ -0.5, -0.5, 5/11, 0.5, 0.5, 8/16 }
|
|
|
|
}
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "ethereal:paper_wall",
|
|
|
|
recipe = {
|
|
|
|
{"default:stick", "default:paper", "default:stick"},
|
|
|
|
{"default:stick", "default:paper", "default:stick"},
|
|
|
|
{"default:stick", "default:paper", "default:stick"},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Glostone (A little bit of light decoration)
|
|
|
|
minetest.register_node("ethereal:glostone", {
|
|
|
|
description = "Glo Stone",
|
|
|
|
tiles = {"glostone.png"},
|
2015-07-04 04:22:39 -07:00
|
|
|
groups = {cracky = 3},
|
2015-05-20 08:57:17 -07:00
|
|
|
light_source = default.LIGHT_MAX - 1,
|
2014-11-09 11:17:41 -08:00
|
|
|
drop = "ethereal:glostone",
|
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "ethereal:glostone",
|
|
|
|
recipe = {
|
|
|
|
{"default:torch", "default:stone", "dye:yellow"},
|
|
|
|
{"", "", ""},
|
|
|
|
{"", "", ""},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Ladder (Changes default recipe to give 2x ladders instead of only 1)
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "default:ladder 2",
|
|
|
|
recipe = {
|
|
|
|
{"group:stick", "", "group:stick"},
|
|
|
|
{"group:stick", "group:stick", "group:stick"},
|
|
|
|
{"group:stick", "", "group:stick"},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Signs (Changes default recipe to give 4x signs instead of only 1)
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "default:sign_wall 4",
|
|
|
|
recipe = {
|
|
|
|
{"group:wood", "group:wood", "group:wood"},
|
|
|
|
{"group:wood", "group:wood", "group:wood"},
|
|
|
|
{"", "group:stick", ""},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Charcoal Lump
|
|
|
|
minetest.register_craftitem("ethereal:charcoal_lump", {
|
|
|
|
description = "Lump of Charcoal",
|
|
|
|
inventory_image = "charcoal_lump.png",
|
2015-11-23 12:43:48 -08:00
|
|
|
wield_image = "charcoal_lump.png",
|
2014-11-09 11:17:41 -08:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "ethereal:charcoal_lump 2",
|
|
|
|
recipe = {
|
|
|
|
{"ethereal:scorched_tree"}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "ethereal:charcoal_lump 4",
|
|
|
|
type = "cooking",
|
|
|
|
recipe = "group:tree",
|
|
|
|
cooktime = 4
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "fuel",
|
|
|
|
recipe = "ethereal:charcoal_lump",
|
|
|
|
burntime = 10,
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Make Torch from Charcoal Lump
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "default:torch 4",
|
|
|
|
recipe = {
|
|
|
|
{"ethereal:charcoal_lump"},
|
|
|
|
{"default:stick"},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2014-12-29 03:03:11 -08:00
|
|
|
-- Obsidian Brick (now in default game so added compatibility for old maps)
|
|
|
|
minetest.register_alias("ethereal:obsidian_brick", "default:obsidianbrick")
|
2014-11-09 11:17:41 -08:00
|
|
|
|
|
|
|
-- Quicksand (old style, sinking inside shows black instead of yellow effect,
|
|
|
|
-- works ok with noclip enabled though)
|
|
|
|
minetest.register_node("ethereal:quicksand", {
|
|
|
|
description = "Quicksand",
|
|
|
|
tiles = {"default_sand.png"},
|
|
|
|
drop = "default:sand",
|
|
|
|
liquid_viscosity = 15,
|
|
|
|
liquidtype = "source",
|
|
|
|
liquid_alternative_flowing = "ethereal:quicksand",
|
|
|
|
liquid_alternative_source = "ethereal:quicksand",
|
|
|
|
liquid_renewable = false,
|
|
|
|
liquid_range = 0,
|
|
|
|
drowning = 1,
|
|
|
|
walkable = false,
|
|
|
|
climbable = false,
|
2015-07-04 04:22:39 -07:00
|
|
|
post_effect_color = {r = 230, g = 210, b = 160, a = 245},
|
|
|
|
groups = {crumbly = 3, falling_node = 1, sand = 1, liquid = 3, disable_jump = 1},
|
2014-11-09 11:17:41 -08:00
|
|
|
sounds = default.node_sound_sand_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Quicksand (new style, sinking inside shows yellow effect with or without noclip,
|
|
|
|
-- but old quicksand is shown as black until block placed nearby to update light)
|
|
|
|
minetest.register_node("ethereal:quicksand2", {
|
|
|
|
description = "Quicksand",
|
|
|
|
tiles = {"default_sand.png"},
|
|
|
|
drawtype = "glasslike",
|
|
|
|
paramtype = "light",
|
|
|
|
drop = "default:sand",
|
|
|
|
liquid_viscosity = 15,
|
|
|
|
liquidtype = "source",
|
|
|
|
liquid_alternative_flowing = "ethereal:quicksand2",
|
|
|
|
liquid_alternative_source = "ethereal:quicksand2",
|
|
|
|
liquid_renewable = false,
|
|
|
|
liquid_range = 0,
|
|
|
|
drowning = 1,
|
|
|
|
walkable = false,
|
|
|
|
climbable = false,
|
2015-07-04 04:22:39 -07:00
|
|
|
post_effect_color = {r = 230, g = 210, b = 160, a = 245},
|
|
|
|
groups = {crumbly = 3, falling_node = 1, sand = 1, liquid = 3, disable_jump = 1},
|
2014-11-09 11:17:41 -08:00
|
|
|
sounds = default.node_sound_sand_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Illuminated Cave Shrooms (Red, Green and Blue)
|
|
|
|
minetest.register_node("ethereal:illumishroom", {
|
|
|
|
description = "Red Illumishroom",
|
|
|
|
drawtype = "plantlike",
|
|
|
|
tiles = { "illumishroom.png" },
|
|
|
|
inventory_image = "illumishroom.png",
|
|
|
|
wield_image = "illumishroom.png",
|
|
|
|
paramtype = "light",
|
|
|
|
light_source = 5,
|
2015-11-23 12:43:48 -08:00
|
|
|
sunlight_propagates = true,
|
2014-11-09 11:17:41 -08:00
|
|
|
walkable = false,
|
2015-07-04 04:22:39 -07:00
|
|
|
groups = {dig_immediate = 3, attached_node = 1,flammable = 3},
|
2014-11-09 11:17:41 -08:00
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("ethereal:illumishroom2", {
|
|
|
|
description = "Green Illumishroom",
|
|
|
|
drawtype = "plantlike",
|
|
|
|
tiles = { "illumishroom2.png" },
|
|
|
|
inventory_image = "illumishroom2.png",
|
|
|
|
wield_image = "illumishroom2.png",
|
|
|
|
paramtype = "light",
|
|
|
|
light_source = 5,
|
2015-11-23 12:43:48 -08:00
|
|
|
sunlight_propagates = true,
|
2014-11-09 11:17:41 -08:00
|
|
|
walkable = false,
|
2015-07-04 04:22:39 -07:00
|
|
|
groups = {dig_immediate = 3, attached_node = 1,flammable = 3},
|
2014-11-09 11:17:41 -08:00
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("ethereal:illumishroom3", {
|
|
|
|
description = "Cyan Illumishroom",
|
|
|
|
drawtype = "plantlike",
|
|
|
|
tiles = { "illumishroom3.png" },
|
|
|
|
inventory_image = "illumishroom3.png",
|
|
|
|
wield_image = "illumishroom3.png",
|
|
|
|
paramtype = "light",
|
|
|
|
light_source = 5,
|
2015-11-23 12:43:48 -08:00
|
|
|
sunlight_propagates = true,
|
2014-11-09 11:17:41 -08:00
|
|
|
walkable = false,
|
2015-07-04 04:22:39 -07:00
|
|
|
groups = {dig_immediate = 3, attached_node = 1,flammable = 3},
|
2014-11-09 11:17:41 -08:00
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
2015-02-04 02:26:48 -08:00
|
|
|
-- Staff of Light (by Xanthin)
|
|
|
|
minetest.register_tool("ethereal:light_staff", {
|
|
|
|
description = "Staff of Light",
|
|
|
|
inventory_image = "light_staff.png",
|
2015-11-23 12:43:48 -08:00
|
|
|
wield_image = "light_staff.png",
|
2015-02-04 02:26:48 -08:00
|
|
|
stack_max = 1,
|
|
|
|
on_use = function(itemstack, user, pointed_thing)
|
|
|
|
|
2015-05-29 02:25:35 -07:00
|
|
|
if pointed_thing.type ~= "node" then
|
|
|
|
return
|
|
|
|
end
|
2015-02-04 02:26:48 -08:00
|
|
|
|
2015-05-29 02:25:35 -07:00
|
|
|
local pos = pointed_thing.under
|
|
|
|
local pname = user:get_player_name()
|
2015-02-04 02:26:48 -08:00
|
|
|
|
2015-05-29 02:25:35 -07:00
|
|
|
if minetest.is_protected(pos, pname) then
|
|
|
|
minetest.record_protection_violation(pos, pname)
|
2015-02-04 02:26:48 -08:00
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2015-07-04 04:22:39 -07:00
|
|
|
local node = minetest.get_node_or_nil(pos)
|
|
|
|
if node then node = node.name else return end
|
2015-02-04 02:26:48 -08:00
|
|
|
|
|
|
|
if node == "default:stone" then
|
2015-09-16 06:49:45 -07:00
|
|
|
minetest.set_node(pos, {name="ethereal:glostone"})
|
2015-06-05 11:58:10 -07:00
|
|
|
if not minetest.setting_getbool("creative_mode") then
|
2015-08-10 08:36:28 -07:00
|
|
|
itemstack:add_wear(65535 / 149) -- 150 uses
|
2015-06-05 11:58:10 -07:00
|
|
|
end
|
|
|
|
return itemstack
|
2015-02-04 02:26:48 -08:00
|
|
|
end
|
|
|
|
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "ethereal:light_staff",
|
2015-05-29 02:25:35 -07:00
|
|
|
recipe = {
|
|
|
|
{"ethereal:illumishroom", "default:mese_crystal", "ethereal:illumishroom"},
|
|
|
|
{"ethereal:illumishroom2", "default:steel_ingot", "ethereal:illumishroom2"},
|
|
|
|
{"ethereal:illumishroom3", "default:steel_ingot", "ethereal:illumishroom3"}
|
|
|
|
}
|
2015-02-04 02:26:48 -08:00
|
|
|
})
|
|
|
|
|
2014-11-09 11:17:41 -08:00
|
|
|
-- Generate Illumishroom in caves next to coal
|
2015-05-29 02:25:35 -07:00
|
|
|
minetest.register_on_generated(function(minp, maxp)
|
2015-07-04 04:22:39 -07:00
|
|
|
if minp.y > -30 or maxp.y < -3000 then
|
2015-05-29 02:25:35 -07:00
|
|
|
return
|
|
|
|
end
|
2015-04-10 07:38:53 -07:00
|
|
|
local bpos
|
2015-11-15 13:17:28 -08:00
|
|
|
for key, pos in pairs(minetest.find_nodes_in_area_under_air(minp, maxp, "default:stone_with_coal")) do
|
2015-07-04 04:22:39 -07:00
|
|
|
bpos = {x = pos.x, y = pos.y + 1, z = pos.z }
|
2014-11-21 12:26:04 -08:00
|
|
|
if minetest.get_node(bpos).name == "air" then
|
2014-11-09 11:17:41 -08:00
|
|
|
if bpos.y > -3000 and bpos.y < -2000 then
|
2015-09-16 06:49:45 -07:00
|
|
|
minetest.set_node(bpos, {name = "ethereal:illumishroom3"})
|
2014-11-09 11:17:41 -08:00
|
|
|
elseif bpos.y > -2000 and bpos.y < -1000 then
|
2015-09-16 06:49:45 -07:00
|
|
|
minetest.set_node(bpos, {name = "ethereal:illumishroom2"})
|
2014-11-09 11:17:41 -08:00
|
|
|
elseif bpos.y > -1000 and bpos.y < -30 then
|
2015-09-16 06:49:45 -07:00
|
|
|
minetest.set_node(bpos, {name = "ethereal:illumishroom"})
|
2014-11-09 11:17:41 -08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2015-07-04 04:22:39 -07:00
|
|
|
end)
|