Skip to content
Snippets Groups Projects
Commit c4d4e229 authored by tenplus1's avatar tenplus1
Browse files

First Commit by TenPlus1

parents
No related branches found
No related tags found
No related merge requests found
-- Crystal Spike (Hurts if you touch it - thanks to ZonerDarkRevention for his DokuCraft DeviantArt crystal texture)
minetest.register_node("ethereal:crystal_spike", {
description = "Crystal Spike",
drawtype = "plantlike",
tiles = { "crystal_spike.png" },
inventory_image = "crystal_spike.png",
wield_image = "crystal_spike.png",
paramtype = "light",
light_source = LIGHT_MAX - 7,
walkable = false,
damage_per_second = 1,
groups = {cracky=1,falling_node=1,puts_out_fire=1},
sounds = default.node_sound_glass_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
},
})
-- Crystal Ingot
minetest.register_craftitem("ethereal:crystal_ingot", {
description = "Crystal Ingot",
inventory_image = "crystal_ingot.png",
})
minetest.register_craft({
output = "ethereal:crystal_ingot",
recipe = {
{"default:mese_crystal", "ethereal:crystal_spike", ""},
{"", "", ""},
{"", "", ""},
}
})
-- Crystal Block
minetest.register_node("ethereal:crystal_block", {
description = "Crystal Block",
tiles = {"crystal_block.png"},
light_source = LIGHT_MAX - 5,
groups = {cracky=1,level=2,puts_out_fire},
sounds = default.node_sound_glass_defaults(),
})
minetest.register_craft({
output = "ethereal:crystal_block",
recipe = {
{"ethereal:crystal_ingot", "ethereal:crystal_ingot", "ethereal:crystal_ingot"},
{"ethereal:crystal_ingot", "ethereal:crystal_ingot", "ethereal:crystal_ingot"},
{"ethereal:crystal_ingot", "ethereal:crystal_ingot", "ethereal:crystal_ingot"},
}
})
minetest.register_craft({
output = "ethereal:crystal_ingot 9",
recipe = {
{"ethereal:crystal_block"},
}
})
-- Crystal Sword (Powerful wee beastie)
minetest.register_tool("ethereal:sword_crystal", {
description = "Crystal Sword",
inventory_image = "crystal_sword.png",
tool_capabilities = {
full_punch_interval = 0.6,
max_drop_level=1,
groupcaps={
snappy={times={[1]=1.70, [2]=0.70, [3]=0.25}, uses=50, maxlevel=3},
},
damage_groups = {fleshy=10},
}
})
minetest.register_craft({
output = "ethereal:sword_crystal",
recipe = {
{"", "ethereal:crystal_ingot", ""},
{"", "ethereal:crystal_ingot", ""},
{"", "default:steel_ingot", ""},
}
})
-- Crystal Axe
minetest.register_tool("ethereal:axe_crystal", {
description = "Crystal Axe",
inventory_image = "crystal_axe.png",
tool_capabilities = {
full_punch_interval = 0.8,
max_drop_level=1,
groupcaps={
choppy={times={[1]=2.00, [2]=0.80, [3]=0.40}, uses=30, maxlevel=2},
},
damage_groups = {fleshy=7},
},
})
minetest.register_craft({
output = 'ethereal:axe_crystal',
recipe = {
{'ethereal:crystal_ingot', 'ethereal:crystal_ingot'},
{'ethereal:crystal_ingot', 'default:steel_ingot'},
{'', 'default:steel_ingot'},
}
})
-- Crystal Pick (This will last a while)
minetest.register_tool("ethereal:pick_crystal", {
description = "Crystal Pickaxe",
inventory_image = "crystal_pick.png",
tool_capabilities = {
full_punch_interval = 0.7,
max_drop_level=3,
groupcaps={
cracky = {times={[1]=1.8, [2]=0.8, [3]=0.40}, uses=40, maxlevel=3},
},
damage_groups = {fleshy=7},
},
})
minetest.register_craft({
output = "ethereal:pick_crystal",
recipe = {
{"ethereal:crystal_ingot", "ethereal:crystal_ingot", "ethereal:crystal_ingot"},
{"", "default:steel_ingot", ""},
{"", "default:steel_ingot", ""},
}
})
-- Crystal Shovel (with Soft Touch so player can dig up dirt with grass intact)
minetest.register_tool("ethereal:shovel_crystal", {
description = "Crystal (soft touch) Shovel",
inventory_image = "crystal_shovel.png",
wield_image = "crystal_shovel.png^[transformR90",
on_use = function(itemstack, user, pointed_thing)
if pointed_thing.type == "node" then
-- Check if node protected
if not minetest.is_protected(pointed_thing.under, user:get_player_name()) then
local pos = pointed_thing.under
local nn = minetest.get_node(pos).name
local is_crumbly = minetest.get_item_group(nn, "crumbly")
-- Is node dirt, sand or gravel
if is_crumbly == 1 or is_crumbly == 2 or is_crumbly == 3 then
local inv = user:get_inventory()
minetest.env:remove_node(pointed_thing.under)
nodeupdate(pos)
inv:add_item("main", {name = nn})
itemstack:add_wear(65535/100) -- 111 uses
minetest.sound_play("default_dirt_footstep", {pos = pos, gain = 0.35})
return itemstack
end
end
end
end,
})
minetest.register_craft({
output = "ethereal:shovel_crystal",
recipe = {
{"", "ethereal:crystal_ingot", ""},
{"", "default:steel_ingot", ""},
{"", "default:steel_ingot", ""},
}
})
-- Crystal Gilly Staff (replenishes air supply when used, great for exploring underwater)
minetest.register_tool("ethereal:crystal_gilly_staff", {
description = "Crystal Gilly Staff",
inventory_image = "crystal_gilly_staff.png",
wield_image = "crystal_gilly_staff.png",
on_use = function(itemstack, user, pointed_thing)
if user:get_breath() < 10 then
user:set_breath(10)
end
end,
})
minetest.register_craft({
output = "ethereal:crystal_gilly_staff",
recipe = {
{"ethereal:green_moss", "ethereal:gray_moss", "ethereal:fiery_moss"},
{"ethereal:crystal_moss", "ethereal:crystal_ingot", "ethereal:mushroom_moss"},
{"", "ethereal:crystal_ingot", ""},
}
})
default
farming
stairs
bakedclay?
\ No newline at end of file
dirt.lua 0 → 100644
-- Override default Dirt (to stop caves cutting away dirt)
minetest.override_item("default:dirt", {is_ground_content = false})
-- Green Dirt
minetest.register_node("ethereal:green_dirt", {
description = "Green Dirt",
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
is_ground_content = false,
groups = {crumbly=3,soil=1,ethereal_grass=1},
drop = "default:dirt",
sounds = default.node_sound_dirt_defaults()
})
-- Dry Dirt
minetest.register_node("ethereal:dry_dirt", {
description = "Dried Dirt",
tiles = {"ethereal_dry_dirt.png"},
is_ground_content = false,
groups = {crumbly=3},
sounds = default.node_sound_dirt_defaults()
})
minetest.register_craft({
type = "cooking",
output = "ethereal:dry_dirt",
recipe = "default:dirt",
cooktime = 3,
})
local dirt = {}
dirt.type = {
{"Bamboo"}, {"Jungle"}, {"Grove"}, {"Prairie"}, {"Cold"}, {"Crystal"}, {"Mushroom"}, {"Fiery"}, {"Gray"},
}
for _, row in ipairs(dirt.type) do
local desc = row[1]
local name = desc:lower()
minetest.register_node("ethereal:"..name.."_dirt", {
description = desc.." Dirt",
tiles = {"ethereal_grass_"..name.."_top.png", "default_dirt.png",
"default_dirt.png^ethereal_grass_"..name.."_side.png"},
is_ground_content = false,
groups = {crumbly=3,soil=1,ethereal_grass=1},
drop = "default:dirt",
sounds = default.node_sound_dirt_defaults()
})
end
-- Compatibility with old maps
minetest.register_alias("ethereal:crystal_topped_dirt", "ethereal:crystal_dirt")
minetest.register_alias("ethereal:fiery_dirt_top", "ethereal:fiery_dirt")
minetest.register_alias("ethereal:gray_dirt_top", "ethereal:gray_dirt")
minetest.register_alias("ethereal:green_dirt_top", "ethereal:green_dirt")
-- Check surrounding grass and change dirt to Same colour (by Sokomine)
minetest.register_abm({
nodenames = {"default:dirt_with_grass"},
interval = 5,
chance = 5,
action = function(pos, node)
local count_grasses = {}
local curr_max = 0
local curr_type = "ethereal:green_dirt_top"; -- Fallback Colour
local positions = minetest.find_nodes_in_area( {x=(pos.x-2), y=(pos.y-2), z=(pos.z-2)},
{x=(pos.x+2), y=(pos.y+2), z=(pos.z+2)},
"group:ethereal_grass" )
for _,p in ipairs(positions) do
-- count the new grass node
local n = minetest.get_node( p )
if( n and n.name ) then
if( not( count_grasses[ n.name ] )) then
count_grasses[ n.name ] = 1
else
count_grasses[ n.name ] = count_grasses[ n.name ] + 1
end
-- we found a grass type of which there"s more than the current max
if( count_grasses[ n.name ] > curr_max ) then
curr_max = count_grasses[ n.name ]
curr_type = n.name
end
end
end
minetest.set_node(pos, {name = curr_type })
end
})
-- If Grass devoid of light, change to Dirt
minetest.register_abm({
nodenames = {"group:ethereal_grass"},
interval = 5,
chance = 20,
action = function(pos, node)
local name = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name
local nodedef = minetest.registered_nodes[name]
if name ~= "ignore" and nodedef
and not ((nodedef.sunlight_propagates or nodedef.paramtype == "light")
and nodedef.liquidtype == "none") then
minetest.set_node(pos, {name = "default:dirt"})
end
end
})
-- If Baked Clay mod not active, make Red and Orange nodes
if not minetest.get_modpath("bakedclay") then
minetest.register_node(":bakedclay:red", {
description = "Red Baked Clay",
tiles = {"baked_clay_red.png"},
groups = {cracky=3},
is_ground_content = false,
sounds = default.node_sound_stone_defaults(),
})
stairs.register_stair_and_slab("bakedclay_red", "bakedclay:red",
{cracky=3, not_in_craft_guide=1},
{"baked_clay_red.png"},
"Baked Clay Red Stair",
"Baked Clay Red Slab",
default.node_sound_stone_defaults())
minetest.register_node(":bakedclay:orange", {
description = "Orange Baked Clay",
tiles = {"baked_clay_orange.png"},
groups = {cracky=3},
is_ground_content = false,
sounds = default.node_sound_stone_defaults(),
})
stairs.register_stair_and_slab("bakedclay_orange", "bakedclay:orange",
{cracky=3, not_in_craft_guide=1},
{"baked_clay_orange.png"},
"Baked Clay Orange Stair",
"Baked Clay Orange Slab",
default.node_sound_stone_defaults())
end
extra.lua 0 → 100644
-- 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",
--wall_top = = <default>
--wall_bottom = = <default>
--wall_side = = <default>
},
groups = {choppy=3, oddly_breakable_by_hand=1},
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",
paramtype2 = "wallmounted",
walkable = false,
climbable = true,
is_ground_content = false,
selection_box = {
type = "wallmounted",
--wall_top = = <default>
--wall_bottom = = <default>
--wall_side = = <default>
},
groups = {cracky=3, oddly_breakable_by_hand=1},
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"),
tiles = {"paper_wall.png",},
paramtype = "light",
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
walkable = true,
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"},
groups = {cracky=3},
light_source = LIGHT_MAX - 1,
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",
})
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"},
}
})
-- Obsidian Brick
minetest.register_node("ethereal:obsidian_brick", {
description = "Obsidian Brick",
inventory_image = minetest.inventorycube("obsidian_brick.png"),
tiles = {"obsidian_brick.png"},
paramtype = "facedir",
groups = {cracky=1,level=3},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_craft({
output = 'ethereal:obsidian_brick 2',
recipe = {
{'default:obsidian', 'default:obsidian'},
{'default:obsidian', 'default:obsidian'},
}
})
-- 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,
post_effect_color = { r=230, g=210, b=160, a=245 },
groups = {crumbly=3, falling_node=1, sand=1, liquid=3, disable_jump=1},
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,
post_effect_color = { r=230, g=210, b=160, a=245 },
groups = {crumbly=3, falling_node=1, sand=1, liquid=3, disable_jump=1},
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,
walkable = false,
groups = {dig_immediate=3, attached_node=1,flammable=3},
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,
walkable = false,
groups = {dig_immediate=3, attached_node=1,flammable=3},
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,
walkable = false,
groups = {dig_immediate=3, attached_node=1,flammable=3},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
},
})
-- Generate Illumishroom in caves next to coal
minetest.register_on_generated(function(minp, maxp, seed)
local coal_nodes = minetest.find_nodes_in_area(minp, maxp, "default:stone_with_coal")
for key, pos in pairs(coal_nodes) do
local bpos = { x=pos.x, y=pos.y + 1, z=pos.z }
nod = minetest.get_node(bpos).name
if nod == "air" then
if bpos.y > -3000 and bpos.y < -2000 then
minetest.add_node(bpos, {name = "ethereal:illumishroom3"})
elseif bpos.y > -2000 and bpos.y < -1000 then
minetest.add_node(bpos, {name = "ethereal:illumishroom2"})
elseif bpos.y > -1000 and bpos.y < -30 then
minetest.add_node(bpos, {name = "ethereal:illumishroom"})
end
end
end
end)
local fence = {}
fence.type = {
{"junglewood", "Jungle Wood", "default_junglewood.png", "default:junglewood"},
{"scorched", "Scorched", "scorched_tree.png", "ethereal:scorched_tree"},
{"frostwood", "Frost Wood", "frost_wood.png", "ethereal:frost_wood"},
{"redwood", "Redwood", "redwood_wood.png", "ethereal:redwood_wood"},
{"willow", "Willow", "willow_wood.png", "ethereal:willow_wood"},
{"yellowwood", "Healing Wood", "yellow_wood.png", "ethereal:yellow_wood"},
{"palm", "Palm Wood", "moretrees_palm_wood.png", "ethereal:palm_wood"},
{"banana", "Banana Wood", "banana_wood.png", "ethereal:banana_wood"},
{"mushroom", "Mushroom", "mushroom_trunk.png", "ethereal:mushroom_trunk"},
{"acacia", "Acacia Wood", "moretrees_acacia_wood.png","ethereal:acacia_wood"},
}
for _, row in ipairs(fence.type) do
local name = row[1]
local desc = row[2]
local texture = row[3]
local nod = row[4]
minetest.register_node("ethereal:fence_"..name, {
description = desc.." Fence",
drawtype = "fencelike",
tiles = {texture},
inventory_image = "default_fence_overlay.png^"..texture.."^default_fence_overlay.png^[makealpha:255,126,126",
wield_image = "default_fence_overlay.png^"..texture.."^default_fence_overlay.png^[makealpha:255,126,126",
paramtype = "light",
selection_box = {
type = "fixed",
fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
},
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_craft({
output = "ethereal:fence_"..name.." 4",
recipe = {
{nod, "group:stick", nod},
{nod, "group:stick", nod},
}
})
end
-- Raw Fish (Thanks to Altairas for her Fish image on DeviantArt)
minetest.register_craftitem("ethereal:fish_raw", {
description = "Raw Fish",
inventory_image = "fish_raw.png",
on_use = minetest.item_eat(2),
})
-- Cooked Fish
minetest.register_craftitem("ethereal:fish_cooked", {
description = "Cooked Fish",
inventory_image = "fish_cooked.png",
on_use = minetest.item_eat(5),
})
-- Sashimi (Thanks to Natalia Grosner for letting me use the sashimi image)
minetest.register_craftitem("ethereal:sashimi", {
description = "Sashimi",
inventory_image = "sashimi.png",
on_use = minetest.item_eat(4),
})
minetest.register_craft({
output = "ethereal:sashimi 2",
recipe = {
{'ethereal:seaweed','ethereal:fish_raw','ethereal:seaweed'},
}
})
-- Worm
minetest.register_craftitem("ethereal:worm", {
description = "Worm",
inventory_image = "worm.png",
})
-- Fishing Rod
minetest.register_craftitem("ethereal:fishing_rod", {
description = "Fishing Rod",
inventory_image = "fishing_rod.png",
stack_max = 1,
liquids_pointable = true,
})
-- Fishing Rod (Baited)
minetest.register_craftitem("ethereal:fishing_rod_baited", {
description = "Baited Fishing Rod",
inventory_image = "fishing_rod_baited.png",
wield_image = "fishing_rod_wield.png",
stack_max = 1,
liquids_pointable = true,
on_use = function (itemstack, user, pointed_thing)
if pointed_thing and pointed_thing.under then
local node = minetest.env:get_node(pointed_thing.under)
if string.find(node.name, "default:water_source") then
if math.random(1, 100) < 5 then
local inv = user:get_inventory()
if inv:room_for_item("main", {name="ethereal:fish_raw"}) then
inv:add_item("main", {name="ethereal:fish_raw"})
return {name="ethereal:fishing_rod"}
else
minetest.chat_send_player(user:get_player_name(), "Your Fish Got Away! Inventory Too Full")
end
end
end
end
end,
})
-- Fishing Rod
minetest.register_craft({
output = "ethereal:fishing_rod",
recipe = {
{"","","default:stick"},
{"", "default:stick", "farming:string"},
{"default:stick", "", "farming:string"},
}
})
-- Sift through 2 Dirt Blocks to find Worm
minetest.register_craft({
output = "ethereal:worm",
recipe = {
{"default:dirt","default:dirt"},
}
})
-- Cooking Fish
minetest.register_craft({
type = "cooking",
output = "ethereal:fish_cooked",
recipe = "ethereal:fish_raw",
cooktime = 2,
})
-- Baiting Fishing Rod
minetest.register_craft({
type = "shapeless",
output = "ethereal:fishing_rod_baited",
recipe = {"ethereal:fishing_rod", "ethereal:worm"},
})
-- Flowers spread over all types of soil
minetest.register_abm({
nodenames = {"group:flora"},
neighbors = {"group:soil"},
interval = 40,
chance = 20,
action = function(pos, node)
local light = minetest.get_node_light(pos)
if not light or light < 13 then
return
end
local pos0 = {x=pos.x-4,y=pos.y-4,z=pos.z-4}
local pos1 = {x=pos.x+4,y=pos.y+4,z=pos.z+4}
local flowers = minetest.find_nodes_in_area(pos0, pos1, "group:flora")
if #flowers > 3 then
return
end
local seedling = minetest.find_nodes_in_area(pos0, pos1, {"group:soil"})
if #seedling > 0 then
seedling = seedling[math.random(#seedling)]
seedling.y = seedling.y + 1
light = minetest.get_node_light(seedling)
if not light or light < 13 then
return
end
if minetest.get_node(seedling).name == "air" then
minetest.set_node(seedling, {name=node.name})
end
end
end,
})
gates.lua 0 → 100644
-- Node Box coords
local nb_gap = {
{-1, 0.1875, -0.0625, -0.5, 0.3125, 0.0625},
{-1, -0.1875, -0.0625, -0.5, -0.3125, 0.0625},
{0.5, 0.1875, -0.0625, 1, 0.3125, 0.0625},
{0.5, -0.1875, -0.0625, 1, -0.3125, 0.0625}
}
local nb_pil = {
{0.5, -0.5, -0.09375, 0.5625, 0.5, 0.09375},
{-0.5625, -0.5, -0.09375, -0.5, 0.5, 0.09375},
{-0.5, -0.3125, -0.0625, -0.375, 0.3125, 0.0625},
{0.375, -0.3125, -0.0625, 0.5, 0.3125, 0.0625}
}
-- Open/Close Gates
function gate_rightclick(pos, node)
local data = nil
data = string.split(node.name, "_", 2)
local gate = data[1].."_"
local open = data[2]
if open == "open" then
minetest.sound_play("door_close", {pos=pos, gain = 0.3, max_hear_distance = 10})
minetest.set_node(pos, {name=gate.."closed", param2=node.param2})
else
minetest.sound_play("door_open", {pos=pos, gain = 0.3, max_hear_distance = 10})
minetest.set_node(pos, {name=gate.."open", param2=node.param2})
end
end
local gate = {}
gate.type = {
{"wood", "Wood", "default_wood.png", "default:wood"},
{"junglewood", "Jungle Wood", "default_junglewood.png", "default:junglewood"},
{"scorched", "Scorched", "scorched_tree.png", "ethereal:scorched_tree"},
{"frostwood", "Frost Wood", "frost_wood.png", "ethereal:frost_wood"},
{"redwood", "Redwood", "redwood_wood.png", "ethereal:redwood_wood"},
{"willow", "Willow", "willow_wood.png", "ethereal:willow_wood"},
{"yellowwood", "Healing Wood", "yellow_wood.png", "ethereal:yellow_wood"},
{"palm", "Palm Wood", "moretrees_palm_wood.png", "ethereal:palm_wood"},
{"banana", "Banana Wood", "banana_wood.png", "ethereal:banana_wood"},
{"mushroom", "Mushroom", "mushroom_trunk.png", "ethereal:mushroom_trunk"},
{"acacia", "Acacia Wood", "moretrees_acacia_wood.png","ethereal:acacia_wood"},
}
for _, row in ipairs(gate.type) do
local name = row[1]
local desc = row[2]
local texture = row[3]
local nod = row[4]
minetest.register_node("ethereal:"..name.."gate_open", {
tiles = {texture},
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
walkable = true,
groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, not_in_inventory = 1},
drop = "ethereal:"..name.."gate_closed",
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.3125, 0.4375, -0.375, 0.3125, 0.5},
{0.375, -0.3125, 0.4375, 0.5, 0.3125, 0.5},
{-0.5, 0.1875, 0.0625, -0.375, 0.3125, 0.4375},
{-0.5, -0.1875, 0.0625, -0.375, -0.3125, 0.4375},
{0.375, 0.1875, 0.0625, 0.5, 0.3125, 0.4375},
{0.375, -0.1875, 0.0625, 0.5, -0.3125, 0.4375},
nb_pil[1], nb_pil[2],
nb_pil[3], nb_pil[4],
nb_gap[1], nb_gap[2],
nb_gap[3], nb_gap[4],
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.3125, -0.0625, -0.375, 0.3125, 0.5},
{0.375, -0.3125, -0.0625, 0.5, 0.3125, 0.5},
}
},
on_rightclick = gate_rightclick,
})
minetest.register_node("ethereal:"..name.."gate_closed", {
description = name.." fence gate",
tiles = {texture},
inventory_image = "default_gate_overlay.png^"..texture.."^default_gate_overlay.png^[makealpha:255,126,126",
wield_image = "default_gate_overlay.png^"..texture.."^default_gate_overlay.png^[makealpha:255,126,126",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
walkable = true,
groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
nb_pil[1], nb_pil[2],
nb_pil[3], nb_pil[4],
{-0.0625, -0.3125, -0.0625, 0.0625, 0.3125, 0.0625},
{-1, 0.1875, -0.0625, 1, 0.3125, 0.0625},
{-1, -0.1875, -0.0625, 1, -0.3125, 0.0625},
}
},
selection_box = {
type = "fixed",
fixed = {{-0.5, -0.3125, -0.0625, 0.5, 0.3125, 0.0625}}
},
on_rightclick = gate_rightclick,
})
-- Fencegate Recipe
minetest.register_craft({
output = "ethereal:"..name.."gate_closed",
recipe = {
{"group:stick", nod, "group:stick"},
{"group:stick", nod, "group:stick"},
}
})
end
init.lua 0 → 100644
--[[
Minetest Ethereal Mod 1.12 (7th November 2014)
Created by ChinChow
Updated by TenPlus1
]]
ethereal = {}
ethereal.mapstyle = 0 -- 0 for spread-style, 1 for layered-style
ethereal.leaftype = 0 -- 0 for 2D plantlike, 1 for 3D allfaces
-- Set following to 1 to enable biome or 0 to disable
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.desertstone = 1 -- Desert stone with smaller cactus
ethereal.quicksand = 1 -- Quicksand banks
ethereal.lake = 1 -- Small sandy lake areas with gravel below
ethereal.plains = 1 -- Dry dirt with scorched trees
ethereal.fiery = 1 -- Red grass with lava craters
ethereal.sandclay = 1 -- Sand areas with clay underneath
if ethereal.mapstyle == 0 then
dofile(minetest.get_modpath("ethereal").."/mapgen_v7s.lua")
else
dofile(minetest.get_modpath("ethereal").."/mapgen_v7l.lua")
end
dofile(minetest.get_modpath("ethereal").."/plantlife.lua")
dofile(minetest.get_modpath("ethereal").."/mushroom.lua")
dofile(minetest.get_modpath("ethereal").."/onion.lua")
dofile(minetest.get_modpath("ethereal").."/crystal.lua")
dofile(minetest.get_modpath("ethereal").."/papyrus.lua")
dofile(minetest.get_modpath("ethereal").."/flowers.lua")
dofile(minetest.get_modpath("ethereal").."/water.lua")
dofile(minetest.get_modpath("ethereal").."/dirt.lua")
dofile(minetest.get_modpath("ethereal").."/leaves.lua")
dofile(minetest.get_modpath("ethereal").."/wood.lua")
dofile(minetest.get_modpath("ethereal").."/sapling.lua")
dofile(minetest.get_modpath("ethereal").."/strawberry.lua")
dofile(minetest.get_modpath("ethereal").."/fishing.lua")
dofile(minetest.get_modpath("ethereal").."/extra.lua")
dofile(minetest.get_modpath("ethereal").."/sealife.lua")
dofile(minetest.get_modpath("ethereal").."/fences.lua")
dofile(minetest.get_modpath("ethereal").."/gates.lua")
--dofile(minetest.get_modpath("ethereal").."/stairs.lua")
-- Xanadu server Only
--dofile(minetest.get_modpath("ethereal").."/plantpack.lua")
-- Leaf style (set in init.lua file)
if ethereal.leaftype == 0 then
leaftype = "plantlike"
else
leaftype = "allfaces_optional"
end
--= Define leaves for ALL trees (and Mushroom Tops)
-- Acacia Leaves
minetest.register_node("ethereal:acacia_leaves", {
description = "Acacia Leaves",
drawtype = leaftype,
tiles = {"moretrees_acacia_leaves.png"},
inventory_image = "moretrees_acacia_leaves.png",
paramtype = "light",
walkable = false,
visual_scale = 1.2,
waving = 1,
groups = {snappy=3, leafdecay=3, leaves=1, flammable=2},
drop = {
max_items = 1,
items = {
{ items = {"ethereal:acacia_sapling"}, rarity = 50},
{ items = {"ethereal:acacia_leaves"}}
}
},
sounds = default.node_sound_leaves_defaults(),
})
-- Willow Twig
minetest.register_node("ethereal:willow_twig", {
description = "Willow Twig",
drawtype = "plantlike",
tiles = {"willow_twig.png"},
inventory_image = "willow_twig.png",
paramtype = "light",
walkable = false,
visual_scale = 1.2,
waving = 1,
groups = {snappy=3, leafdecay=3, leaves=1, flammable=2},
drop = {
max_items = 1,
items = {
{ items = {"ethereal:willow_sapling"}, rarity = 50},
{ items = {"ethereal:willow_twig"}}
}
},
sounds = default.node_sound_leaves_defaults(),
})
-- Redwood leaves
minetest.register_node("ethereal:redwood_leaves", {
description = "Redwood Leaves",
drawtype = leaftype,
visual_scale = 1.2,
tiles = {"redwood_leaves.png"},
inventory_image = "redwood_leaves.png",
paramtype = "light",
walkable = false,
waving = 1,
groups = {snappy=3, leafdecay=3, leaves=1, flammable=2},
drop = {
max_items = 1,
items = {
{ items = {"ethereal:redwood_sapling"}, rarity = 50},
{ items = {"ethereal:redwood_leaves"}}
}
},
sounds = default.node_sound_leaves_defaults(),
})
-- Default Apple Tree Leaves
minetest.register_node(":default:leaves", {
description = "Leaves",
drawtype = leaftype,
visual_scale = 1.2,
tiles = {"default_leaves.png"},
inventory_image = "default_leaves.png",
paramtype = "light",
walkable = false,
waving = 1,
groups = {snappy=3, leafdecay=3, leaves=1, flammable=2},
drop = {
max_items = 1,
items = {
{ items = {"ethereal:tree_sapling"}, rarity = 20},
{ items = {"default:leaves"}}
}
},
sounds = default.node_sound_leaves_defaults(),
})
-- Default Orange Tree Leaves
minetest.register_node("ethereal:orange_leaves", {
description = "Orange Leaves",
drawtype = leaftype,
visual_scale = 1.2,
tiles = {"orange_leaves.png"},
inventory_image = "orange_leaves.png",
paramtype = "light",
walkable = false,
waving = 1,
groups = {snappy=3, leafdecay=3, leaves=1, flammable=2},
drop = {
max_items = 1,
items = {
{ items = {"ethereal:orange_tree_sapling"}, rarity = 20},
{ items = {"ethereal:orange_leaves"}}
}
},
sounds = default.node_sound_leaves_defaults(),
})
-- Default Jungle Tree Leaves
minetest.register_node(":default:jungleleaves", {
description = "Jungle Leaves",
drawtype = leaftype,
visual_scale = 1.2,
tiles = {"default_jungleleaves.png"},
inventory_image = "default_jungleleaves.png",
paramtype = "light",
walkable = false,
waving = 1,
groups = {snappy=3, leafdecay=3, leaves=1, flammable=2},
drop = {
max_items = 1,
items = {
{ items = {"ethereal:jungle_tree_sapling"}, rarity = 20},
{ items = {"default:jungleleaves"}}
}
},
sounds = default.node_sound_leaves_defaults(),
})
-- Default Banana Tree Leaves
minetest.register_node("ethereal:bananaleaves", {
description = "Banana Leaves",
drawtype = leaftype,
visual_scale = 1.2,
tiles = {"banana_leaf.png"},
inventory_image = "banana_leaf.png",
paramtype = "light",
walkable = false,
waving = 1,
groups = {snappy=3, leafdecay=3, leaves=1, flammable=2},
drop = {
max_items = 1,
items = {
{ items = {"ethereal:banana_tree_sapling"}, rarity = 20},
{ items = {"ethereal:bananaleaves"}}
}
},
sounds = default.node_sound_leaves_defaults(),
})
-- Healing Tree Leaves
minetest.register_node("ethereal:yellowleaves", {
description = "Healing Tree Leaves",
drawtype = leaftype,
visual_scale = 1.2,
tiles = {"yellow_leaves.png"},
inventory_image = "yellow_leaves.png",
paramtype = "light",
walkable = false,
waving = 1,
groups = {snappy=3, leafdecay=3, leaves=1},
drop = {
max_items = 1,
items = {
{ items = {"ethereal:yellow_tree_sapling"}, rarity = 50},
{ items = {"ethereal:yellowleaves"}}
}
},
-- Leaves are edible, heal half a heart
on_use = minetest.item_eat(1),
sounds = default.node_sound_leaves_defaults(),
light_source = 9,
})
-- Palm Tree Leaves
minetest.register_node("ethereal:palmleaves", {
description = "Palm Leaves",
drawtype = leaftype,
visual_scale = 1.2,
tiles = {"moretrees_palm_leaves.png"},
inventory_image = "moretrees_palm_leaves.png",
paramtype = "light",
walkable = false,
waving = 1,
groups = {snappy=3, leafdecay=3, leaves=1, flammable=2},
drop = {
max_items = 1,
items = {
{ items = {"ethereal:palm_sapling"}, rarity = 20},
{ items = {"ethereal:palmleaves"}}
}
},
sounds = default.node_sound_leaves_defaults(),
})
-- Pine Tree Leaves
minetest.register_node("ethereal:pineleaves", {
description = "Pine Needles",
drawtype = leaftype,
visual_scale = 1.2,
tiles = {"pine_leaves.png"},
inventory_image = "pine_leaves.png",
paramtype = "light",
walkable = false,
waving = 1,
groups = {snappy=3, leafdecay=3, leaves=1, flammable=2},
drop = {
max_items = 1,
items = {
{ items = {"ethereal:pine_tree_sapling"}, rarity = 20},
{ items = {"ethereal:pine_nuts"}, rarity = 5},
{ items = {"ethereal:pineleaves"},}
}
},
sounds = default.node_sound_leaves_defaults(),
})
-- Frost Tree Leaves
minetest.register_node("ethereal:frost_leaves", {
description = "Frost Leaves",
drawtype = leaftype,
visual_scale = 1.2,
tiles = {"ethereal_frost_leaves.png"},
inventory_image = "ethereal_frost_leaves.png",
paramtype = "light",
walkable = false,
waving = 1,
groups = {snappy=3, leafdecay=3, puts_out_fire=1},
drop = {
max_items = 1,
items = {
{ items = {"ethereal:frost_tree_sapling"}, rarity = 20},
{ items = {"ethereal:frost_leaves"}}
}
},
light_source = 9,
sounds = default.node_sound_leaves_defaults(),
})
-- Mushroom Tops
minetest.register_node("ethereal:mushroom", {
description = "Mushroom Cap",
tiles = {"mushroom_block.png"},
groups = {choppy=2, oddly_breakable_by_hand=1, flammable=2},
drop = {
max_items = 1,
items = {
{ items = {"ethereal:mushroom_sapling"}, rarity = 20},
{ items = {"ethereal:mushroom"}}
}
},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_craft({
type = "fuel",
recipe = "ethereal:mushroom",
burntime = 10,
})
-- Mushroom Pore (Spongelike block inside mushrooms that has special properties)
minetest.register_node("ethereal:mushroom_pore", {
description = "Mushroom Pore",
tiles = {"mushroom_pore.png"},
groups = {snappy=3,cracky=3,choppy=3,oddly_breakable_by_hand=3,disable_jump=1, fall_damage_add_percent=-100},
sounds = default.node_sound_dirt_defaults(),
})
This diff is collapsed.
-- Disable Ridges (NOTE: changed sidelen from 16 to 80 in all decoration)
minetest.register_on_mapgen_init(function(mapgen_params)
mapgen_params.flags = "nov7_ridges"
minetest.set_mapgen_params(mapgen_params)
end)
-- Warm Biome
minetest.register_biome({
name = "clay",
node_top = "default:sand", depth_top = 3,
node_filler = "default:clay", depth_filler = 2,
height_min = 1, height_max = 11,
heat_point = 65.0, humidity_point = 2.0,
})
minetest.register_biome({
name = "lake",
node_top = "default:sand", depth_top = 2,
node_filler = "default:gravel", depth_filler = 1,
node_water = "default:water_source", node_dust_water= "default:water_source",
height_min = -31000, height_max = 3,
heat_point = 50, humidity_point = 40,
})
minetest.register_biome({
name = "quicksand",
node_top = "ethereal:quicksand2", depth_top = 3,
node_filler = "default:gravel", depth_filler = 1,
height_min = 1, height_max = 1,
heat_point = 50, humidity_point = 38,
})
minetest.register_biome({
name = "grass",
node_top = "ethereal:green_dirt", depth_top = 1,
node_filler = "default:dirt", depth_filler = 3,
height_min = 1, height_max = 20,
heat_point = 10.0, humidity_point = 40.0,
})
minetest.register_biome({
name = "prairie",
node_top = "ethereal:prairie_dirt", depth_top = 1,
node_filler = "default:dirt", depth_filler = 3,
height_min = 21, height_max = 40,
heat_point = 10.0, humidity_point = 40.0,
})
minetest.register_biome({
name = "cold",
node_top = "ethereal:cold_dirt", depth_top = 1,
node_filler = "default:dirt", depth_filler = 3,
height_min = 41, height_max = 60,
heat_point = 10.0, humidity_point = 40.0,
})
minetest.register_biome({
name = "snow",
node_top = "default:dirt_with_snow", depth_top = 1,
node_filler = "default:dirt", depth_filler = 3,
height_min = 61, height_max = 80,
heat_point = 10.0, humidity_point = 40.0,
})
minetest.register_biome({
name = "alpine",
node_top = "default:snowblock", depth_top = 1,
node_filler = "default:dirt_with_snow", depth_filler = 1,
height_min = 81, height_max = 120,
heat_point = 10.0, humidity_point = 40.0,
})
-- Cold Biome
minetest.register_biome({
name = "ice",
node_top = "default:ice", depth_top = 1,
node_filler = "default:water_source", depth_filler = 1,
height_min = 1, height_max = 1,
heat_point = 5.0, humidity_point = 30.0,
})
minetest.register_biome({
name = "gray",
node_top = "ethereal:gray_dirt ", depth_top = 1,
node_filler = "default:dirt", depth_filler = 3,
height_min = 1, height_max = 30,
heat_point = 15.0, humidity_point = 30.0,
})
minetest.register_biome({
name = "frost",
node_top = "ethereal:crystal_dirt", depth_top = 1,
node_filler = "default:dirt", depth_filler = 3,
height_min = 31, height_max = 60,
heat_point = 15.0, humidity_point = 30.0,
})
minetest.register_biome({
name = "cold2",
node_top = "ethereal:cold_dirt", depth_top = 1,
node_filler = "default:dirt", depth_filler = 3,
height_min = 61, height_max = 90,
heat_point = 15.0, humidity_point = 30.0,
})
minetest.register_biome({
name = "healing",
node_top = "default:dirt_with_snow", depth_top = 1,
node_filler = "default:dirt", depth_filler = 3,
height_min = 91, height_max = 120,
heat_point = 15.0, humidity_point = 30.0,
})
-- Humid Biome
minetest.register_biome({
name = "jungle",
node_top = "ethereal:jungle_dirt", depth_top = 1,
node_filler = "default:dirt", depth_filler = 3,
height_min = 1, height_max = 20,
heat_point = 40.0, humidity_point = 60.0,
})
minetest.register_biome({
name = "bamboo",
node_top = "ethereal:bamboo_dirt", depth_top = 1,
node_filler = "default:dirt", depth_filler = 3,
height_min = 21, height_max = 40,
heat_point = 40.0, humidity_point = 60.0,
})
minetest.register_biome({
name = "mushroom",
node_top = "ethereal:mushroom_dirt", depth_top = 1,
node_filler = "default:dirt", depth_filler = 3,
height_min = 41, height_max = 60,
heat_point = 40.0, humidity_point = 60.0,
})
minetest.register_biome({
name = "grove",
node_top = "ethereal:grove_dirt", depth_top = 1,
node_filler = "default:dirt", depth_filler = 3,
height_min = 61, height_max = 100,
heat_point = 40.0, humidity_point = 60.0,
})
-- Hot Biomes
minetest.register_biome({
name = "plains",
node_top = "ethereal:dry_dirt", depth_top = 1,
node_filler = "default:dirt", depth_filler = 3,
height_min = 4, height_max = 36,
heat_point = 59.0, humidity_point = 25.0,
})
minetest.register_biome({
name = "fiery",
node_top = "ethereal:fiery_dirt", depth_top = 1,
node_filler = "default:dirt", depth_filler = 3,
height_min = 16, height_max = 35,
heat_point = 60.0, humidity_point = 25.0,
})
minetest.register_biome({
name = "desertstone",
node_top = "default:sandstone", depth_top = 3,
node_filler = "default:desert_stone", depth_filler = 70,
height_min = 36, height_max = 50,
heat_point = 60.0, humidity_point = 25.0,
})
minetest.register_biome({
name = "desert",
node_top = "default:desert_sand", depth_top = 5,
node_filler = "default:desert_stone", depth_filler = 70,
height_min = 51, height_max = 80,
heat_point = 60.0, humidity_point = 25.0,
})
-- Caves and Mesa
minetest.register_biome({
name = "mesa",
node_top = "bakedclay:red", depth_top = 1,
node_filler = "bakedclay:orange", depth_filler = 5,
height_min = 1, height_max = 40,
heat_point = 15.0, humidity_point = 20.0,
})
minetest.register_biome({
name = "caves",
node_top = "default:desert_stone", depth_top = 3,
node_filler = "air", depth_filler = 8,
height_min = 41, height_max = 60,
heat_point = 15.0, humidity_point = 20.0,
})
-- Schematics
local path = minetest.get_modpath("ethereal").."/schematics/"
minetest.register_decoration({ -- Acacia Tree
deco_type = "schematic",
place_on = {"default:desert_sand"},
sidelen = 16,
fill_ratio = 0.004,
biomes = {"desert"},
schematic = path.."acaciatree.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Redwood Tree
deco_type = "schematic",
place_on = {"bakedclay:red","bakedclay:orange"},
sidelen = 80,
fill_ratio = 0.025,
biomes = {"mesa"},
schematic = path.."redwood.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Pine Tree
deco_type = "schematic",
place_on = {"ethereal:cold_dirt", "default:dirt_with_snow"},
sidelen = 80,
fill_ratio = 0.025,
biomes = {"snow", "cold", "cold2"},
schematic = path.."pinetree.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Apple Tree
deco_type = "schematic",
place_on = "ethereal:green_dirt",
sidelen = 80,
fill_ratio = 0.030,
biomes = {"grass"},
schematic = path.."tree.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Orange Tree
deco_type = "schematic",
place_on = {"ethereal:prairie_dirt"},
sidelen = 80,
fill_ratio = 0.005,
biomes = {"prairie"},
schematic = path.."orangetree.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Big Old Tree
deco_type = "schematic",
place_on = "ethereal:green_dirt",
sidelen = 80,
fill_ratio = 0.010,
biomes = {"grass"},
schematic = path.."bigtree.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Willow Tree
deco_type = "schematic",
place_on = "ethereal:gray_dirt",
sidelen = 80,
fill_ratio = 0.025,
biomes = {"gray"},
schematic = path.."willow.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Healing Tree
deco_type = "schematic",
place_on = "default:dirt_with_snow",
sidelen = 80,
fill_ratio = 0.04,
biomes = {"healing"},
schematic = path.."yellowtree.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Frost Tree
deco_type = "schematic",
place_on = "ethereal:crystal_dirt",
sidelen = 80,
fill_ratio = 0.010,
biomes = {"frost"},
schematic = path.."frosttrees.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Jungle Tree
deco_type = "schematic",
place_on = "ethereal:jungle_dirt",
sidelen = 80,
fill_ratio = 0.3,
biomes = {"jungle"},
schematic = path.."jungletree.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Banana Tree
deco_type = "schematic",
place_on = "ethereal:grove_dirt",
sidelen = 80,
fill_ratio = 0.015,
biomes = {"grove"},
schematic = path.."bananatree.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Giant Mushroom
deco_type = "schematic",
place_on = "ethereal:mushroom_dirt",
sidelen = 80,
fill_ratio = 0.070,
biomes = {"mushroom"},
schematic = path.."mushroomone.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Small Lava Crater
deco_type = "schematic",
place_on = "ethereal:fiery_dirt",
sidelen = 80,
fill_ratio = 0.012,
biomes = {"fiery"},
schematic = path.."volcanom.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Large Lava Crater
deco_type = "schematic",
place_on = "ethereal:fiery_dirt",
sidelen = 80,
fill_ratio = 0.010,
biomes = {"fiery"},
schematic = path.."volcanol.mts",
flags = "place_center_x, place_center_z",
-- replacements = {{"default:stone", "default:desert_stone"}},
})
minetest.register_decoration({ -- Scorched Tree
deco_type = "simple",
place_on = "ethereal:dry_dirt",
sidelen = 80,
fill_ratio = 0.006,
biomes = {"plains", "plains2"},
decoration = "ethereal:scorched_tree",
height_max = 6,
})
-- Decoration
minetest.register_decoration({ -- Bamboo Stalks
deco_type = "simple",
place_on = "ethereal:bamboo_dirt",
sidelen = 80,
fill_ratio = 0.055,
biomes = {"bamboo"},
decoration = "ethereal:bamboo",
height_max = 5,
})
minetest.register_decoration({ -- Bamboo Sprouts and Grass for filler
deco_type = "simple",
place_on = "ethereal:bamboo_dirt",
sidelen = 80,
fill_ratio = 0.25,
biomes = {"bamboo"},
decoration = {"ethereal:bamboo_sprout", "default:grass_2", "default:grass_3"},
})
minetest.register_decoration({ -- Dry Shrub
deco_type = "simple",
place_on = {"default:sand", "bakedclay:red"},
sidelen = 80,
fill_ratio = 0.015,
biomes = {"lake", "clay", "mesa"},
decoration = "default:dry_shrub",
})
minetest.register_decoration({ -- Grass
deco_type = "simple",
place_on = {"ethereal:green_dirt", "ethereal:prairie_dirt", "ethereal:jungle_dirt", "ethereal:grove_dirt"},
sidelen = 80,
fill_ratio = 0.40,
biomes = {"grass", "prairie", "cold", "cold2", "jungle", "grove"},
decoration = "default:grass_2", "default:grass_3", "default:grass_4", "default:grass_5",
})
minetest.register_decoration({ -- Flowers
deco_type = "simple",
place_on = "ethereal:green_dirt",
sidelen = 80,
fill_ratio = 0.030,
biomes = {"grass"},
decoration = {"flowers:dandelion_white", "flowers:dandelion_yellow", "flowers:geranium", "flowers:rose", "flowers:tulip", "flowers:viola"},
})
minetest.register_decoration({ -- Flowers & Strawberry
deco_type = "simple",
place_on = "ethereal:prairie_dirt",
sidelen = 80,
fill_ratio = 0.050,
biomes = {"prairie"},
decoration = {"flowers:dandelion_white", "flowers:dandelion_yellow", "flowers:geranium", "flowers:rose", "flowers:tulip", "flowers:viola", "ethereal:strawberry_7"},
})
minetest.register_decoration({ -- Wild Onions
deco_type = "simple",
place_on = {"ethereal:green_dirt", "ethereal:prairie_dirt"},
sidelen = 80,
fill_ratio = 0.25,
biomes = {"grass", "prairie"},
decoration = "ethereal:onion_4",
})
minetest.register_decoration({ -- Snowy Grass
deco_type = "simple",
place_on = {"ethereal:cold_dirt", "default:dirt_with_snow", "ethereal:gray_dirt_top"},
sidelen = 80,
fill_ratio = 0.05,
biomes = {"cold", "cold2", "snow", "gray"},
decoration = "ethereal:snowygrass",
})
minetest.register_decoration({ -- Snow
deco_type = "simple",
place_on = {"ethereal:cold_dirt", "default:dirt_with_snow", "default:snowblock"},
sidelen = 80,
fill_ratio = 0.80,
biomes = {"cold", "cold2", "snow", "alpine"},
decoration = "default:snow",
})
minetest.register_decoration({ -- Crystal Spike & Grass
deco_type = "simple",
place_on = "ethereal:crystal_dirt",
sidelen = 80,
fill_ratio = 0.02,
biomes = {"frost"},
decoration = {"ethereal:crystal_spike", "ethereal:crystalgrass"},
})
minetest.register_decoration({ -- Wild Mushroom
deco_type = "simple",
place_on = "ethereal:mushroom_dirt",
sidelen = 80,
fill_ratio = 0.015,
biomes = {"mushroom"},
decoration = "ethereal:mushroom_plant",
})
minetest.register_decoration({ -- Jungle Grass
deco_type = "simple",
place_on = {"ethereal:jungle_dirt"},
sidelen = 80,
fill_ratio = 0.18,
biomes = {"jungle"},
decoration = "default:junglegrass",
})
minetest.register_decoration({ -- Ferns
deco_type = "simple",
place_on = "ethereal:grove_dirt",
sidelen = 80,
fill_ratio = 0.20,
biomes = {"grove"},
decoration = "ethereal:fern",
})
minetest.register_decoration({ -- Red Shrub
deco_type = "simple",
place_on = "ethereal:fiery_dirt",
sidelen = 80,
fill_ratio = 0.20,
biomes = {"fiery"},
decoration = "ethereal:dry_shrub",
})
minetest.register_decoration({ -- Cactus
deco_type = "simple",
place_on = "default:sandstone",
sidelen = 80,
fill_ratio = 0.010,
biomes = {"desertstone"},
decoration = "default:cactus",
height_max = 3,
})
minetest.register_decoration({ -- Papyrus
deco_type = "simple",
place_on = {"ethereal:green_dirt", "ethereal:jungle_dirt"},
sidelen = 16,
fill_ratio = 0.1,
biomes = {"grass", "jungle"},
decoration = "default:papyrus",
height_max = 4,
spawn_by = "default:water_source",
num_spawn_by = 1,
})
-- Palm Tree on Sand near Water
minetest.register_on_generated(function(minp, maxp, seed)
if maxp.y >= 2 and minp.y <= 0 then
local perlin1 = minetest.get_perlin(354, 3, 0.7, 100)
-- Assume X and Z lengths are equal
local divlen = 8
local divs = (maxp.x-minp.x)/divlen+1;
for divx=0,divs-1 do
for divz=0,divs-1 do
local x0 = minp.x + math.floor((divx+0)*divlen)
local z0 = minp.z + math.floor((divz+0)*divlen)
local x1 = minp.x + math.floor((divx+1)*divlen)
local z1 = minp.z + math.floor((divz+1)*divlen)
-- Find random positions for palm based on this random
local pr = PseudoRandom(seed+1)
local x = pr:next(x0, x1)
local z = pr:next(z0, z1)
if minetest.get_node({x=x,y=1,z=z}).name == "default:sand" and
minetest.find_node_near({x=x,y=1,z=z}, 1, "default:water_source") then
schematic = path.."palmtree.mts"
minetest.place_schematic({x=x-4,y=2,z=z-4}, schematic, 0, "", 0)
end
end
end
end
end)
-- Farming Redo Plants
if minetest.get_modpath("farming") and farming.mod == "redo" then
minetest.register_decoration({ -- Potato
deco_type = "simple",
place_on = {"ethereal:jungle_dirt"},
sidelen = 80,
fill_ratio = 0.045,
biomes = {"jungle"},
decoration = "farming:potato_3",
})
minetest.register_decoration({ -- Carrot, Cucumber, Potato, Tomato, Corn, Coffee, Raspberry, Rhubarb
deco_type = "simple",
place_on = {"ethereal:green_dirt", "ethereal:prairie_dirt"},
sidelen = 80,
fill_ratio = 0.05,
biomes = {"grass", "prairie"},
decoration = {"farming:carrot_7", "farming:cucumber_4", "farming:potato_3", "farming:tomato_7", "farming:corn_8", "farming:coffee_5", "farming:raspberry_4", "farming:rhubarb_3", "farming:blueberry_4"},
})
minetest.register_decoration({ -- Melon, Pumpkin
deco_type = "simple",
place_on = {"default:green_dirt", "ethereal:jungle_dirt"},
sidelen = 80,
fill_ratio = 0.015,
biomes = {"grass", "jungle"},
decoration = {"farming:melon_8", "farming:pumpkin_8"},
spawn_by = "default:water_source",
num_spawn_by = 1,
})
end
-- Biomes
if ethereal.bamboo == 1 then
minetest.register_biome({
name = "bamboo",
node_top = "ethereal:bamboo_dirt", depth_top = 1,
node_filler = "default:dirt", depth_filler = 5,
height_min = 1, height_max = 71,
heat_point = 45.0, humidity_point = 75.0,
})
end
if ethereal.mesa == 1 then
minetest.register_biome({
name = "mesa",
node_top = "bakedclay:red", depth_top = 1,
node_filler = "bakedclay:orange", depth_filler = 5,
height_min = 2, height_max = 71,
heat_point = 25.0, humidity_point = 28.0,
})
end
if ethereal.alpine == 1 then
minetest.register_biome({
name = "alpine",
node_top = "default:dirt_with_snow", depth_top = 1,
node_filler = "default:dirt", depth_filler = 2,
height_min = 40, height_max = 90,
heat_point = 10.0, humidity_point = 40.0,
})
end
if ethereal.healing == 1 then
minetest.register_biome({
name = "healing",
node_top = "default:dirt_with_snow", depth_top = 1,
node_filler = "default:dirt", depth_filler = 2,
height_min = 75, height_max = 140,
heat_point = 10.0, humidity_point = 40.0,
})
end
if ethereal.snowy == 1 then
minetest.register_biome({
name = "snowy",
node_top = "ethereal:cold_dirt", depth_top = 1,
node_filler = "default:dirt", depth_filler = 2,
height_min = 5, height_max = 40,
heat_point = 10.0, humidity_point = 40.0,
})
end
if ethereal.frost == 1 then
minetest.register_biome({
name = "frost",
node_top = "ethereal:crystal_dirt", depth_top = 1,
node_filler = "default:dirt", depth_filler = 5,
height_min = 1, height_max = 71,
heat_point = 10.0, humidity_point = 40.0,
})
end
if ethereal.grassy == 1 then
minetest.register_biome({
name = "grassy",
node_top = "ethereal:green_dirt", depth_top = 1,
node_filler = "default:dirt", depth_filler = 5,
height_min = 1, height_max = 91,
heat_point = 13.0, humidity_point = 40.0,
})
end
if ethereal.caves == 1 then
minetest.register_biome({
name = "caves",
node_top = "default:desert_stone", depth_top = 3,
node_filler = "air", depth_filler = 8,
height_min = 4, height_max = 41,
heat_point = 15.0, humidity_point = 25.0,
})
end
if ethereal.grayness == 1 then
minetest.register_biome({
name = "grayness",
node_top = "ethereal:gray_dirt", depth_top = 1,
node_filler = "default:dirt", depth_filler = 5,
height_min = 1, height_max = 41,
heat_point = 15.0, humidity_point = 30.0,
})
end
if ethereal.grassytwo == 1 then
minetest.register_biome({
name = "grassytwo",
node_top = "ethereal:green_dirt", depth_top = 1,
node_filler = "default:dirt", depth_filler = 5,
height_min = 1, height_max = 91,
heat_point = 15.0, humidity_point = 40.0,
})
end
if ethereal.prairie == 1 then
minetest.register_biome({
name = "prairie",
node_top = "ethereal:prairie_dirt", depth_top = 1,
node_filler = "default:dirt", depth_filler = 5,
height_min = 3, height_max = 26,
heat_point = 20.0, humidity_point = 40.0,
})
end
if ethereal.jumble == 1 then
minetest.register_biome({
name = "jumble",
node_top = "ethereal:green_dirt", depth_top = 1,
node_filler = "default:dirt", depth_filler = 5,
height_min = 1, height_max = 71,
heat_point = 25.0, humidity_point = 50.0,
})
end
if ethereal.junglee == 1 then
minetest.register_biome({
name = "junglee",
node_top = "ethereal:jungle_dirt", depth_top = 1,
node_filler = "default:dirt", depth_filler = 5,
height_min = 1, height_max = 71,
heat_point = 30.0, humidity_point = 60.0,
})
end
if ethereal.desert ==1 then
minetest.register_biome({
name = "desert",
node_top = "default:desert_sand", depth_top = 5,
node_filler = "default:desert_stone", depth_filler = 70,
height_min = 3, height_max = 23,
heat_point = 35.0, humidity_point = 20.0,
})
end
if ethereal.grove == 1 then
minetest.register_biome({
name = "grove",
node_top = "ethereal:grove_dirt", depth_top = 1,
node_filler = "default:dirt", depth_filler = 5,
height_min = 3, height_max = 23,
heat_point = 40.0, humidity_point = 60.0,
})
end
if ethereal.mushroom == 1 then
minetest.register_biome({
name = "mushroom",
node_top = "ethereal:mushroom_dirt", depth_top = 1,
node_filler = "default:dirt", depth_filler = 5,
height_min = 1, height_max = 50,
heat_point = 45.0, humidity_point = 65.0,
})
end
if ethereal.desertstone == 1 then
minetest.register_biome({
name = "desertstone",
node_top = "default:sandstone", depth_top = 7,
node_filler = "default:desert_stone", depth_filler = 70,
height_min = 3, height_max = 23,
heat_point = 50.0, humidity_point = 20.0,
})
end
if ethereal.quicksand == 1 then
minetest.register_biome({
name = "quicksand",
node_top = "ethereal:quicksand2", depth_top = 3,
node_filler = "default:gravel", depth_filler = 1,
height_min = 1, height_max = 1,
heat_point = 50, humidity_point = 38,
})
end
if ethereal.lake == 1 then
minetest.register_biome({
name = "lake",
node_top = "default:sand", depth_top = 2,
node_filler = "default:gravel", depth_filler = 1,
node_water = "default:water_source", node_dust_water= "default:water_source",
height_min = -31000, height_max = 3,
heat_point = 50, humidity_point = 40,
})
end
if ethereal.plains == 1 then
minetest.register_biome({
name = "plains",
node_top = "ethereal:dry_dirt", depth_top = 1,
node_filler = "default:dirt", depth_filler = 5,
height_min = 3, height_max = 61,
heat_point = 55.0, humidity_point = 25.0,
})
end
if ethereal.fiery == 1 then
minetest.register_biome({
name = "fiery",
node_top = "ethereal:fiery_dirt", depth_top = 1,
node_filler = "default:dirt", depth_filler = 5,
height_min = 5, height_max = 65,
heat_point = 80.0, humidity_point = 10.0,
})
end
if ethereal.sandclay == 1 then
minetest.register_biome({
name = "sandclay",
node_top = "default:sand", depth_top = 3,
node_filler = "default:clay", depth_filler = 2,
height_min = 1, height_max = 11,
heat_point = 65.0, humidity_point = 2.0,
})
end
-- Schematics Decoration
local path = minetest.get_modpath("ethereal").."/schematics/"
minetest.register_decoration({ -- Redwood Tree
deco_type = "schematic",
place_on = {"bakedclay:red","bakedclay:orange"},
sidelen = 16,
fill_ratio = 0.01, -- was 0.025
biomes = {"mesa"},
schematic = path.."redwood.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Banana Tree
deco_type = "schematic",
place_on = "ethereal:grove_dirt",
sidelen = 16,
fill_ratio = 0.015,
biomes = {"grove"},
schematic = path.."bananatree.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Healing Tree
deco_type = "schematic",
place_on = "default:dirt_with_snow",
sidelen = 16,
fill_ratio = 0.04,
biomes = {"healing"},
schematic = path.."yellowtree.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Frost Tree
deco_type = "schematic",
place_on = "ethereal:crystal_dirt",
sidelen = 16,
fill_ratio = 0.010,
biomes = {"frost"},
schematic = path.."frosttrees.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Giant Mushroom
deco_type = "schematic",
place_on = "ethereal:mushroom_dirt",
sidelen = 16,
fill_ratio = 0.070,
biomes = {"mushroom"},
schematic = path.."mushroomone.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Small Lava Crater
deco_type = "schematic",
place_on = "ethereal:fiery_dirt",
sidelen = 16,
fill_ratio = 0.012,
biomes = {"fiery"},
schematic = path.."volcanom.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Large Lava Crater
deco_type = "schematic",
place_on = "ethereal:fiery_dirt",
sidelen = 16,
fill_ratio = 0.010,
biomes = {"fiery"},
schematic = path.."volcanol.mts",
flags = "place_center_x, place_center_z",
-- replacements = {{"default:stone", "default:desert_stone"}},
})
minetest.register_decoration({ -- Jungle Tree
deco_type = "schematic",
place_on = "ethereal:jungle_dirt",
sidelen = 16,
fill_ratio = 0.3, -- was 0.250
biomes = {"junglee"},
schematic = path.."jungletree.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Willow Tree
deco_type = "schematic",
place_on = "ethereal:gray_dirt",
sidelen = 16,
fill_ratio = 0.025,
biomes = {"grayness"},
schematic = path.."willow.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Pine Tree
deco_type = "schematic",
place_on = {"ethereal:cold_dirt", "default:dirt_with_snow"},
sidelen = 16,
fill_ratio = 0.025,
biomes = {"snowy", "alpine"},
schematic = path.."pinetree.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Apple Tree
deco_type = "schematic",
place_on = "ethereal:green_dirt",
sidelen = 16,
fill_ratio = 0.030,
biomes = {"grassy, jumble"},
schematic = path.."tree.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"ethereal:green_dirt"},
sidelen = 16,
fill_ratio = 0.005,
biomes = {"grassytwo"},
schematic = path.."tree.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Orange Tree
deco_type = "schematic",
place_on = {"ethereal:prairie_dirt"},
sidelen = 16,
fill_ratio = 0.005,
biomes = {"prairie"},
schematic = path.."orangetree.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Acacia Tree
deco_type = "schematic",
place_on = {"default:desert_sand"},
sidelen = 16,
fill_ratio = 0.004,
biomes = {"desert"},
schematic = path.."acaciatree.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Big Old Tree
deco_type = "schematic",
place_on = "ethereal:green_dirt",
sidelen = 16,
fill_ratio = 0.010,
biomes = {"grassytwo"},
schematic = path.."bigtree.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({ -- Old Rail Section
deco_type = "schematic",
place_on = "default:sandstone",
sidelen = 16,
fill_ratio = 0.002,
biomes = {"desertsandstone"},
schematic = path.."rail.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = "default:sandstone",
sidelen = 16,
fill_ratio = 0.002,
biomes = {"desertsandstone"},
schematic = path.."railtwo.mts",
flags = "place_center_x, place_center_z",
})
-- Simple Decoration
minetest.register_decoration({ -- Scorched Tree
deco_type = "simple",
place_on = "ethereal:dry_dirt",
sidelen = 16,
fill_ratio = 0.006,
biomes = {"plains"},
decoration = "ethereal:scorched_tree",
height_max = 6,
})
minetest.register_decoration({ -- Bamboo Stalks
deco_type = "simple",
place_on = "ethereal:bamboo_dirt",
sidelen = 16,
fill_ratio = 0.055,
biomes = {"bamboo"},
decoration = "ethereal:bamboo",
height_max = 5,
})
minetest.register_decoration({ -- Bamboo Sprouts & Grass
deco_type = "simple",
place_on = "ethereal:bamboo_dirt",
sidelen = 16,
fill_ratio = 0.25,
biomes = {"bamboo"},
decoration = {"ethereal:bamboo_sprout", "default:grass_2", "default:grass_3"},
})
minetest.register_decoration({ -- Dry Shrub
deco_type = "simple",
place_on = {"ethereal:dry_dirt", "default:sand", "default:desert_sand", "sandstone", "bakedclay:red"},
sidelen = 16,
fill_ratio = 0.015,
biomes = {"plains", "lake", "desert", "desertstone", "mesa"},
decoration = "default:dry_shrub",
})
minetest.register_decoration({ -- Flowers & Strawberry
deco_type = "simple",
place_on = "ethereal:green_dirt",
sidelen = 16,
fill_ratio = 0.030,
biomes = {"grassy", "grassy", "grassytwo"},
decoration = {"flowers:dandelion_white", "flowers:dandelion_yellow", "flowers:geranium", "flowers:rose", "flowers:tulip", "flowers:viola", "ethereal:strawberry_7"},
})
minetest.register_decoration({ -- Prairie Flowers & Strawberry
deco_type = "simple",
place_on = "ethereal:prairie_dirt",
sidelen = 16,
fill_ratio = 0.050,
biomes = {"prairie"},
decoration = {"flowers:dandelion_white", "flowers:dandelion_yellow", "flowers:geranium", "flowers:rose", "flowers:tulip", "flowers:viola", "ethereal:strawberry_7"},
})
minetest.register_decoration({ -- Crystal Spike & Crystal Grass
deco_type = "simple",
place_on = "ethereal:crystal_dirt",
sidelen = 16,
fill_ratio = 0.02,
biomes = {"frost"},
decoration = {"ethereal:crystal_spike", "ethereal:crystalgrass"},
})
minetest.register_decoration({ -- Red Shrub
deco_type = "simple",
place_on = "ethereal:fiery_dirt",
sidelen = 16,
fill_ratio = 0.20,
biomes = {"fiery"},
decoration = "ethereal:dry_shrub",
})
minetest.register_decoration({ -- Snowy Grass
deco_type = "simple",
place_on = {"ethereal:gray_dirt", "ethereal:cold_dirt"},
sidelen = 16,
fill_ratio = 0.05,
biomes = {"grayness", "snowy"},
decoration = "ethereal:snowygrass",
})
minetest.register_decoration({ -- Cactus
deco_type = "simple",
place_on = "default:sandstone",
sidelen = 16,
fill_ratio = 0.010,
biomes = {"desertstone"},
decoration = "default:cactus",
height_max = 3,
})
minetest.register_decoration({ -- Wild Mushroom
deco_type = "simple",
place_on = "ethereal:mushroom_dirt",
sidelen = 16,
fill_ratio = 0.015,
biomes = {"mushroom"},
decoration = "ethereal:mushroom_plant",
})
minetest.register_decoration({ -- Jungle Grass
deco_type = "simple",
place_on = {"ethereal:jungle_dirt", "ethereal:green_dirt"},
sidelen = 16,
fill_ratio = 0.18,
biomes = {"junglee", "jumble"},
decoration = "default:junglegrass",
})
minetest.register_decoration({ -- Grass
deco_type = "simple",
place_on = {"ethereal:green_dirt_top", "ethereal:jungle_dirt", "ethereal:prairie_dirt", "ethereal:grove_dirt"},
sidelen = 16,
fill_ratio = 0.40, -- was 0.50
biomes = {"grassy", "grassytwo", "jumble", "junglee", "prairie", "grove"},
decoration = "default:grass_2", "default:grass_3", "default:grass_4", "default:grass_5",
})
minetest.register_decoration({ -- Ferns
deco_type = "simple",
place_on = "ethereal:grove_dirt",
sidelen = 16,
fill_ratio = 0.20,
biomes = {"grove"},
decoration = "ethereal:fern",
})
minetest.register_decoration({ -- Snow
deco_type = "simple",
place_on = {"ethereal:cold_dirt", "default:dirt_with_snow"},
sidelen = 16,
fill_ratio = 0.80,
biomes = {"snowy", "alpine"},
decoration = "default:snow",
})
minetest.register_decoration({ -- Wild Onion
deco_type = "simple",
place_on = {"ethereal:green_dirt", "ethereal:prairie_dirt"},
sidelen = 16,
fill_ratio = 0.25, -- was 0.35
biomes = {"grassy", "grassytwo", "jumble", "prairie"},
decoration = "ethereal:onion_4",
})
minetest.register_decoration({ -- Papyrus
deco_type = "simple",
place_on = {"ethereal:green_dirt", "ethereal:jungle_dirt"},
sidelen = 16,
fill_ratio = 0.1,
biomes = {"grassy", "junglee"},
decoration = "default:papyrus",
height_max = 4,
spawn_by = "default:water_source",
num_spawn_by = 1,
})
-- Palm Tree on Sand next to Water
minetest.register_on_generated(function(minp, maxp, seed)
--if maxp.y >= 2 and minp.y <= 0 then -- orig
if maxp.y > 1 and minp.y < 1 then -- new
local perlin1 = minetest.get_perlin(354, 3, 0.7, 100)
-- Assume X and Z lengths are equal
local divlen = 8
local divs = (maxp.x-minp.x)/divlen+1;
for divx=0,divs-1 do
for divz=0,divs-1 do
local x0 = minp.x + math.floor((divx+0)*divlen)
local z0 = minp.z + math.floor((divz+0)*divlen)
local x1 = minp.x + math.floor((divx+1)*divlen)
local z1 = minp.z + math.floor((divz+1)*divlen)
-- Find random positions for palm based on this random
local pr = PseudoRandom(seed+1)
local x = pr:next(x0, x1)
local z = pr:next(z0, z1)
if minetest.get_node({x=x,y=1,z=z}).name == "default:sand" and
minetest.find_node_near({x=x,y=1,z=z}, 1, "default:water_source") then
schematic = path.."palmtree.mts"
minetest.place_schematic({x=x-4,y=2,z=z-4}, schematic, 0, '', 0)
end
end
end
end
end)
-- Farming Redo Plants
if minetest.get_modpath("farming") and farming.mod == "redo" then
minetest.register_decoration({ -- Potato
deco_type = "simple",
place_on = {"ethereal:jungle_dirt"},
sidelen = 16,
fill_ratio = 0.045,
biomes = {"junglee"},
decoration = "farming:potato_3",
})
minetest.register_decoration({ -- Carrot, Cucumber, Potato, Tomato, Corn, Coffee, Raspberry, Rhubarb
deco_type = "simple",
place_on = {"ethereal:green_dirt", "ethereal:prairie_dirt"},
sidelen = 16,
fill_ratio = 0.05,
biomes = {"grassy", "grassytwo", "prairie", "jumble"},
decoration = {"farming:carrot_7", "farming:cucumber_4", "farming:potato_3", "farming:tomato_7", "farming:corn_8", "farming:coffee_5", "farming:raspberry_4", "farming:rhubarb_3", "farming:blueberry_4"},
})
minetest.register_decoration({ -- Melon, Pumpkin
deco_type = "simple",
place_on = {"default:green_dirt", "ethereal:jungle_dirt"},
sidelen = 16,
fill_ratio = 0.015,
biomes = {"grassy", "grassytwo", "junglee", "jumble"},
decoration = {"farming:melon_8", "farming:pumpkin_8"},
spawn_by = "default:water_source",
num_spawn_by = 1,
})
end
-- Mushroom Spores
minetest.register_craftitem("ethereal:mushroom_craftingitem", {
description = "Mushroom Spores",
groups = {not_in_creative_inventory=1},
inventory_image = "mushroom_spores.png",
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "ethereal:mushroom_garden_1")
end,
})
-- Mushroom Plant (Must be farmed to become edible)
minetest.register_node("ethereal:mushroom_plant", {
description = "Mushroom (edible)",
drawtype = "plantlike",
tiles = {"mushroom.png"},
inventory_image = "mushroom.png",
selection_box = {type = "fixed",fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}},
drop = "ethereal:mushroom_craftingitem",
wield_image = "mushroom.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
groups = {snappy=2,dig_immediate=3,flammable=2},
sounds = default.node_sound_defaults(),
on_use = minetest.item_eat(1),
})
-- Mushroom Soup (Heals 1 heart)
minetest.register_craftitem("ethereal:mushroom_soup", {
description = "Mushroom Soup",
inventory_image = "mushroom_soup.png",
on_use = minetest.item_eat(2, "ethereal:bowl"),
})
minetest.register_craft({
output = "ethereal:mushroom_soup",
recipe = {
{"ethereal:mushroom_plant", ""},
{"ethereal:mushroom_plant", ""},
{"ethereal:bowl", ""},
}
})
-- Cooked Mushroom Soup (Heals 1 and half heart)
minetest.register_craftitem("ethereal:mushroom_soup_cooked", {
description = "Mushroom Soup Cooked",
inventory_image = "mushroom_soup_cooked.png",
on_use = minetest.item_eat(3, "ethereal:bowl"),
})
minetest.register_craft({
type = "cooking",
cooktime = 10,
output = "ethereal:mushroom_soup_cooked",
recipe = "ethereal:mushroom_soup"
})
-- Define Mushroom growth stages
minetest.register_node("ethereal:mushroom_1", {
drawtype = "plantlike",
tiles = {"ethereal_mushroom_garden_1.png"},
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
drop = {
items = {
{items = {"ethereal:mushroom_craftingitem 1"},rarity=1},
{items = {"ethereal:mushroom_plant 1"},rarity=14},
}
},
selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
groups = {snappy=3,flammable=2,plant=1,mushroom=1,attached_node=1,growing=1,not_in_creative_inventory=1},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_alias("ethereal:mushroom_garden_1", "ethereal:mushroom_1")
minetest.register_node("ethereal:mushroom_2", {
drawtype = "plantlike",
tiles = {"ethereal_mushroom_garden_2.png"},
paramtype = "light",
sunlight_propagates = true,
walkable = false,
drop = {
items = {
{items = {"ethereal:mushroom_craftingitem 1"},rarity=1},
{items = {"ethereal:mushroom_plant 1"},rarity=7},
}
},
buildable_to = true,
selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
groups = {snappy=3,flammable=2,plant=1,mushroom=2,attached_node=1,growing=1,not_in_creative_inventory=1},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_alias("ethereal:mushroom_garden_2", "ethereal:mushroom_2")
minetest.register_node("ethereal:mushroom_3", {
drawtype = "plantlike",
tiles = {"ethereal_mushroom_garden_3.png"},
paramtype = "light",
sunlight_propagates = true,
walkable = false,
drop = {
items = {
{items = {"ethereal:mushroom_craftingitem 1"},rarity=1},
{items = {"ethereal:mushroom_plant 3"},rarity=3},
}
},
buildable_to = true,
selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
groups = {snappy=3,flammable=2,plant=1,mushroom=3,attached_node=1,growing=1,not_in_creative_inventory=1},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_alias("ethereal:mushroom_garden_3", "ethereal:mushroom_3")
minetest.register_node("ethereal:mushroom_4", {
drawtype = "plantlike",
tiles = {"ethereal_mushroom_garden_4.png"},
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
drop = {
items = {
{items = {"ethereal:mushroom_craftingitem 1"},rarity=1},
{items = {"ethereal:mushroom_plant 3"},rarity=1},
{items = {"ethereal:mushroom_plant 3"},rarity=7},
}
},
selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
groups = {snappy=3,flammable=2,plant=1,mushroom=4,attached_node=1,not_in_creative_inventory=1},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_alias("ethereal:mushroom_garden_4", "ethereal:mushroom_4")
-- Abm for growing Mushroom
if farming.mod ~= "redo" then
minetest.register_abm({
nodenames = {"group:mushroom"},
neighbors = {"farming:soil_wet"},
interval = 30,
chance = 2,
action = function(pos, node)
-- return if already full grown
if minetest.get_item_group(node.name, "mushroom") == 4 then
return
end
-- check if on wet soil
pos.y = pos.y-1
local n = minetest.get_node(pos)
if minetest.get_item_group(n.name, "soil") < 3 then
return
end
pos.y = pos.y+1
-- check light
if not minetest.get_node_light(pos) then
return
end
if minetest.get_node_light(pos) < 5 then
return
end
-- grow
local height = minetest.get_item_group(node.name, "mushroom") + 1
minetest.set_node(pos, {name="ethereal:mushroom_garden_"..height})
end
})
else
print ("[MOD] Ethereal - Detected and using Farming Redo mod")
end
-- Temporary compatibility lines for Xanadu server
minetest.register_alias("ethereal:mushroom_7", "ethereal:mushroom_3")
minetest.register_alias("ethereal:mushroom_8", "ethereal:mushroom_4")
onion.lua 0 → 100644
-- Wild Onion Plant
minetest.register_craftitem("ethereal:wild_onion_plant", {
description = "Wild Onion",
groups = {not_in_creative_inventory=1},
inventory_image = "wild_onion.png",
on_use = minetest.item_eat(2),
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "ethereal:wild_onion_1")
end
})
minetest.register_alias("ethereal:wild_onion_craftingitem", "ethereal:wild_onion_plant")
-- Define Onion growth stages
minetest.register_node("ethereal:onion_1", {
drawtype = "plantlike",
tiles = {"ethereal_wild_onion_1.png"},
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
drop = {
items = {
{items = {"ethereal:wild_onion_plant 1"},rarity=1},
}
},
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,onion=1,growing=1,not_in_creative_inventory=1},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_alias("ethereal:wild_onion_1", "ethereal:onion_1")
minetest.register_node("ethereal:onion_2", {
drawtype = "plantlike",
tiles = {"ethereal_wild_onion_2.png"},
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
drop = {
items = {
{items = {"ethereal:wild_onion_plant 1"},rarity=1},
}
},
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,onion=2,growing=1,not_in_creative_inventory=1},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_alias("ethereal:wild_onion_2", "ethereal:onion_2")
minetest.register_node("ethereal:onion_3", {
drawtype = "plantlike",
tiles = {"ethereal_wild_onion_3.png"},
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
is_ground_content = true,
drop = {
items = {
{items = {"ethereal:wild_onion_plant 1"},rarity=1},
{items = {"ethereal:wild_onion_plant 2"},rarity=3},
}
},
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,onion=3,growing=1,not_in_creative_inventory=1},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_alias("ethereal:wild_onion_3", "ethereal:onion_3")
minetest.register_node("ethereal:onion_4", {
drawtype = "plantlike",
tiles = {"ethereal_wild_onion_4.png"},
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
drop = {
items = {
{items = {"ethereal:wild_onion_plant 1"},rarity=1},
{items = {"ethereal:wild_onion_plant 3"},rarity=3},
}
},
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,onion=4,growing=1,not_in_creative_inventory=1},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_alias("ethereal:wild_onion_4", "ethereal:onion_4")
minetest.register_node("ethereal:onion_5", {
drawtype = "plantlike",
tiles = {"ethereal_wild_onion_5.png"},
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
drop = {
items = {
{items = {"ethereal:wild_onion_plant 2"},rarity=1},
{items = {"ethereal:wild_onion_plant 3"},rarity=2},
}
},
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,onion=5,not_in_creative_inventory=1},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_alias("ethereal:wild_onion_5", "ethereal:onion_5")
-- Abm for growing Wild Onion
if farming.mod ~= "redo" then
minetest.register_abm({
nodenames = {"group:onion"},
neighbors = {"farming:soil_wet"},
interval = 50,
chance = 3,
action = function(pos, node)
-- return if already full grown
if minetest.get_item_group(node.name, "onion") == 5 then
return
end
-- check if on wet soil
pos.y = pos.y-1
local n = minetest.get_node(pos)
if minetest.get_item_group(n.name, "soil") < 3 then
return
end
pos.y = pos.y+1
-- check light
if not minetest.get_node_light(pos) then
return
end
if minetest.get_node_light(pos) < 13 then
return
end
-- grow
local height = minetest.get_item_group(node.name, "onion") + 1
minetest.set_node(pos, {name="ethereal:wild_onion_"..height})
end
})
end
-- Temporary compatibility lines for Xanadu server
minetest.register_alias("ethereal:onion_7", "ethereal:onion_4")
minetest.register_alias("ethereal:onion_8", "ethereal:onion_5")
minetest.register_alias("ethereal:wild_onion_7", "ethereal:onion_4")
minetest.register_alias("ethereal:wild_onion_8", "ethereal:onion_5")
-- Override default Papyrus to make it walkable
minetest.override_item("default:papyrus", {walkable=true, sunlight_propagates=true})
-- Have Papyrus grow up to 4 high and Bamboo grow up to 5 in height (shared abm)
minetest.register_abm({
nodenames = {"default:papyrus", "ethereal:bamboo"},
neighbors = {"group:soil"},
interval = 50,
chance = 20,
action = function(pos, node)
local type = minetest.get_node(pos).name
local high = 4
pos.y = pos.y-1
local name = minetest.get_node(pos).name
if minetest.get_item_group(name, "soil") < 1 or minetest.find_node_near(pos, 3, {"group:water"}) == nil then
return
end
if type == "ethereal:bamboo" then
high = 5
end
pos.y = pos.y+1
local height = 0
while minetest.get_node(pos).name == type and height < high do
height = height+1
pos.y = pos.y+1
end
if height < high then
if minetest.get_node(pos).name == "air" then
minetest.set_node(pos, {name=type})
end
end
end,
})
-- Fern (boston)
minetest.register_node("ethereal:fern", {
description = "Fern",
drawtype = "plantlike",
visual_scale = 1.2,
tiles = {"fern.png"},
inventory_image = "fern.png",
wield_image = "fern.png",
paramtype = "light",
sunlight_propagates = true,
waving = 1,
walkable = false,
is_ground_content = true,
buildable_to = true,
drop = {
max_items = 1,
items = {
{items = {"ethereal:fern_tubers"},rarity = 6},
{items = {"ethereal:fern"}},
}
},
groups = {snappy=3,flora=1,attached_node=1,flammable=2},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
},
})
-- Boston Ferns sometimes drop edible Tubers (heals 1/2 heart when eaten)
minetest.register_craftitem("ethereal:fern_tubers", {
description = "Fern Tubers",
inventory_image = "fern_tubers.png",
on_use = minetest.item_eat(1),
})
-- Red Shrub (not flammable)
minetest.register_node("ethereal:dry_shrub", {
description = "Fiery Dry Shrub",
drawtype = "plantlike",
visual_scale = 1.0,
tiles = {"ethereal_dry_shrub.png"},
inventory_image = "ethereal_dry_shrub.png",
wield_image = "ethereal_dry_shrub.png",
paramtype = "light",
sunlight_propagates = true,
waving = 1,
walkable = false,
is_ground_content = true,
buildable_to = true,
groups = {snappy=3,flora=1,attached_node=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
},
})
-- Grey Shrub (not Flammable - too cold to burn)
minetest.register_node("ethereal:snowygrass", {
description = "Snowy Grass",
drawtype = "plantlike",
visual_scale = 0.9,
tiles = {"ethereal_snowygrass.png"},
inventory_image = "ethereal_snowygrass.png",
wield_image = "ethereal_snowygrass.png",
paramtype = "light",
sunlight_propagates = true,
waving = 1,
walkable = false,
buildable_to = true,
is_ground_content = true,
groups = {snappy=3,flora=1,attached_node=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
},
})
-- Crystal Shrub (not Flammable - too cold to burn)
minetest.register_node("ethereal:crystalgrass", {
description = "Crystal Grass",
drawtype = "plantlike",
visual_scale = 0.9,
tiles = {"ethereal_crystalgrass.png"},
inventory_image = "ethereal_crystalgrass.png",
wield_image = "ethereal_crystalgrass.png",
paramtype = "light",
sunlight_propagates = true,
waving = 1,
walkable = false,
buildable_to = true,
is_ground_content = true,
groups = {snappy=3,flora=1,attached_node=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
},
})
-- Define Moss Types (Has grass textures on all sides)
function ethereal.add_moss(typ, descr, texture, receipe_item)
minetest.register_node("ethereal:"..typ.."_moss", {
description = descr.." Moss",
tiles = { texture },
groups = {crumbly=3 },
sounds = default.node_sound_dirt_defaults
})
minetest.register_craft({
output = "ethereal:"..typ.."_moss",
recipe = {{"default:dirt", receipe_item }}
})
end
ethereal.add_moss( "crystal", "Crystal", "ethereal_grass_crystal_top.png", "ethereal:frost_leaves")
ethereal.add_moss( "mushroom", "Mushroom", "ethereal_grass_mushroom_top.png", "ethereal:mushroom")
ethereal.add_moss( "fiery", "Fiery", "ethereal_grass_fiery_top.png", "ethereal:dry_shrub")
ethereal.add_moss( "gray", "Gray", "ethereal_grass_gray_top.png", "ethereal:snowygrass")
ethereal.add_moss( "green", "Green", "default_grass.png", "default:jungleleaves")
-- Banana (Heals one heart when eaten)
minetest.register_node("ethereal:banana", {
description = "Banana",
drawtype = "torchlike",
visual_scale = 1.0,
tiles = {"banana_single.png"},
inventory_image = "banana_single.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.2, -0.5, -0.2, 0.2, 0.2, 0.2}
},
groups = {fleshy=3,dig_immediate=3,flammable=2,leafdecay=1,leafdecay_drop=1},
on_use = minetest.item_eat(2),
sounds = default.node_sound_leaves_defaults(),
after_place_node = function(pos, placer, itemstack)
if placer:is_player() then
minetest.set_node(pos, {name="ethereal:banana", param2=1})
end
end,
})
-- Banana Dough
minetest.register_craftitem("ethereal:banana_dough", {
description = "Banana Dough",
inventory_image = "banana_dough.png",
})
minetest.register_craft({
type = "shapeless",
output = "ethereal:banana_dough",
recipe = {"farming:flour", "ethereal:banana"}
})
minetest.register_craft({
type = "cooking",
cooktime = 14,
output = "ethereal:banana_bread",
recipe = "ethereal:banana_dough"
})
-- Orange (Heals 2 hearts when eaten)
minetest.register_node("ethereal:orange", {
description = "Orange",
drawtype = "plantlike",
visual_scale = 1.0,
tiles = {"farming_orange.png"},
inventory_image = "farming_orange.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.2, -0.3, -0.2, 0.2, 0.2, 0.2}
},
groups = {fleshy=3,dig_immediate=3,flammable=2,leafdecay=1,leafdecay_drop=1},
on_use = minetest.item_eat(4),
sounds = default.node_sound_leaves_defaults(),
after_place_node = function(pos, placer, itemstack)
if placer:is_player() then
minetest.set_node(pos, {name="ethereal:orange", param2=1})
end
end,
})
-- Pine Nuts (Heals 1/2 heart when eaten)
minetest.register_craftitem("ethereal:pine_nuts", {
description = "Pine Nuts",
inventory_image = "pine_nuts.png",
on_use = minetest.item_eat(1),
})
-- Banana Loaf (Heals 3 hearts when eaten)
minetest.register_craftitem("ethereal:banana_bread", {
description = "Banana Loaf",
inventory_image = "banana_bread.png",
on_use = minetest.item_eat(6),
})
-- Coconut (Gives 4 coconut slices, each heal 1/2 heart)
minetest.register_node("ethereal:coconut", {
drawtype = "plantlike",
walkable = false,
paramtype = "light",
description = "Coconut",
tiles = {"moretrees_coconut.png"},
groups = {cracky=2,snappy=2,choppy=2,flammable=1,leafdecay=3,leafdecay_drop=1},
drop = "ethereal:coconut_slice 4",
sounds = default.node_sound_wood_defaults(),
})
-- Coconut Slice (Heals half heart when eaten)
minetest.register_craftitem("ethereal:coconut_slice", {
description = "Coconut Slice",
inventory_image = "moretrees_coconut_slice.png",
on_use = minetest.item_eat(1),
})
-- Golden Apple (Found on Healing Tree, heals all 10 hearts)
minetest.register_node("ethereal:golden_apple", {
description = "Golden Apple",
drawtype = "plantlike",
visual_scale = 1.0,
tiles = {"default_apple_gold.png"},
inventory_image = "default_apple_gold.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.2, -0.3, -0.2, 0.2, 0.2, 0.2}
},
groups = {fleshy=3,dig_immediate=3,leafdecay=3,leafdecay_drop=1},
on_use = minetest.item_eat(20),
sounds = default.node_sound_leaves_defaults(),
after_place_node = function(pos, placer, itemstack)
if placer:is_player() then
minetest.set_node(pos, {name="ethereal:golden_apple", param2=1})
end
end,
})
-- Bamboo (thanks to Nelo-slay on DeviantArt for the free Bamboo base image)
minetest.register_node("ethereal:bamboo", {
description = "bamboo",
drawtype = "plantlike",
tiles = {"bamboo.png"},
inventory_image = "bamboo.png",
wield_image = "bamboo.png",
paramtype = "light",
sunlight_propagates = true,
is_ground_content = 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},--, attached_node=1},
sounds = default.node_sound_leaves_defaults(),
after_dig_node = function(pos, node, metadata, digger)
default.dig_up(pos, node, digger)
end,
})
-- Bamboo Sprout
minetest.register_node("ethereal:bamboo_sprout", {
description = "Bamboo Sprout",
drawtype = "plantlike",
tiles = {"bamboo_sprout.png"},
inventory_image = "bamboo_sprout.png",
wield_image = "bamboo_sprout.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
is_ground_content = true,
buildable_to = true,
groups = {snappy=3,flora=1,attached_node=1,flammable=2},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
},
-- sprouts are edible if cooked in stew
})
-- Wooden Bowl (for Mushroom Soup)
minetest.register_craftitem("ethereal:bowl", {
description = "Bowl",
inventory_image = "bowl.png",
})
minetest.register_craft({
output = "ethereal:bowl",
recipe = {
{"group:wood", "", "group:wood"},
{"", "group:wood", ""},
{"", "", ""},
}
})
-- Hearty Stew (Heals 4 hearts - thanks to ZonerDarkRevention for his DokuCraft DeviantArt bowl texture)
minetest.register_craftitem("ethereal:hearty_stew", {
description = "Hearty Stew",
inventory_image = "hearty_stew.png",
on_use = minetest.item_eat(8, "ethereal:bowl"),
})
-- Cooked Hearty Stew (Heals 5 hearts)
minetest.register_craftitem("ethereal:hearty_stew_cooked", {
description = "Hearty Stew Cooked",
inventory_image = "hearty_stew_cooked.png",
on_use = minetest.item_eat(10, "ethereal:bowl"),
})
-- Hearty Stew
minetest.register_craft({
output = "ethereal:hearty_stew",
recipe = {
{"ethereal:wild_onion_plant","ethereal:mushroom_plant", "ethereal:bamboo_sprout"},
{"","ethereal:mushroom_plant", ""},
{"","ethereal:bowl", ""},
}
})
minetest.register_craft({
output = "ethereal:hearty_stew",
recipe = {
{"ethereal:wild_onion_plant","ethereal:mushroom_plant", "ethereal:fern_tubers"},
{"","ethereal:mushroom_plant", ""},
{"","ethereal:bowl", ""},
}
})
-- Cooked Hearty Stew
minetest.register_craft({
type = "cooking",
cooktime = 10,
output = "ethereal:hearty_stew_cooked",
recipe = "ethereal:hearty_stew"
})
-- Mushroom Tops give 4x Mushrooms for Planting
minetest.register_craft({
output = "ethereal:mushroom_craftingitem 4",
type = shapeless,
recipe = {
{"ethereal:mushroom", ""},
{"", ""},
{"", ""},
}
})
-- Bamboo Flooring
minetest.register_node("ethereal:bamboo_floor", {
description = ("Bamboo Floor"),
drawtype = 'nodebox',
tiles = { "bamboo_floor.png" },
wield_image = "bamboo_floor.png",
inventory_image = "bamboo_floor.png",
paramtype = "light",
paramtype2 = "wallmounted",
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",
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"},
}
})
-- Gravel (5x cobble in X pattern gives 5 gravel)
minetest.register_craft({
output = "default:gravel 5",
recipe = {
{"default:cobble", "", "default:cobble"},
{"", "default:cobble", ""},
{"default:cobble", "", "default:cobble"},
}
})
-- Dirt (5x gravel in X pattern gives 5 dirt)
minetest.register_craft({
output = "default:dirt 5",
recipe = {
{"default:gravel", "", "default:gravel"},
{"", "default:gravel", ""},
{"default:gravel", "", "default:gravel"},
}
})
-- Sand (5x dirt in X pattern gives 5 sand)
minetest.register_craft({
output = "default:sand 5",
recipe = {
{"default:dirt", "", "default:dirt"},
{"", "default:dirt", ""},
{"default:dirt", "", "default:dirt"},
}
})
-- Snow (5x ice in X pattern gives 5 snow)
minetest.register_craft({
output = "default:snow 5",
recipe = {
{"default:ice", "", "default:ice"},
{"", "default:ice", ""},
{"default:ice", "", "default:ice"},
}
})
-- Paper (2x3 string = 4 paper)
minetest.register_craft({
output = "default:paper 4",
recipe = {
{"farming:string", "farming:string", ""},
{"farming:string", "farming:string", ""},
{"farming:string", "farming:string", ""},
}
})
-- Bucket of Cactus Pulp
minetest.register_craftitem("ethereal:bucket_cactus", {
description = "Bucket of Cactus Pulp",
inventory_image = "bucket_cactus.png",
stack_max = 1,
on_use = minetest.item_eat(2, "bucket:bucket_empty"),
})
minetest.register_craft({
output = "ethereal:bucket_cactus",
type = shapeless,
recipe = {
{"bucket:bucket_empty","default:cactus"},
}
})
-- Palm Wax
minetest.register_craftitem("ethereal:palm_wax", {
description = "Palm Wax",
inventory_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", {
description = "Candle",
drawtype = "plantlike",
inventory_image = "candle_static.png",
tiles = {
{name="candle.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=1.0}},
},
paramtype = "light",
light_source = LIGHT_MAX-3,
sunlight_propagates = true,
walkable = false,
groups = {dig_immediate=3, attached_node=1},
sounds = default.node_sound_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15 },
},
})
minetest.register_craft({
output = "ethereal:candle 6",
recipe = {
{"","farming:cotton"},
{"","ethereal:palm_wax"},
{"","ethereal:palm_wax"},
}
})
--= Register Biome Decoration Using Plants Mega Pack Lite
--= Desert Biome
-- Cactus
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:desert_sand", "default:sandstone"},
sidelen = 16,
fill_ratio = 0.005,
biomes = {"desert", "desertstone"},
decoration = {"bakedclay:cactus_echinocereus", "bakedclay:cactus_matucana", "bakedclay:cactus_baseball", "bakedclay:cactus_golden"},
})
-- Desert Plants
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:desert_sand", "default:sandstone", "default:sand"},
sidelen = 16,
fill_ratio = 0.003,
biomes = {"desert", "desertstone"},
decoration = {"bakedclay:desert_kangaroo", "bakedclay:desert_brittle", "bakedclay:desert_ocotillo", "bakedclay:desert_whitesage"},
})
--= Prairie Biome
-- Grass
minetest.register_decoration({
deco_type = "simple",
place_on = {"ethereal:prairie_dirt", "ethereal:green_dirt"},
sidelen = 16,
fill_ratio = 0.005,
biomes = {"prairie", "grassy", "grassytwo"},
decoration = {"bakedclay:grass_prairie", "bakedclay:grass_cord", "bakedclay:grass_wheatgrass", "bakedclay:desert_whitesage"},
})
-- Flowers
minetest.register_decoration({
deco_type = "simple",
place_on = {"ethereal:prairie_grass", "ethereal:green_dirt", "ethereal:grove_dirt", "ethereal:bamboo_dirt"},
sidelen = 16,
fill_ratio = 0.005,
biomes = {"prairie", "grassy", "grassytwo", "bamboo"},
decoration = {"bakedclay:flower_jacobsladder", "bakedclay:flower_thistle", "bakedclay:flower_wildcarrot"},
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"ethereal:prairie_grass", "ethereal:green_dirt", "ethereal:grove_dirt"},
sidelen = 16,
fill_ratio = 0.005,
biomes = {"prairie", "grassy", "grassytwo", "grove"},
decoration = {"bakedclay:flower_delphinium", "bakedclay:flower_celosia", "bakedclay:flower_daisy", "bakedclay:flower_bluerose"},
})
--= Shrubs
minetest.register_decoration({
deco_type = "simple",
place_on = {"ethereal:prairie_grass", "ethereal:green_dirt", "ethereal:grove_dirt", "ethereal:jungle_grass", "ethereal:gray_dirt"},
sidelen = 16,
fill_ratio = 0.005,
biomes = {"prairie", "grassy", "grassytwo", "grove", "junglee", "grayness", "jumble"},
decoration = {"bakedclay:shrub_kerria", "bakedclay:shrub_spicebush"},
})
--= Jungle Biome
minetest.register_decoration({
deco_type = "simple",
place_on = {"ethereal:jungle_dirt", "ethereal:green_dirt"},
sidelen = 16,
fill_ratio = 0.007,
biomes = {"junglee", "jumble"},
decoration = {"bakedclay:rainforest_guzmania", "bakedclay:rainforest_devil", "bakedclay:rainforest_lazarus", "bakedclay:rainforest_lollipop", "bakedclay:mushroom_woolly"},
})
--= Cold Biomes
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_snow", "ethereal:cold_dirt", "ethereal:gray_dirt"},
sidelen = 16,
fill_ratio = 0.005,
biomes = {"snowy", "alpine", "grayness"},
decoration = {"bakedclay:mountain_edelweiss", "bakedclay:mountain_armeria", "bakedclay:mountain_bellflower", "bakedclay:mountain_willowherb", "bakedclay:mountain_bistort"},
})
--= Mushroom Biome
minetest.register_decoration({
deco_type = "simple",
place_on = {"ethereal:mushroom_dirt"},
sidelen = 16,
fill_ratio = 0.005,
biomes = {"mushroom"},
decoration = {"bakedclay:mushroom_powderpuff", "bakedclay:mushroom_chanterelle", "bakedclay:mushroom_parasol"},
})
--= Lakeside
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:sand", "default:green_dirt"},
sidelen = 16,
fill_ratio = 0.015,
biomes = {"sandclay", "lake", "grassy", "grassytwo", "jumble"},
decoration = {"bakedclay:wetlands_cattails", "bakedclay:wetlands_pickerel", "bakedclay:wetlands_mannagrass", "bakedclay:wetlands_turtle"},
spawn_by = "default:water_source",
num_spawn_by = 1,
})
--= Harsh Biomes
minetest.register_decoration({
deco_type = "simple",
place_on = {"ethereal:mushroom_dirt", "ethereal:green_dirt", "ethereal:gray_dirt", "ethereal:cold_dirt", "ethereal:dirt_with_snow", "ethereal:jungle_dirt", "ethereal:prairie_dirt", "ethereal:grove_dirt", "ethereal:dry_dirt", "ethereal:fiery_dirt", "default:sand", "default:desert_sand", "bakedclay:red", "ethereal:bamboo_dirt"},
sidelen = 16,
fill_ratio = 0.004,
biomes = {"mushroom", "prairie", "grayness", "plains", "desert", "lake", "junglee", "grassy", "grassytwo", "jumble", "snowy", "alpine", "fiery", "mesa", "bamboo"},
decoration = {"bakedclay:spooky_thornbush", "bakedclay:spooky_baneberry"},
})
-- Function to Register Saplings
ethereal.register_sapling = function( sapling_node_name, sapling_descr, sapling_texture )
-- if the sapling does not exist yet, create a node for it
if( not( minetest.registered_nodes[ sapling_node_name ] )) then
minetest.register_node( sapling_node_name, {
description = sapling_descr,
drawtype = "plantlike",
visual_scale = 1.0,
tiles = {sapling_texture},
inventory_image = sapling_texture,
wield_image = sapling_texture,
paramtype = "light",
sunlight_propagates = true,
walkable = false,
selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
groups = {snappy=2,dig_immediate=3,flammable=2,ethereal_sapling=1,attached_node=1},
sounds = default.node_sound_defaults(),
})
end
end
-- Register Saplings
ethereal.register_sapling( "ethereal:willow_sapling", "Willow Sapling", "willow_sapling.png" )
ethereal.register_sapling( "ethereal:yellow_tree_sapling", "Healing Tree Sapling", "yellow_tree_sapling.png" )
ethereal.register_sapling( "ethereal:tree_sapling", "Tree Sapling", "ethereal_tree_sapling.png" )
ethereal.register_sapling( "ethereal:jungle_tree_sapling","Jungletree Sapling", "ethereal_jungle_tree_sapling.png" )
ethereal.register_sapling( "ethereal:pine_tree_sapling", "Pine Sapling", "ethereal_pine_tree_sapling.png" )
ethereal.register_sapling( "ethereal:big_tree_sapling", "Big Tree Sapling", "ethereal_big_tree_sapling.png" )
ethereal.register_sapling( "ethereal:banana_tree_sapling", "Banana Tree Sapling", "banana_tree_sapling.png" )
ethereal.register_sapling( "ethereal:frost_tree_sapling", "Frost Sapling", "ethereal_frost_tree_sapling.png" )
ethereal.register_sapling( "ethereal:gray_tree_sapling", "Gray Sapling", "ethereal_gray_tree_sapling.png" )
ethereal.register_sapling( "ethereal:mushroom_sapling", "Mushroom Sapling", "ethereal_mushroom_sapling.png" )
ethereal.register_sapling( "ethereal:palm_sapling", "Palm Sapling", "moretrees_palm_sapling.png" )
ethereal.register_sapling( "ethereal:redwood_sapling", "Redwood Sapling", "redwood_sapling.png" )
ethereal.register_sapling( "ethereal:orange_tree_sapling", "Orange Tree Sapling", "orange_tree_sapling.png" )
ethereal.register_sapling( "ethereal:acacia_sapling", "Acacia Sapling", "moretrees_acacia_sapling.png" )
ethereal.place_tree = function (pos, ofx, ofz, schem)
-- Remove Sapling and Place Tree Schematic
minetest.env:set_node(pos, {name="air"})
pos.x = pos.x - ofx
pos.z = pos.z - ofz
minetest.place_schematic(pos, minetest.get_modpath("ethereal").."/schematics/"..schem..".mts", "0", {}, false );
end
-- Grow saplings
minetest.register_abm({
nodenames = {"group:ethereal_sapling"},
interval = 20,
chance = 25,
action = function(pos, node)
local under = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name;
-- Check if Sapling is growing on correct substrate
if (node.name == "ethereal:yellow_tree_sapling" and under == "default:dirt_with_snow") then
ethereal.place_tree(pos, 4, 4, "yellowtree")
elseif (node.name == "ethereal:tree_sapling" and under == "ethereal:green_dirt") then
ethereal.place_tree(pos, 2, 2, "tree")
elseif (node.name == "ethereal:jungle_tree_sapling" and under == "ethereal:jungle_dirt") then
ethereal.place_tree(pos, 6, 6, "jungletree")
elseif (node.name == "ethereal:pine_tree_sapling" and under == "ethereal:cold_dirt") then
ethereal.place_tree(pos, 3, 3, "pinetree")
elseif (node.name == "ethereal:big_tree_sapling" and under == "ethereal:green_dirt") then
ethereal.place_tree(pos, 4, 4, "bigtree")
elseif (node.name == "ethereal:banana_tree_sapling" and under == "ethereal:grove_dirt") then
ethereal.place_tree(pos, 3, 3, "bananatree")
elseif (node.name == "ethereal:frost_tree_sapling" and under == "ethereal:crystal_dirt") then
ethereal.place_tree(pos, 4, 4, "frosttrees")
elseif (node.name == "ethereal:gray_tree_sapling" and under == "ethereal:gray_dirt") then
ethereal.place_tree(pos, 2, 2, "graytrees")
elseif (node.name == "ethereal:mushroom_sapling" and under == "ethereal:mushroom_dirt") then
ethereal.place_tree(pos, 4, 4, "mushroomone")
elseif (node.name == "ethereal:palm_sapling" and under == "default:sand") then
ethereal.place_tree(pos, 4, 4, "palmtree")
elseif (node.name == "ethereal:willow_sapling" and under == "ethereal:gray_dirt") then
ethereal.place_tree(pos, 5, 5, "willow")
elseif (node.name == "ethereal:redwood_sapling" and under == "bakedclay:red") then
ethereal.place_tree(pos, 9, 9, "redwood")
elseif (node.name == "ethereal:orange_tree_sapling" and under == "ethereal:prairie_dirt") then
ethereal.place_tree(pos, 1, 1, "orangetree")
elseif (node.name == "ethereal:acacia_sapling" and under == "default:desert_sand") then
ethereal.place_tree(pos, 5, 5, "acaciatree")
end
end,
})
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment