2016-05-17 23:40:05 +03:00
|
|
|
|
2016-06-09 17:08:34 +03:00
|
|
|
local S = ethereal.intllib
|
|
|
|
|
2019-11-05 23:45:04 +03:00
|
|
|
-- Etherium Dust
|
|
|
|
minetest.register_craftitem("ethereal:etherium_dust", {
|
|
|
|
description = S("Etherium Dust"),
|
|
|
|
inventory_image = "ethereal_etherium_dust.png",
|
|
|
|
wield_image = "ethereal_etherium_dust.png",
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Ethereium Ore
|
|
|
|
minetest.register_node("ethereal:etherium_ore", {
|
|
|
|
description = S("Etherium Ore"),
|
|
|
|
tiles = {"default_desert_stone.png^ethereal_etherium_ore.png"},
|
|
|
|
groups = {cracky = 3},
|
|
|
|
drop = "ethereal:etherium_dust",
|
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
-- Bamboo Flooring
|
|
|
|
minetest.register_node("ethereal:bamboo_floor", {
|
2016-06-09 17:08:34 +03:00
|
|
|
description = S("Bamboo Floor"),
|
2019-08-05 10:57:49 +03:00
|
|
|
drawtype = "nodebox",
|
2016-05-17 23:40:05 +03:00
|
|
|
tiles = { "bamboo_floor.png" },
|
|
|
|
wield_image = "bamboo_floor.png",
|
|
|
|
inventory_image = "bamboo_floor.png",
|
2014-11-09 22:17:41 +03:00
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "wallmounted",
|
2016-05-17 23:40:05 +03:00
|
|
|
walkable = true,
|
|
|
|
node_box = {
|
|
|
|
type = "wallmounted",
|
|
|
|
wall_top = {-0.5, 0.4375, -0.5, 0.5, 0.5, 0.5},
|
|
|
|
wall_bottom = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
|
|
|
|
wall_side = {-0.5, -0.5, -0.5, -0.4375, 0.5, 0.5},
|
|
|
|
},
|
|
|
|
selection_box = {type = "wallmounted"},
|
|
|
|
groups = {snappy = 3, choppy = 3 , flammable = 2},
|
|
|
|
sounds = default.node_sound_wood_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Craft Bamboo into Bamboo Flooring
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "ethereal:bamboo_floor 2",
|
2018-11-01 17:43:06 +03:00
|
|
|
recipe = {
|
|
|
|
{"ethereal:bamboo", "ethereal:bamboo"},
|
|
|
|
{"ethereal:bamboo", "ethereal:bamboo"},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "ethereal:bamboo_block",
|
|
|
|
recipe = {
|
|
|
|
{"ethereal:bamboo_floor"},
|
|
|
|
{"ethereal:bamboo_floor"},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Bamboo Block
|
|
|
|
minetest.register_node("ethereal:bamboo_block", {
|
|
|
|
description = S("Bamboo Block"),
|
|
|
|
tiles = { "bamboo_floor.png" },
|
|
|
|
paramtype = "light",
|
|
|
|
groups = {snappy = 3, choppy = 3 , flammable = 2, wood = 1},
|
|
|
|
sounds = default.node_sound_wood_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "ethereal:bamboo_block",
|
2016-05-17 23:40:05 +03:00
|
|
|
recipe = {
|
|
|
|
{"ethereal:bamboo", "ethereal:bamboo", "ethereal:bamboo"},
|
|
|
|
{"ethereal:bamboo", "ethereal:bamboo", "ethereal:bamboo"},
|
|
|
|
{"ethereal:bamboo", "ethereal:bamboo", "ethereal:bamboo"},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Craft Bamboo into Paper
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "default:paper 6",
|
|
|
|
recipe = {
|
|
|
|
{"ethereal:bamboo", "ethereal:bamboo"},
|
|
|
|
{"ethereal:bamboo", "ethereal:bamboo"},
|
|
|
|
{"ethereal:bamboo", "ethereal:bamboo"},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2016-12-06 13:48:31 +03:00
|
|
|
if ethereal.xcraft == true then
|
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
-- X pattern craft recipes (5x 'a' in X pattern gives 5 of 'b')
|
2016-06-05 13:39:20 +03:00
|
|
|
local cheat = {
|
2016-09-05 16:56:40 +03:00
|
|
|
{"default:cobble", "default:gravel", 5},
|
|
|
|
{"default:gravel", "default:dirt", 5},
|
|
|
|
{"default:dirt", "default:sand", 5},
|
|
|
|
{"default:ice", "default:snow", 20},
|
|
|
|
{"ethereal:dry_dirt", "default:desert_sand", 5},
|
2020-06-14 21:48:25 +03:00
|
|
|
{"default:stone", "default:silver_sandstone", 5}
|
2016-06-05 13:39:20 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
for n = 1, #cheat do
|
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
minetest.register_craft({
|
2016-09-05 16:56:40 +03:00
|
|
|
output = cheat[n][2] .. " " .. cheat[n][3],
|
2016-05-17 23:40:05 +03:00
|
|
|
recipe = {
|
2016-06-05 13:39:20 +03:00
|
|
|
{cheat[n][1], "", cheat[n][1]},
|
|
|
|
{"", cheat[n][1], ""},
|
|
|
|
{cheat[n][1], "", cheat[n][1]},
|
2016-05-17 23:40:05 +03:00
|
|
|
}
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
2016-12-06 13:48:31 +03:00
|
|
|
end -- END if
|
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
-- Paper (2x3 string = 4 paper)
|
|
|
|
minetest.register_craft({
|
2020-07-08 19:03:26 +03:00
|
|
|
output = "default:paper 2",
|
2016-05-17 23:40:05 +03:00
|
|
|
recipe = {
|
2020-07-08 19:59:49 +03:00
|
|
|
{"farming:cotton", "farming:cotton", "farming:cotton"}
|
2016-05-17 23:40:05 +03:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Palm Wax
|
|
|
|
minetest.register_craftitem("ethereal:palm_wax", {
|
2016-06-09 17:08:34 +03:00
|
|
|
description = S("Palm Wax"),
|
2016-05-17 23:40:05 +03:00
|
|
|
inventory_image = "palm_wax.png",
|
|
|
|
wield_image = "palm_wax.png",
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "cooking",
|
|
|
|
cooktime = 10,
|
|
|
|
output = "ethereal:palm_wax",
|
|
|
|
recipe = "ethereal:palmleaves"
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Candle from Wax and String/Cotton
|
|
|
|
minetest.register_node("ethereal:candle", {
|
2016-06-09 17:08:34 +03:00
|
|
|
description = S("Candle"),
|
2016-05-17 23:40:05 +03:00
|
|
|
drawtype = "plantlike",
|
|
|
|
inventory_image = "candle_static.png",
|
|
|
|
wield_image = "candle_static.png",
|
|
|
|
tiles = {
|
|
|
|
{
|
|
|
|
name = "candle.png",
|
|
|
|
animation={
|
|
|
|
type="vertical_frames",
|
|
|
|
aspect_w = 32,
|
|
|
|
aspect_h = 32,
|
|
|
|
length = 1.0
|
|
|
|
}
|
|
|
|
},
|
2017-10-09 13:17:34 +03:00
|
|
|
},
|
2016-05-17 23:40:05 +03:00
|
|
|
paramtype = "light",
|
|
|
|
light_source = 11,
|
|
|
|
sunlight_propagates = true,
|
2014-11-09 22:17:41 +03:00
|
|
|
walkable = false,
|
2016-05-17 23:40:05 +03:00
|
|
|
groups = {dig_immediate = 3, attached_node = 1},
|
|
|
|
sounds = default.node_sound_defaults(),
|
2014-11-09 22:17:41 +03:00
|
|
|
selection_box = {
|
2016-05-17 23:40:05 +03:00
|
|
|
type = "fixed",
|
2016-12-22 00:23:13 +03:00
|
|
|
fixed = { -0.15, -0.5, -0.15, 0.15, 0, 0.15 }
|
2014-11-09 22:17:41 +03:00
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
2016-05-17 23:40:05 +03:00
|
|
|
output = "ethereal:candle 2",
|
2014-11-09 22:17:41 +03:00
|
|
|
recipe = {
|
2020-06-12 12:09:42 +03:00
|
|
|
{"farming:string"},
|
2016-05-17 23:40:05 +03:00
|
|
|
{"ethereal:palm_wax"},
|
|
|
|
{"ethereal:palm_wax"},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Wooden Bowl
|
|
|
|
minetest.register_craftitem("ethereal:bowl", {
|
2016-06-09 17:08:34 +03:00
|
|
|
description = S("Bowl"),
|
2016-05-17 23:40:05 +03:00
|
|
|
inventory_image = "bowl.png",
|
2018-03-12 21:40:36 +03:00
|
|
|
groups = {food_bowl = 1, flammable = 2},
|
2016-05-17 23:40:05 +03:00
|
|
|
})
|
|
|
|
|
2018-09-03 22:43:00 +03:00
|
|
|
-- use farming redo's recipe if found
|
|
|
|
if not minetest.registered_items["farming:bowl"] then
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "ethereal:bowl 4",
|
|
|
|
recipe = {
|
|
|
|
{"group:wood", "", "group:wood"},
|
|
|
|
{"", "group:wood", ""},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
end
|
2014-11-09 22:17:41 +03:00
|
|
|
|
|
|
|
-- stone Ladder
|
|
|
|
minetest.register_node("ethereal:stone_ladder", {
|
2016-06-09 17:08:34 +03:00
|
|
|
description = S("Stone Ladder"),
|
2014-11-09 22:17:41 +03:00
|
|
|
drawtype = "signlike",
|
|
|
|
tiles = {"stone_ladder.png"},
|
|
|
|
inventory_image = "stone_ladder.png",
|
|
|
|
wield_image = "stone_ladder.png",
|
|
|
|
paramtype = "light",
|
2015-07-04 14:22:39 +03:00
|
|
|
sunlight_propagates = true,
|
2014-11-09 22:17:41 +03:00
|
|
|
paramtype2 = "wallmounted",
|
|
|
|
walkable = false,
|
|
|
|
climbable = true,
|
|
|
|
is_ground_content = false,
|
|
|
|
selection_box = {
|
|
|
|
type = "wallmounted",
|
|
|
|
},
|
2015-07-04 14:22:39 +03:00
|
|
|
groups = {cracky = 3, oddly_breakable_by_hand = 1},
|
2014-11-09 22:17:41 +03:00
|
|
|
legacy_wallmounted = true,
|
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "ethereal:stone_ladder 4",
|
|
|
|
recipe = {
|
2016-12-01 12:41:23 +03:00
|
|
|
{"group:stone", "", "group:stone"},
|
|
|
|
{"group:stone", "group:stone", "group:stone"},
|
|
|
|
{"group:stone", "", "group:stone"},
|
2014-11-09 22:17:41 +03:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Paper Wall
|
|
|
|
minetest.register_node("ethereal:paper_wall", {
|
|
|
|
drawtype = "nodebox",
|
2016-06-09 17:08:34 +03:00
|
|
|
description = S("Paper Wall"),
|
2015-11-23 23:43:48 +03:00
|
|
|
tiles = {"paper_wall.png"},
|
|
|
|
inventory_image_image = "paper_wall.png",
|
|
|
|
wield_image = "paper_wall.png",
|
2014-11-09 22:17:41 +03:00
|
|
|
paramtype = "light",
|
2015-07-04 14:22:39 +03:00
|
|
|
groups = {snappy = 3},
|
2014-11-09 22:17:41 +03:00
|
|
|
sounds = default.node_sound_wood_defaults(),
|
|
|
|
walkable = true,
|
2015-06-24 12:00:12 +03:00
|
|
|
is_ground_content = false,
|
2015-11-23 23:43:48 +03:00
|
|
|
sunlight_propagates = true,
|
2014-11-09 22:17:41 +03: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 = {
|
2018-11-01 17:43:06 +03:00
|
|
|
{"group:stick", "default:paper", "group:stick"},
|
|
|
|
{"group:stick", "default:paper", "group:stick"},
|
|
|
|
{"group:stick", "default:paper", "group:stick"},
|
2014-11-09 22:17:41 +03:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Glostone (A little bit of light decoration)
|
|
|
|
minetest.register_node("ethereal:glostone", {
|
2016-06-09 17:08:34 +03:00
|
|
|
description = S("Glo Stone"),
|
2014-11-09 22:17:41 +03:00
|
|
|
tiles = {"glostone.png"},
|
2015-07-04 14:22:39 +03:00
|
|
|
groups = {cracky = 3},
|
2016-01-09 15:25:33 +03:00
|
|
|
light_source = 13,
|
2014-11-09 22:17:41 +03:00
|
|
|
drop = "ethereal:glostone",
|
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
2016-12-06 13:48:31 +03:00
|
|
|
type = "shapeless",
|
2014-11-09 22:17:41 +03:00
|
|
|
output = "ethereal:glostone",
|
2016-12-06 13:48:31 +03:00
|
|
|
recipe = {"default:torch", "default:stone", "dye:yellow"}
|
2014-11-09 22:17:41 +03:00
|
|
|
})
|
|
|
|
|
|
|
|
-- Charcoal Lump
|
|
|
|
minetest.register_craftitem("ethereal:charcoal_lump", {
|
2016-06-09 17:08:34 +03:00
|
|
|
description = S("Lump of Charcoal"),
|
2014-11-09 22:17:41 +03:00
|
|
|
inventory_image = "charcoal_lump.png",
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "ethereal:charcoal_lump 2",
|
|
|
|
recipe = {
|
|
|
|
{"ethereal:scorched_tree"}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
2016-05-17 23:40:05 +03:00
|
|
|
output = "ethereal:charcoal_lump 2",
|
2014-11-09 22:17:41 +03:00
|
|
|
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"},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2015-02-04 13:26:48 +03:00
|
|
|
-- Staff of Light (by Xanthin)
|
|
|
|
minetest.register_tool("ethereal:light_staff", {
|
2016-06-09 17:08:34 +03:00
|
|
|
description = S("Staff of Light"),
|
2015-02-04 13:26:48 +03:00
|
|
|
inventory_image = "light_staff.png",
|
2015-11-23 23:43:48 +03:00
|
|
|
wield_image = "light_staff.png",
|
2016-12-01 12:41:23 +03:00
|
|
|
sound = {breaks = "default_tool_breaks"},
|
2015-02-04 13:26:48 +03:00
|
|
|
stack_max = 1,
|
|
|
|
on_use = function(itemstack, user, pointed_thing)
|
|
|
|
|
2015-05-29 12:25:35 +03:00
|
|
|
if pointed_thing.type ~= "node" then
|
|
|
|
return
|
|
|
|
end
|
2015-02-04 13:26:48 +03:00
|
|
|
|
2015-05-29 12:25:35 +03:00
|
|
|
local pos = pointed_thing.under
|
|
|
|
local pname = user:get_player_name()
|
2015-02-04 13:26:48 +03:00
|
|
|
|
2015-05-29 12:25:35 +03:00
|
|
|
if minetest.is_protected(pos, pname) then
|
|
|
|
minetest.record_protection_violation(pos, pname)
|
2015-02-04 13:26:48 +03:00
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2016-01-21 17:59:28 +03:00
|
|
|
local node = minetest.get_node(pos).name
|
2020-08-25 17:02:43 +03:00
|
|
|
local def = minetest.registered_nodes[node]
|
2021-03-30 22:25:04 +03:00
|
|
|
local stone = def and def.groups and def.groups.stone and def.groups.stone == 1
|
2015-02-04 13:26:48 +03:00
|
|
|
|
2020-08-25 17:02:43 +03:00
|
|
|
if stone then
|
2016-01-21 17:59:28 +03:00
|
|
|
|
|
|
|
minetest.swap_node(pos, {name = "ethereal:glostone"})
|
|
|
|
|
2017-10-09 13:17:34 +03:00
|
|
|
if not ethereal.check_creative(user:get_player_name()) then
|
2015-08-10 18:36:28 +03:00
|
|
|
itemstack:add_wear(65535 / 149) -- 150 uses
|
2015-06-05 21:58:10 +03:00
|
|
|
end
|
2016-01-21 17:59:28 +03:00
|
|
|
|
2015-06-05 21:58:10 +03:00
|
|
|
return itemstack
|
2015-02-04 13:26:48 +03:00
|
|
|
end
|
|
|
|
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "ethereal:light_staff",
|
2015-05-29 12:25:35 +03: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 13:26:48 +03:00
|
|
|
})
|