Upload files to 'mods/ethereal'

This commit is contained in:
thunderdog1138 2020-05-03 14:00:46 +00:00
parent 78b6fac683
commit 76bdd3a292
5 changed files with 979 additions and 0 deletions

View File

@ -0,0 +1,42 @@
--[[
Ethereal Settings can be changed here and kept even after the mod
has been updated
--]]
ethereal.leaftype = 0 -- 0 for 2D plantlike, 1 for 3D allfaces
ethereal.leafwalk = false -- true for walkable leaves, false to fall through
ethereal.cavedirt = true -- caves chop through dirt when true
ethereal.torchdrop = true -- torches drop when touching water
ethereal.papyruswalk = true -- papyrus can be walked on
ethereal.lilywalk = true -- waterlilies can be walked on
ethereal.xcraft = true -- allow cheat crafts for cobble->gravel->dirt->sand, ice->snow, dry dirt->desert sand
-- Set following to 1 to enable biome or false to disable
ethereal.glacier = 1 -- Ice glaciers with snow
ethereal.bamboo = 1 -- Bamboo with sprouts
ethereal.mesa = 1 -- Mesa red and orange clay with giant redwood
ethereal.alpine = 1 -- Snowy grass
ethereal.healing = 1 -- Snowy peaks with healing trees
ethereal.snowy = 1 -- Cold grass with pine trees and snow spots
ethereal.frost = 1 -- Blue dirt with blue/pink frost trees
ethereal.grassy = 1 -- Green grass with flowers and trees
ethereal.caves = 1 -- Desert stone ares with huge caverns underneath
ethereal.grayness = 1 -- Grey grass with willow trees
ethereal.grassytwo = 1 -- Sparse trees with old trees and flowers
ethereal.prairie = 1 -- Flowery grass with many plants and flowers
ethereal.jumble = 1 -- Green grass with trees and jungle grass
ethereal.junglee = 1 -- Jungle grass with tall jungle trees
ethereal.desert = 1 -- Desert sand with cactus
ethereal.grove = 1 -- Banana groves and ferns
ethereal.mushroom = 1 -- Purple grass with giant mushrooms
ethereal.sandstone = 1 -- Sandstone with smaller cactus
ethereal.quicksand = 1 -- Quicksand banks
ethereal.plains = 1 -- Dry dirt with scorched trees
ethereal.savanna = 1 -- Dry yellow grass with acacia tree's
ethereal.fiery = 1 -- Red grass with lava craters
ethereal.sandclay = 1 -- Sand areas with clay underneath
ethereal.swamp = 1 -- Swamp areas with vines on tree's, mushrooms, lilly's and clay sand
ethereal.sealife = 1 -- Enable coral and seaweed
ethereal.reefs = 1 -- Enable new coral reefs in default
ethereal.sakura = 1 -- Enable sakura biomes with trees

338
mods/ethereal/stairs.lua Normal file
View File

@ -0,0 +1,338 @@
local S = ethereal.intllib
-- Stairs Redo
if stairs and stairs.mod and stairs.mod == "redo" then
stairs.register_all("crystal_block", "ethereal:crystal_block",
{cracky = 1, level = 2, puts_out_fire = 1, cools_lava = 1},
{"crystal_block.png"},
S("Crystal Block Stair"),
S("Crystal Block Slab"),
default.node_sound_glass_defaults())
stairs.register_all("icebrick", "ethereal:icebrick",
{cracky = 3, puts_out_fire = 1, cools_lava = 1},
{"brick_ice.png"},
S("Ice Brick Stair"),
S("Ice Brick Slab"),
default.node_sound_glass_defaults())
stairs.register_all("snowbrick", "ethereal:snowbrick",
{crumbly = 3, puts_out_fire = 1, cools_lava = 1},
{"brick_snow.png"},
S("Snow Brick Stair"),
S("Snow Brick Slab"),
default.node_sound_dirt_defaults({
footstep = {name = "default_snow_footstep", gain = 0.25},
dug = {name = "default_snow_footstep", gain = 0.75},
}))
stairs.register_all("dry_dirt", "ethereal:dry_dirt",
{crumbly = 3},
{"ethereal_dry_dirt.png"},
S("Dried Dirt Stair"),
S("Dried Dirt Slab"),
default.node_sound_dirt_defaults())
stairs.register_all("mushroom_trunk", "ethereal:mushroom_trunk",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
{"mushroom_trunk.png"},
S("Mushroom Trunk Stair"),
S("Mushroom Trunk Slab"),
default.node_sound_wood_defaults())
stairs.register_all("mushroom", "ethereal:mushroom",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
{"mushroom_block.png"},
S("Mushroom Top Stair"),
S("Mushroom Top Slab"),
default.node_sound_wood_defaults())
stairs.register_all("frost_wood", "ethereal:frost_wood",
{choppy = 2, oddly_breakable_by_hand = 1, put_out_fire = 1},
{"frost_wood.png"},
S("Frost Wood Stair"),
S("Frost Wood Slab"),
default.node_sound_wood_defaults())
stairs.register_all("yellow_wood", "ethereal:yellow_wood",
{choppy = 2, oddly_breakable_by_hand = 1, put_out_fire = 1},
{"yellow_wood.png"},
S("Healing Wood Stair"),
S("Healing Wood Slab"),
default.node_sound_wood_defaults())
stairs.register_all("palm_wood", "ethereal:palm_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"moretrees_palm_wood.png"},
S("Palm Wood Stair"),
S("Palm Wood Slab"),
default.node_sound_wood_defaults())
stairs.register_all("birch_wood", "ethereal:birch_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"moretrees_birch_wood.png"},
S("Birch Wood Stair"),
S("Birch Wood Slab"),
default.node_sound_wood_defaults())
stairs.register_all("banana_wood", "ethereal:banana_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"banana_wood.png"},
S("Banana Wood Stair"),
S("Banana Wood Slab"),
default.node_sound_wood_defaults())
stairs.register_all("willow_wood", "ethereal:willow_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"willow_wood.png"},
S("Willow Wood Stair"),
S("Willow Wood Slab"),
default.node_sound_wood_defaults())
stairs.register_all("redwood_wood", "ethereal:redwood_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"redwood_wood.png"},
S("Redwood stair"),
S("Redwood Slab"),
default.node_sound_wood_defaults())
stairs.register_all("bamboo_wood", "ethereal:bamboo_block",
{snappy = 3, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"bamboo_floor.png"},
S("Bamboo stair"),
S("Bamboo Slab"),
default.node_sound_wood_defaults())
stairs.register_all("sakura_wood", "ethereal:sakura_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"ethereal_sakura_wood.png"},
S("Sakura Wood stair"),
S("Sakura Wood Slab"),
default.node_sound_wood_defaults())
-- Stairs Plus (in More Blocks)
elseif minetest.global_exists("stairsplus") then
stairsplus:register_all("ethereal", "crystal_block", "ethereal:crystal_block", {
description = S("Crystal block"),
tiles = {"crystal_block.png"},
groups = {cracky = 1, falling_node = 1, puts_out_fire = 1, cools_lava = 1},
sounds = default.node_sound_glass_defaults(),
})
stairsplus:register_all("ethereal", "icebrick", "ethereal:icebrick", {
description = S("Ice Brick"),
tiles = {"brick_ice.png"},
groups = {cracky = 3, puts_out_fire = 1, cools_lava = 1},
sounds = default.node_sound_glass_defaults(),
})
stairsplus:register_all("ethereal", "snowbrick", "ethereal:snowbrick", {
description = S("Snow Brick"),
tiles = {"brick_snow.png"},
groups = {crumbly = 3, puts_out_fire = 1, cools_lava = 1},
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_snow_footstep", gain = 0.25},
dug = {name = "default_snow_footstep", gain = 0.75},
})
})
stairsplus:register_all("ethereal", "dry_dirt", "ethereal:dry_dirt", {
description = S("Dried Dirt"),
tiles = {"ethereal_dry_dirt.png"},
groups = {crumbly = 3},
sounds = default.node_sound_dirt_defaults(),
})
stairsplus:register_all("ethereal", "mushroom_trunk", "ethereal:mushroom_trunk", {
description = S("Mushroom Trunk"),
tiles = {"mushroom_trunk.png"},
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
})
stairsplus:register_all("ethereal", "mushroom", "ethereal:mushroom", {
description = S("Mushroom Top"),
tiles = {"mushroom_block.png"},
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
})
stairsplus:register_all("ethereal", "frost_wood", "ethereal:frost_wood", {
description = S("Frost Wood"),
tiles = {"frost_wood.png"},
groups = {choppy = 2, oddly_breakable_by_hand = 1, put_out_fire = 1},
sounds = default.node_sound_wood_defaults(),
})
stairsplus:register_all("ethereal", "yellow_wood", "ethereal:yellow_wood", {
description = S("Healing Wood"),
tiles = {"yellow_wood.png"},
groups = {choppy = 2, oddly_breakable_by_hand = 1, put_out_fire = 1},
sounds = default.node_sound_wood_defaults(),
})
stairsplus:register_all("ethereal", "palm_wood", "ethereal:palm_wood", {
description = S("Palm Wood"),
tiles = {"moretrees_palm_wood.png"},
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
})
stairsplus:register_all("ethereal", "birch_wood", "ethereal:birch_wood", {
description = S("Birch Wood"),
tiles = {"moretrees_birch_wood.png"},
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
})
stairsplus:register_all("ethereal", "banana_wood", "ethereal:banana_wood", {
description = S("Banana Wood"),
tiles = {"banana_wood.png"},
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
})
stairsplus:register_all("ethereal", "willow_wood", "ethereal:willow_wood", {
description = S("Willow Wood"),
tiles = {"willow_wood.png"},
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
})
stairsplus:register_all("ethereal", "redwood_wood", "ethereal:redwood_wood", {
description = S("Redwood"),
tiles = {"redwood_wood.png"},
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
})
stairsplus:register_all("ethereal", "bamboo_wood", "ethereal:bamboo_block", {
description = S("Bamboo"),
tiles = {"bamboo_floor.png"},
groups = {snappy = 3, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
})
stairsplus:register_all("ethereal", "sakura_wood", "ethereal:sakura_wood", {
description = S("Sakura"),
tiles = {"ethereal_sakura_wood.png"},
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
})
-- Default Stairs
else
stairs.register_stair_and_slab("crystal_block", "ethereal:crystal_block",
{cracky = 1, level = 2, puts_out_fire = 1, cools_lava = 1},
{"crystal_block.png"},
S("Crystal Block Stair"),
S("Crystal Block Slab"),
default.node_sound_glass_defaults())
stairs.register_stair_and_slab("icebrick", "ethereal:icebrick",
{cracky = 3, puts_out_fire = 1, cools_lava = 1},
{"brick_ice.png"},
S("Ice Brick Stair"),
S("Ice Brick Slab"),
default.node_sound_glass_defaults())
stairs.register_stair_and_slab("snowbrick", "ethereal:snowbrick",
{crumbly = 3, puts_out_fire = 1, cools_lava = 1},
{"brick_snow.png"},
S("Snow Brick Stair"),
S("Snow Brick Slab"),
default.node_sound_dirt_defaults({
footstep = {name = "default_snow_footstep", gain = 0.15},
dug = {name = "default_snow_footstep", gain = 0.2},
dig = {name = "default_snow_footstep", gain = 0.2}
}))
stairs.register_stair_and_slab("dry_dirt", "ethereal:dry_dirt",
{crumbly = 3},
{"ethereal_dry_dirt.png"},
S("Dried Dirt Stair"),
S("Dried Dirt Slab"),
default.node_sound_dirt_defaults())
stairs.register_stair_and_slab("mushroom_trunk", "ethereal:mushroom_trunk",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
{"mushroom_trunk.png"},
S("Mushroom Trunk Stair"),
S("Mushroom Trunk Slab"),
default.node_sound_wood_defaults())
stairs.register_stair_and_slab("mushroom", "ethereal:mushroom",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
{"mushroom_block.png"},
S("Mushroom Top Stair"),
S("Mushroom Top Slab"),
default.node_sound_wood_defaults())
stairs.register_stair_and_slab("frost_wood", "ethereal:frost_wood",
{choppy = 2, oddly_breakable_by_hand = 1, put_out_fire = 1},
{"frost_wood.png"},
S("Frost Wood Stair"),
S("Frost Wood Slab"),
default.node_sound_wood_defaults())
stairs.register_stair_and_slab("yellow_wood", "ethereal:yellow_wood",
{choppy = 2, oddly_breakable_by_hand = 1, put_out_fire = 1},
{"yellow_wood.png"},
S("Healing Wood Stair"),
S("Healing Wood Slab"),
default.node_sound_wood_defaults())
stairs.register_stair_and_slab("palm_wood", "ethereal:palm_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"moretrees_palm_wood.png"},
S("Palm Wood Stair"),
S("Palm Wood Slab"),
default.node_sound_wood_defaults())
stairs.register_stair_and_slab("birch_wood", "ethereal:birch_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"moretrees_birch_wood.png"},
"Birch Wood Stair",
"Birch Wood Slab",
default.node_sound_wood_defaults())
stairs.register_stair_and_slab("banana_wood", "ethereal:banana_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"banana_wood.png"},
S("Banana Wood Stair"),
S("Banana Wood Slab"),
default.node_sound_wood_defaults())
stairs.register_stair_and_slab("willow_wood", "ethereal:willow_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"willow_wood.png"},
S("Willow Wood Stair"),
S("Willow Wood Slab"),
default.node_sound_wood_defaults())
stairs.register_stair_and_slab("redwood_wood", "ethereal:redwood_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"redwood_wood.png"},
S("Redwood stair"),
S("Redwood Slab"),
default.node_sound_wood_defaults())
stairs.register_stair_and_slab("bamboo_wood", "ethereal:bamboo_block",
{snappy = 3, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"bamboo_floor.png"},
S("Bamboo stair"),
S("Bamboo Slab"),
default.node_sound_wood_defaults())
stairs.register_stair_and_slab("sakura_wood", "ethereal:sakura_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"ethereal_sakura_wood.png"},
S("Sakura Wood Stair"),
S("Sakura Wood Slab"),
default.node_sound_wood_defaults())
end

View File

@ -0,0 +1,127 @@
local S = ethereal.intllib
-- Strawberry (can also be planted as seed)
minetest.register_craftitem("ethereal:strawberry", {
description = S("Strawberry"),
inventory_image = "strawberry.png",
wield_image = "strawberry.png",
groups = {food_strawberry = 1, food_berry = 1, flammable = 2},
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "ethereal:strawberry_1")
end,
on_use = minetest.item_eat(1),
})
-- Define Strawberry Bush growth stages
local crop_def = {
drawtype = "plantlike",
tiles = {"strawberry_1.png"},
paramtype = "light",
sunlight_propagates = true,
waving = 1,
walkable = false,
buildable_to = true,
drop = "",
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
},
groups = {
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
not_in_creative_inventory = 1, growing = 1
},
sounds = default.node_sound_leaves_defaults(),
}
--stage 1
minetest.register_node("ethereal:strawberry_1", table.copy(crop_def))
-- stage 2
crop_def.tiles = {"strawberry_2.png"}
minetest.register_node("ethereal:strawberry_2", table.copy(crop_def))
-- stage 3
crop_def.tiles = {"strawberry_3.png"}
minetest.register_node("ethereal:strawberry_3", table.copy(crop_def))
-- stage 4
crop_def.tiles = {"strawberry_4.png"}
minetest.register_node("ethereal:strawberry_4", table.copy(crop_def))
-- stage 5
crop_def.tiles = {"strawberry_5.png"}
minetest.register_node("ethereal:strawberry_5", table.copy(crop_def))
-- stage 6
crop_def.tiles = {"strawberry_6.png"}
crop_def.drop = {
items = {
{items = {"ethereal:strawberry 1"},rarity = 2},
{items = {"ethereal:strawberry 2"},rarity = 3},
}
}
minetest.register_node("ethereal:strawberry_6", table.copy(crop_def))
-- stage 7
crop_def.tiles = {"strawberry_7.png"}
crop_def.drop = {
items = {
{items = {"ethereal:strawberry 1"},rarity = 1},
{items = {"ethereal:strawberry 2"},rarity = 3},
}
}
minetest.register_node("ethereal:strawberry_7", table.copy(crop_def))
-- stage 8
crop_def.tiles = {"strawberry_8.png"}
crop_def.groups.growing = 0
crop_def.drop = {
items = {
{items = {"ethereal:strawberry 2"},rarity = 1},
{items = {"ethereal:strawberry 3"},rarity = 3},
}
}
minetest.register_node("ethereal:strawberry_8", table.copy(crop_def))
-- growing routine if farming redo isn't present
if not farming or not farming.mod or farming.mod ~= "redo" then
minetest.register_abm({
label = "Ethereal grow strawberry",
nodenames = {
"ethereal:strawberry_1", "ethereal:strawberry_2", "ethereal:strawberry_3",
"ethereal:strawberry_4", "ethereal:strawberry_5", "ethereal:strawberry_6",
"ethereal:strawberry_7"
},
neighbors = {"farming:soil_wet"},
interval = 9,
chance = 20,
catch_up = false,
action = function(pos, node)
-- are we on wet soil?
pos.y = pos.y - 1
if minetest.get_item_group(minetest.get_node(pos).name, "soil") < 3 then
return
end
pos.y = pos.y + 1
-- do we have enough light?
local light = minetest.get_node_light(pos)
if not light
or light < 13 then
return
end
-- grow to next stage
local num = node.name:split("_")[2]
node.name = "ethereal:strawberry_" .. tonumber(num + 1)
minetest.swap_node(pos, node)
end
})
end -- END IF

182
mods/ethereal/water.lua Normal file
View File

@ -0,0 +1,182 @@
local S = ethereal.intllib
-- Ice Brick
minetest.register_node("ethereal:icebrick", {
description = S("Ice Brick"),
tiles = {"brick_ice.png"},
paramtype = "light",
freezemelt = "default:water_source",
is_ground_content = false,
groups = {cracky = 3, puts_out_fire = 1, cools_lava = 1},
sounds = default.node_sound_glass_defaults(),
})
minetest.register_craft({
output = "ethereal:icebrick 4",
recipe = {
{"default:ice", "default:ice"},
{"default:ice", "default:ice"},
}
})
-- Snow Brick
minetest.register_node("ethereal:snowbrick", {
description = S("Snow Brick"),
tiles = {"brick_snow.png"},
paramtype = "light",
freezemelt = "default:water_source",
is_ground_content = false,
groups = {crumbly = 3, puts_out_fire = 1, cools_lava = 1},
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_snow_footstep", gain = 0.15},
dug = {name = "default_snow_footstep", gain = 0.2},
dig = {name = "default_snow_footstep", gain = 0.2},
}),
})
minetest.register_craft({
output = "ethereal:snowbrick 4",
recipe = {
{"default:snowblock", "default:snowblock"},
{"default:snowblock", "default:snowblock"},
}
})
-- If Crystal Spike, Crystal Dirt, Snow near Water, change Water to Ice
minetest.register_abm({
label = "Ethereal freeze water",
nodenames = {
"ethereal:crystal_spike", "default:snow", "default:snowblock",
"ethereal:snowbrick"
},
neighbors = {"default:water_source", "default:river_water_source"},
interval = 15,
chance = 4,
catch_up = false,
action = function(pos, node)
local near = minetest.find_node_near(pos, 1,
{"default:water_source", "default:river_water_source"})
if near then
minetest.swap_node(near, {name = "default:ice"})
end
end,
})
-- If Heat Source near Ice or Snow then melt.
minetest.register_abm({
label = "Ethereal melt snow/ice",
nodenames = {
"default:ice", "default:snowblock", "default:snow",
"default:dirt_with_snow", "ethereal:snowbrick", "ethereal:icebrick"
},
neighbors = {
"fire:basic_fire", "default:lava_source", "default:lava_flowing",
"default:furnace_active", "default:torch", "default:torch_wall",
"default:torch_ceiling"
},
interval = 5,
chance = 4,
catch_up = false,
action = function(pos, node)
local water_node = "default:water"
if pos.y > 2 then
water_node = "default:river_water"
end
if node.name == "default:ice"
or node.name == "default:snowblock"
or node.name == "ethereal:icebrick"
or node.name == "ethereal:snowbrick" then
minetest.swap_node(pos, {name = water_node.."_source"})
elseif node.name == "default:snow" then
minetest.swap_node(pos, {name = water_node.."_flowing"})
elseif node.name == "default:dirt_with_snow" then
minetest.swap_node(pos, {name = "default:dirt_with_grass"})
end
ethereal.check_falling(pos)
end,
})
-- If Water Source near Dry Dirt, change to normal Dirt
minetest.register_abm({
label = "Ethereal wet dry dirt",
nodenames = {
"ethereal:dry_dirt", "default:dirt_with_dry_grass",
"default:dry_dirt", "default:dry_dirt_with_dry_grass"
},
neighbors = {"group:water"},
interval = 15,
chance = 2,
catch_up = false,
action = function(pos, node)
if node.name == "ethereal:dry_dirt"
or node.name == "default:dry_dirt" then
minetest.swap_node(pos, {name = "default:dirt"})
else
minetest.swap_node(pos, {name = "default:dirt_with_dry_grass"})
end
end,
})
-- If torch touching water then drop as item (when enabled)
if ethereal.torchdrop == true then
local torch_drop = "default:torch"
local drop_sound = "fire_extinguish_flame"
if minetest.get_modpath("real_torch") then
torch_drop = "real_torch:torch"
drop_sound = "real_torch_extinguish"
end
minetest.register_abm({
label = "Ethereal drop torch",
nodenames = {"default:torch", "default:torch_wall", "default:torch_ceiling",
"real_torch:torch", "real_torch:torch_wall", "real_torch:torch_ceiling"},
neighbors = {"group:water"},
interval = 5,
chance = 1,
catch_up = false,
action = function(pos, node)
local num = #minetest.find_nodes_in_area(
{x = pos.x - 1, y = pos.y, z = pos.z},
{x = pos.x + 1, y = pos.y, z = pos.z},
{"group:water"})
if num == 0 then
num = num + #minetest.find_nodes_in_area(
{x = pos.x, y = pos.y, z = pos.z - 1},
{x = pos.x, y = pos.y, z = pos.z + 1},
{"group:water"})
end
if num == 0 then
num = num + #minetest.find_nodes_in_area(
{x = pos.x, y = pos.y + 1, z = pos.z},
{x = pos.x, y = pos.y + 1, z = pos.z},
{"group:water"})
end
if num > 0 then
minetest.set_node(pos, {name = "air"})
minetest.sound_play({name = drop_sound, gain = 0.2},
{pos = pos, max_hear_distance = 10})
minetest.add_item(pos, {name = torch_drop})
end
end,
})
end

290
mods/ethereal/wood.lua Normal file
View File

@ -0,0 +1,290 @@
local S = ethereal.intllib
-- sakura trunk
minetest.register_node("ethereal:sakura_trunk", {
description = S("Sakura Trunk"),
tiles = {
"ethereal_sakura_trunk_top.png",
"ethereal_sakura_trunk_top.png",
"ethereal_sakura_trunk.png"
},
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir",
on_place = minetest.rotate_node,
})
-- sakura wood
minetest.register_node("ethereal:sakura_wood", {
description = S("Sakura Wood"),
tiles = {"ethereal_sakura_wood.png"},
is_ground_content = false,
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_craft({
output = "ethereal:sakura_wood 4",
recipe = {{"ethereal:sakura_trunk"}}
})
-- willow trunk
minetest.register_node("ethereal:willow_trunk", {
description = S("Willow Trunk"),
tiles = {
"willow_trunk_top.png",
"willow_trunk_top.png",
"willow_trunk.png"
},
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir",
on_place = minetest.rotate_node,
})
-- willow wood
minetest.register_node("ethereal:willow_wood", {
description = S("Willow Wood"),
tiles = {"willow_wood.png"},
is_ground_content = false,
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_craft({
output = "ethereal:willow_wood 4",
recipe = {{"ethereal:willow_trunk"}}
})
-- redwood trunk
minetest.register_node("ethereal:redwood_trunk", {
description = S("Redwood Trunk"),
tiles = {
"redwood_trunk_top.png",
"redwood_trunk_top.png",
"redwood_trunk.png"
},
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir",
on_place = minetest.rotate_node,
})
-- redwood wood
minetest.register_node("ethereal:redwood_wood", {
description = S("Redwood Wood"),
tiles = {"redwood_wood.png"},
is_ground_content = false,
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_craft({
output = "ethereal:redwood_wood 4",
recipe = {{"ethereal:redwood_trunk"}},
})
-- frost trunk
minetest.register_node("ethereal:frost_tree", {
description = S("Frost Tree"),
tiles = {
"ethereal_frost_tree_top.png",
"ethereal_frost_tree_top.png",
"ethereal_frost_tree.png"
},
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, put_out_fire = 1},
sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir",
on_place = minetest.rotate_node,
})
-- frost wood
minetest.register_node("ethereal:frost_wood", {
description = S("Frost Wood"),
tiles = {"frost_wood.png"},
is_ground_content = false,
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, put_out_fire = 1},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_craft({
output = "ethereal:frost_wood 4",
recipe = {{"ethereal:frost_tree"}}
})
-- healing trunk
minetest.register_node("ethereal:yellow_trunk", {
description = S("Healing Tree Trunk"),
tiles = {
"yellow_tree_top.png",
"yellow_tree_top.png",
"yellow_tree.png"
},
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, put_out_fire = 1},
sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir",
on_place = minetest.rotate_node,
})
-- healing wood
minetest.register_node("ethereal:yellow_wood", {
description = S("Healing Tree Wood"),
tiles = {"yellow_wood.png"},
is_ground_content = false,
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, put_out_fire = 1},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_craft({
output = "ethereal:yellow_wood 4",
recipe = {{"ethereal:yellow_trunk"}}
})
-- palm trunk (thanks to VanessaE for palm textures)
minetest.register_node("ethereal:palm_trunk", {
description = S("Palm Trunk"),
tiles = {
"moretrees_palm_trunk_top.png",
"moretrees_palm_trunk_top.png",
"moretrees_palm_trunk.png"
},
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir",
on_place = minetest.rotate_node,
})
-- palm wood
minetest.register_node("ethereal:palm_wood", {
description = S("Palm Wood"),
tiles = {"moretrees_palm_wood.png"},
is_ground_content = false,
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_craft({
output = "ethereal:palm_wood 4",
recipe = {{"ethereal:palm_trunk"}}
})
-- banana trunk
minetest.register_node("ethereal:banana_trunk", {
description = S("Banana Trunk"),
tiles = {
"banana_trunk_top.png",
"banana_trunk_top.png",
"banana_trunk.png"
},
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir",
on_place = minetest.rotate_node,
})
-- banana wood
minetest.register_node("ethereal:banana_wood", {
description = S("Banana Wood"),
tiles = {"banana_wood.png"},
is_ground_content = false,
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_craft({
output = "ethereal:banana_wood 4",
recipe = {{"ethereal:banana_trunk"}}
})
-- scorched trunk
minetest.register_node("ethereal:scorched_tree", {
description = S("Scorched Tree"),
tiles = {
"scorched_tree_top.png",
"scorched_tree_top.png",
"scorched_tree.png"
},
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 1},
sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir",
on_place = minetest.rotate_node,
})
minetest.register_craft({
output = "ethereal:scorched_tree 8",
recipe = {
{"group:tree", "group:tree", "group:tree"},
{"group:tree", "default:torch", "group:tree"},
{"group:tree", "group:tree", "group:tree"},
}
})
-- mushroom trunk
minetest.register_node("ethereal:mushroom_trunk", {
description = S("Mushroom"),
tiles = {
"mushroom_trunk_top.png",
"mushroom_trunk_top.png",
"mushroom_trunk.png"
},
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir",
on_place = minetest.rotate_node,
})
-- birch trunk (thanks to VanessaE for birch textures)
minetest.register_node("ethereal:birch_trunk", {
description = S("Birch Trunk"),
tiles = {
"moretrees_birch_trunk_top.png",
"moretrees_birch_trunk_top.png",
"moretrees_birch_trunk.png"
},
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir",
on_place = minetest.rotate_node,
})
-- birch wood
minetest.register_node("ethereal:birch_wood", {
description = S("Birch Wood"),
tiles = {"moretrees_birch_wood.png"},
is_ground_content = false,
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_craft({
output = "ethereal:birch_wood 4",
recipe = {{"ethereal:birch_trunk"}}
})
-- Bamboo (thanks to Nelo-slay on DeviantArt for the free Bamboo base image)
minetest.register_node("ethereal:bamboo", {
description = S("Bamboo"),
drawtype = "plantlike",
tiles = {"bamboo.png"},
inventory_image = "bamboo.png",
wield_image = "bamboo.png",
paramtype = "light",
sunlight_propagates = true,
walkable = true,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
},
groups = {choppy = 3, oddly_breakable_by_hand = 1, flammable = 2},--tree = 1
sounds = default.node_sound_leaves_defaults(),
after_dig_node = function(pos, node, metadata, digger)
default.dig_up(pos, node, digger)
end,
})
minetest.register_craft({
type = "fuel",
recipe = "ethereal:bamboo",
burntime = 1,
})