tidy code, add recipe to cut coconut if farming redo found

This commit is contained in:
tenplus1 2022-09-30 17:26:44 +01:00
parent 3ddde145a7
commit 9fc06da19d
45 changed files with 1416 additions and 1334 deletions

View File

@ -29,4 +29,5 @@ You may also use a table that not only adds an item but the biome it can be foun
ethereal.add_item("", "", {"ethereal:crystal_spike", "frost"})
Please note that only Ethereal biome names can be used for specific finds.
Please note that only Ethereal biome names can be used for specific finds, unless mod
specifically adds ethereal as an optional dependency.

View File

@ -101,6 +101,7 @@ add_biome("mesa_ocean", -192, 1, 25, 28, ethereal.mesa,
tmp = "default:dirt_with_coniferous_litter"
if not minetest.registered_nodes[tmp] then
tmp = "ethereal:cold_dirt"
end
@ -135,6 +136,7 @@ add_biome("caves", 4, 41, 15, 25, ethereal.caves,
tmp = "default:silver_sand"
if not minetest.registered_nodes[tmp] then
tmp = "default:sand"
end
@ -166,8 +168,8 @@ add_biome("jumble", 1, 71, 25, 50, ethereal.jumble,
add_biome("jumble_ocean", -192, 1, 25, 50, ethereal.jumble,
nil, "default:sand", 1, "default:sand", 2)
tmp = "default:dirt_with_rainforest_litter"
if not minetest.registered_nodes[tmp] then
tmp = "ethereal:jungle_dirt"
end
@ -216,9 +218,9 @@ add_biome("plains", 3, 25, 65, 25, ethereal.plains,
add_biome("plains_ocean", -192, 2, 55, 25, ethereal.plains,
nil, "default:sand", 1, "default:sand", 2)
tmp = "default:dry_dirt_with_dry_grass"
tmp2 = "default:dry_dirt"
if not minetest.registered_nodes[tmp] then
tmp = "default:dirt_with_dry_grass"
tmp2 = "default:dirt"
@ -230,7 +232,6 @@ add_biome("savanna", 3, 50, 55, 25, ethereal.savanna,
add_biome("savanna_ocean", -192, 1, 55, 25, ethereal.savanna,
nil, "default:sand", 1, "default:sand", 2)
add_biome("fiery", 5, 20, 75, 10, ethereal.fiery,
nil, "ethereal:fiery_dirt", 1, "default:dirt", 3)
@ -264,12 +265,12 @@ if ethereal.glacier == 1 then
node_river_water = "default:ice",
node_riverbed = "default:gravel",
depth_riverbed = 2,
node_dungeon = "ethereal:icebrick",--"default:ice",
node_dungeon = "ethereal:icebrick",
node_dungeon_stair = "stairs:stair_ice",
y_min = -8,
y_max = 31000,
heat_point = 0,
humidity_point = 50,
humidity_point = 50
})
minetest.register_biome({
@ -282,10 +283,11 @@ if ethereal.glacier == 1 then
y_min = -112,
y_max = -9,
heat_point = 0,
humidity_point = 50,
humidity_point = 50
})
end
if ethereal.tundra == 1 and minetest.registered_nodes["default:permafrost"] then
minetest.register_biome({
@ -296,7 +298,7 @@ if ethereal.tundra == 1 and minetest.registered_nodes["default:permafrost"] then
y_max = 180,
y_min = 47,
heat_point = 0,
humidity_point = 40,
humidity_point = 40
})
minetest.register_biome({
@ -311,7 +313,7 @@ if ethereal.tundra == 1 and minetest.registered_nodes["default:permafrost"] then
y_max = 46,
y_min = 2,
heat_point = 0,
humidity_point = 40,
humidity_point = 40
})
minetest.register_biome({
@ -326,7 +328,7 @@ if ethereal.tundra == 1 and minetest.registered_nodes["default:permafrost"] then
y_max = 1,
y_min = -3,
heat_point = 0,
humidity_point = 40,
humidity_point = 40
})
minetest.register_biome({
@ -341,6 +343,6 @@ if ethereal.tundra == 1 and minetest.registered_nodes["default:permafrost"] then
y_max = -4,
y_min = -112,
heat_point = 0,
humidity_point = 40,
humidity_point = 40
})
end

View File

@ -1,6 +1,7 @@
local S = ethereal.intllib
-- Crystal Spike (Hurts if you touch it)
-- thanks to ZonerDarkRevention for his DokuCraft DeviantArt crystal texture
minetest.register_node("ethereal:crystal_spike", {
@ -17,15 +18,14 @@ minetest.register_node("ethereal:crystal_spike", {
groups = {cracky = 1, falling_node = 1, puts_out_fire = 1, cools_lava = 1},
sounds = default.node_sound_glass_defaults(),
selection_box = {
type = "fixed",
fixed = {-5 / 16, -0.5, -5 / 16, 5 / 16, 0, 5 / 16},
type = "fixed", fixed = {-5 / 16, -0.5, -5 / 16, 5 / 16, 0, 5 / 16}
},
node_box = {
type = "fixed",
fixed = {-5 / 16, -0.5, -5 / 16, 5 / 16, 0, 5 / 16},
type = "fixed", fixed = {-5 / 16, -0.5, -5 / 16, 5 / 16, 0, 5 / 16}
}
})
-- Crystal Ingot
minetest.register_craftitem("ethereal:crystal_ingot", {
description = S("Crystal Ingot"),
@ -97,6 +97,7 @@ minetest.register_craft({
replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}}
})
-- Crystal Block
minetest.register_node("ethereal:crystal_block", {
description = S("Crystal Block"),
@ -121,6 +122,7 @@ minetest.register_craft({
recipe = {{"ethereal:crystal_block"}}
})
-- Crystal Sword (Powerful wee beastie)
minetest.register_tool("ethereal:sword_crystal", {
description = S("Crystal Sword"),
@ -134,9 +136,9 @@ minetest.register_tool("ethereal:sword_crystal", {
times = {[1] = 1.70, [2] = 0.70, [3] = 0.25},
uses = 50,
maxlevel = 3
}
},
},
damage_groups = {fleshy = 10},
damage_groups = {fleshy = 10}
},
groups = {sword = 1},
sound = {breaks = "default_tool_breaks"}
@ -151,6 +153,7 @@ minetest.register_craft({
}
})
-- Crystal Axe
minetest.register_tool("ethereal:axe_crystal", {
description = S("Crystal Axe"),
@ -190,6 +193,7 @@ minetest.register_craft({
}
})
-- Crystal Pick (This will last a while)
minetest.register_tool("ethereal:pick_crystal", {
description = S("Crystal Pickaxe"),
@ -220,6 +224,8 @@ minetest.register_craft({
}
})
-- dig override for crystal shovel's soft touch ability
local old_handle_node_drops = minetest.handle_node_drops
function minetest.handle_node_drops(pos, drops, digger)
@ -269,6 +275,7 @@ minetest.register_craft({
}
})
-- Crystal Gilly Staff (replenishes air supply when used)
minetest.register_tool("ethereal:crystal_gilly_staff", {
description = S("Crystal Gilly Staff"),
@ -276,6 +283,7 @@ minetest.register_tool("ethereal:crystal_gilly_staff", {
wield_image = "ethereal_crystal_gilly_staff.png",
on_use = function(itemstack, user, pointed_thing)
if user:get_breath() < 10 then
user:set_breath(10)
end
@ -292,6 +300,7 @@ minetest.register_craft({
},
})
-- Add [toolranks] mod support if found
if minetest.get_modpath("toolranks") then

View File

@ -657,36 +657,19 @@ if minetest.get_modpath("butterflies") then
num_spawn_by = 1
})
-- restart butterfly functions when generated
-- restart butterfly timers
minetest.register_lbm({
name = ":butterflies:butterfly_timer",
nodenames = {
"butterflies:butterfly_white", "butterflies:butterfly_red",
"butterflies:butterfly_violet"
},
run_at_every_load = false,
-- get decoration ID
local butterflies = minetest.get_decoration_id("butterflies:butterfly")
minetest.set_gen_notify({decoration = true}, {butterflies})
-- start nodetimers
minetest.register_on_generated(function(minp, maxp, blockseed)
local gennotify = minetest.get_mapgen_object("gennotify")
local poslist = {}
for _, pos in ipairs(gennotify["decoration#" .. butterflies] or {}) do
local deco_pos = {x = pos.x, y = pos.y + 3, z = pos.z}
table.insert(poslist, deco_pos)
action = function(pos)
minetest.get_node_timer(pos):start(5)
end
if #poslist ~= 0 then
for i = 1, #poslist do
local pos = poslist[i]
minetest.get_node_timer(pos):start(1)
end
end
end)
})
end
@ -712,36 +695,16 @@ if minetest.get_modpath("fireflies") then
decoration = "fireflies:hidden_firefly"
})
-- restart firefly functions when generated
-- restart firefly timers
minetest.register_lbm({
name = ":fireflies:firefly_timer",
nodenames = {"fireflies:firefly", "fireflies:hidden_firefly"},
run_at_every_load = false,
-- get decoration IDs
local firefly_low = minetest.get_decoration_id("fireflies:firefly_low")
minetest.set_gen_notify({decoration = true}, {firefly_low, firefly_high})
-- start nodetimers
minetest.register_on_generated(function(minp, maxp, blockseed)
local gennotify = minetest.get_mapgen_object("gennotify")
local poslist = {}
for _, pos in ipairs(gennotify["decoration#" .. firefly_low] or {}) do
local firefly_low_pos = {x = pos.x, y = pos.y + 3, z = pos.z}
table.insert(poslist, firefly_low_pos)
action = function(pos)
minetest.get_node_timer(pos):start(5)
end
if #poslist ~= 0 then
for i = 1, #poslist do
local pos = poslist[i]
minetest.get_node_timer(pos):start(1)
end
end
end)
})
end

View File

@ -1,11 +1,13 @@
local S = ethereal.intllib
-- override default dirt (to stop caves cutting away dirt)
minetest.override_item("default:dirt", {is_ground_content = ethereal.cavedirt})
minetest.register_alias("ethereal:green_dirt", "default:dirt_with_grass")
-- dry dirt
minetest.register_node("ethereal:dry_dirt", {
description = S("Dried Dirt"),
@ -22,6 +24,8 @@ minetest.register_craft({
cooktime = 3,
})
-- register ethereal dirt types
local dirts = {
"Bamboo", "Jungle", "Grove", "Prairie", "Cold",
"Crystal", "Mushroom", "Fiery", "Gray"
@ -32,28 +36,27 @@ for n = 1, #dirts do
local desc = dirts[n]
local name = desc:lower()
minetest.register_node("ethereal:"..name.."_dirt", {
description = S(desc.." Dirt"),
minetest.register_node("ethereal:" .. name .. "_dirt", {
description = S(desc .. " Dirt"),
tiles = {
"ethereal_grass_"..name.."_top.png",
"ethereal_grass_" .. name .. "_top.png",
"default_dirt.png",
{
name = "default_dirt.png^ethereal_grass_"
.. name .."_side.png",
name = "default_dirt.png^ethereal_grass_" .. name .. "_side.png",
tileable_vertical = false
}
},
is_ground_content = ethereal.cavedirt,
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
soil = {
base = "ethereal:"..name.."_dirt",
base = "ethereal:" .. name .. "_dirt",
dry = "farming:soil",
wet = "farming:soil_wet"
},
drop = "default:dirt",
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_grass_footstep", gain = 0.25},
}),
footstep = {name = "default_grass_footstep", gain = 0.25}
})
})
end
@ -150,6 +153,7 @@ local flower_spread = function(pos, node)
end
end
-- grow papyrus up to 4 high and bamboo up to 8 high
local grow_papyrus = function(pos, node)
@ -197,6 +201,7 @@ local grow_papyrus = function(pos, node)
end
-- loop through active abm's
for _, ab in pairs(minetest.registered_abms) do
@ -232,6 +237,7 @@ for _, ab in pairs(minetest.registered_abms) do
end
end
-- If Baked Clay mod not active, make Red, Orange and Grey nodes
if not minetest.get_modpath("bakedclay") then
@ -260,6 +266,7 @@ if not minetest.get_modpath("bakedclay") then
})
end
-- Quicksand (old style, sinking inside shows black instead of yellow effect,
-- works ok with noclip enabled though)
minetest.register_node("ethereal:quicksand", {

View File

@ -1,6 +1,7 @@
local S = ethereal.intllib
-- Etherium Dust
minetest.register_craftitem("ethereal:etherium_dust", {
description = S("Etherium Dust"),
@ -25,6 +26,7 @@ minetest.register_node("ethereal:stone_with_etherium_ore", {
sounds = default.node_sound_stone_defaults()
})
-- Bamboo Flooring
minetest.register_node("ethereal:bamboo_floor", {
description = S("Bamboo Floor"),
@ -46,7 +48,6 @@ minetest.register_node("ethereal:bamboo_floor", {
sounds = default.node_sound_wood_defaults()
})
-- Craft Bamboo into Bamboo Flooring
minetest.register_craft({
output = "ethereal:bamboo_floor 2",
recipe = {
@ -55,13 +56,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "ethereal:bamboo_block",
recipe = {
{"ethereal:bamboo_floor"},
{"ethereal:bamboo_floor"}
}
})
-- Bamboo Block
minetest.register_node("ethereal:bamboo_block", {
@ -72,6 +66,14 @@ minetest.register_node("ethereal:bamboo_block", {
sounds = default.node_sound_wood_defaults()
})
minetest.register_craft({
output = "ethereal:bamboo_block",
recipe = {
{"ethereal:bamboo_floor"},
{"ethereal:bamboo_floor"}
}
})
minetest.register_craft({
output = "ethereal:bamboo_block",
recipe = {
@ -81,7 +83,8 @@ minetest.register_craft({
}
})
-- Craft Bamboo into Paper
-- Paper recipes
minetest.register_craft({
output = "default:paper 6",
recipe = {
@ -91,19 +94,37 @@ minetest.register_craft({
}
})
if ethereal.xcraft == true then
minetest.register_craft({
output = "default:paper 2",
recipe = {
{"farming:cotton", "farming:cotton", "farming:cotton"}
}
})
-- 4x red mushrooms make mushroom block
minetest.register_craft({
output = "ethereal:mushroom",
recipe = {
{"flowers:mushroom_red", "flowers:mushroom_red"},
{"flowers:mushroom_red", "flowers:mushroom_red"}
}
})
-- X pattern craft recipes (5x 'a' in X pattern gives 5 of 'b')
local cheat = {
if ethereal.xcraft == true then
local cheat = {
{"default:cobble", "default:gravel", 5},
{"default:gravel", "default:dirt", 5},
{"default:dirt", "default:sand", 5},
{"default:ice", "default:snow", 20},
{"ethereal:dry_dirt", "default:desert_sand", 5},
{"default:stone", "default:silver_sandstone", 5}
}
}
for n = 1, #cheat do
for n = 1, #cheat do
minetest.register_craft({
output = cheat[n][2] .. " " .. cheat[n][3],
@ -113,17 +134,9 @@ for n = 1, #cheat do
{cheat[n][1], "", cheat[n][1]}
}
})
end
end
end -- END if
-- Paper (2x3 string = 4 paper)
minetest.register_craft({
output = "default:paper 2",
recipe = {
{"farming:cotton", "farming:cotton", "farming:cotton"}
}
})
-- Palm Wax
minetest.register_craftitem("ethereal:palm_wax", {
@ -142,14 +155,14 @@ minetest.register_craft({
local function add_candle(col, dcol)
local rcol = ""
local rcol = ""
if col ~= "" then
if col ~= "" then
rcol = col
col = "_" .. col
end
end
minetest.register_node("ethereal:candle" .. col, {
minetest.register_node("ethereal:candle" .. col, {
description = S(dcol .. "Candle"),
drawtype = "plantlike",
inventory_image = "ethereal_candle" .. col .. "_static.png",
@ -175,9 +188,10 @@ minetest.register_node("ethereal:candle" .. col, {
type = "fixed",
fixed = { -0.15, -0.5, -0.15, 0.15, 0, 0.15 }
}
})
})
if col ~= "" then
minetest.register_craft({
output = "ethereal:candle" .. col,
recipe = {
@ -203,6 +217,7 @@ add_candle("red", "Red ")
add_candle("violet", "Violet ")
add_candle("yellow", "Yellow ")
-- white candle recipe
minetest.register_craft({
output = "ethereal:candle",
@ -221,6 +236,7 @@ minetest.register_craft({
}
})
-- Wooden Bowl
minetest.register_craftitem("ethereal:bowl", {
description = S("Bowl"),
@ -240,6 +256,7 @@ if not minetest.registered_items["farming:bowl"] then
})
end
-- stone Ladder
minetest.register_node("ethereal:stone_ladder", {
description = S("Stone Ladder"),
@ -270,6 +287,7 @@ minetest.register_craft({
}
})
-- Paper Wall
minetest.register_node("ethereal:paper_wall", {
drawtype = "nodebox",
@ -305,6 +323,7 @@ minetest.register_craft({
}
})
-- Glostone (A little bit of light decoration)
minetest.register_node("ethereal:glostone", {
description = S("Glo Stone"),
@ -316,7 +335,6 @@ minetest.register_node("ethereal:glostone", {
})
minetest.register_craft({
-- type = "shapeless",
output = "ethereal:glostone",
recipe = {
{"", "default:torch", ""},
@ -325,6 +343,7 @@ minetest.register_craft({
}
})
-- Charcoal Lump
minetest.register_craftitem("ethereal:charcoal_lump", {
description = S("Lump of Charcoal"),
@ -360,6 +379,8 @@ minetest.register_craft({
}
})
-- staff of light alternative node list
ethereal.lightstaff_recipes = {
["nether:rack"] = "nether:glowstone",
["nether:rack_deep"] = "nether:glowstone_deep"
@ -369,10 +390,11 @@ ethereal.lightstaff_recipes = {
minetest.register_tool("ethereal:light_staff", {
description = S("Staff of Light"),
inventory_image = "ethereal_light_staff.png",
light_source = 13, -- used by other mods
light_source = 13,
wield_image = "ethereal_light_staff.png",
sound = {breaks = "default_tool_breaks"},
stack_max = 1,
on_use = function(itemstack, user, pointed_thing)
if pointed_thing.type ~= "node" then

View File

@ -86,10 +86,7 @@ if door_mod then
},
description = S("Sakura Wood Door"),
inventory_image = "ethereal_sakura_door_inv.png",
groups = {
snappy = 1, choppy = 2, oddly_breakable_by_hand = 2,
flammable = 2
},
groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sound_open = "doors_glass_door_open",
sound_close = "doors_glass_door_close",
recipe = {

View File

@ -1,6 +1,6 @@
--[[
This fishing routine is inspired by the great work Rootyjr did for MineClone2
This fishing routine is inspired by the great work Rootyjr did for MineClone2
]]--
@ -44,9 +44,9 @@ local bonus_items = {
}
local default_item = "default:dirt"
local random = math.random -- yup we use this a lot
-- add item function
ethereal.add_item = function(fish, junk, bonus)
@ -529,7 +529,7 @@ minetest.register_craftitem("ethereal:worm", {
minetest.register_craft({
output = "ethereal:worm",
recipe = {
{"default:dirt","default:dirt"}
{"default:dirt", "default:dirt"}
}
})

View File

@ -41,9 +41,7 @@ end
local function set_flight(user, set)
if not user then return end
local name = user:get_player_name()
local name = user and user:get_player_name() ; if not name then return end
local privs = minetest.get_player_privs(name)
privs.fly = set
@ -109,10 +107,8 @@ minetest.register_on_joinplayer(function(player)
-- wait 2 seconds before doing flight checks on player
minetest.after(2.0, function(player)
if not player then return end
-- get player name and timer
local name = player:get_player_name() ; if not name then return end
local name = player and player:get_player_name() ; if not name then return end
local timer = get_timer(player)
-- if timer is blank and player can already fly then default and return

103
food.lua
View File

@ -1,6 +1,7 @@
local S = ethereal.intllib
-- Banana (Heals one heart when eaten)
minetest.register_node("ethereal:banana", {
description = S("Banana"),
@ -22,7 +23,9 @@ minetest.register_node("ethereal:banana", {
drop = "ethereal:banana",
on_use = minetest.item_eat(2),
sounds = default.node_sound_leaves_defaults(),
after_place_node = function(pos, placer)
if placer:is_player() then
minetest.set_node(pos, {name = "ethereal:banana", param2 = 1})
end
@ -50,6 +53,7 @@ minetest.register_node("ethereal:banana_bunch", {
drop = "ethereal:banana_bunch",
on_use = minetest.item_eat(6),
sounds = default.node_sound_leaves_defaults(),
after_place_node = function(pos, placer)
if placer:is_player() then
minetest.set_node(pos, {name = "ethereal:banana_bunch", param2 = 1})
@ -86,6 +90,7 @@ minetest.register_craft({
recipe = "ethereal:banana_dough"
})
-- Orange (Heals 2 hearts when eaten)
minetest.register_node("ethereal:orange", {
description = S("Orange"),
@ -107,13 +112,16 @@ minetest.register_node("ethereal:orange", {
drop = "ethereal:orange",
on_use = minetest.item_eat(4),
sounds = default.node_sound_leaves_defaults(),
after_place_node = function(pos, placer)
if placer:is_player() then
minetest.set_node(pos, {name = "ethereal:orange", param2 = 1})
end
end,
end
})
-- Pine Nuts (Heals 1/2 heart when eaten)
minetest.register_craftitem("ethereal:pine_nuts", {
description = S("Pine Nuts"),
@ -132,7 +140,15 @@ minetest.register_craftitem("ethereal:banana_bread", {
on_use = minetest.item_eat(6)
})
-- Coconut (Gives 4 coconut slices, each heal 1/2 heart)
-- coconut settings if farming redo found
local fredo = minetest.get_modpath("farming") and farming and farming.mod
and farming.mod == "redo"
local cdrp = fredo and "ethereal:coconut" or "ethereal:coconut_slice 4"
local cgrp = fredo and {3, 2} or {1, 1}
-- Coconut (drops 4x coconut slice by default, whole coconut if farming redo found)
minetest.register_node("ethereal:coconut", {
description = S("Coconut"),
drawtype = "plantlike",
@ -147,11 +163,19 @@ minetest.register_node("ethereal:coconut", {
fixed = {-0.31, -0.43, -0.31, 0.31, 0.44, 0.31}
},
groups = {
food_coconut = 1, snappy = 1, oddly_breakable_by_hand = 1, cracky = 1,
choppy = 1, flammable = 1, leafdecay = 3, leafdecay_drop = 1
food_coconut = 1, snappy = cgrp[1], oddly_breakable_by_hand = cgrp[2],
cracky = cgrp[1], choppy = cgrp[1], flammable = 1,
leafdecay = 3, leafdecay_drop = 1
},
drop = "ethereal:coconut_slice 4",
sounds = default.node_sound_wood_defaults()
drop = cdrp,
sounds = default.node_sound_wood_defaults(),
after_place_node = function(pos, placer)
if placer:is_player() then
minetest.set_node(pos, {name = "ethereal:coconut", param2 = 1})
end
end
})
-- Coconut Slice (Heals half heart when eaten)
@ -163,6 +187,17 @@ minetest.register_craftitem("ethereal:coconut_slice", {
on_use = minetest.item_eat(1)
})
-- coconut slice recipe (farming redo)
if fredo then
minetest.register_craft({
output = "ethereal:coconut_slice 4",
recipe = {{"farming:cutting_board", "ethereal:coconut"}},
replacements = {{"farming:cutting_board", "farming:cutting_board"}}
})
end
-- coconut slice into whole coconut
minetest.register_craft({
output = "ethereal:coconut",
recipe = {
@ -171,6 +206,7 @@ minetest.register_craft({
}
})
-- Golden Apple (Found on Healing Tree, heals all 10 hearts)
minetest.register_node("ethereal:golden_apple", {
description = S("Golden Apple"),
@ -190,21 +226,28 @@ minetest.register_node("ethereal:golden_apple", {
leafdecay = 3,leafdecay_drop = 1
},
drop = "ethereal:golden_apple",
sounds = default.node_sound_leaves_defaults(),
on_use = function(itemstack, user, pointed_thing)
if user then
user:set_hp(20)
return minetest.do_item_eat(2, nil, itemstack, user, pointed_thing)
end
end,
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
})
-- Hearty Stew (Heals 5 hearts - thanks to ZonerDarkRevention for his DokuCraft DeviantArt bowl texture)
-- Hearty Stew (Heals 5 hearts)
-- thanks to ZonerDarkRevention for his DokuCraft DeviantArt bowl texture)
minetest.register_craftitem("ethereal:hearty_stew", {
description = S("Hearty Stew"),
inventory_image = "ethereal_hearty_stew.png",
@ -222,17 +265,19 @@ minetest.register_craft({
})
-- Extra recipe for hearty stew
if farming and farming.mod and farming.mod == "redo" then
minetest.register_craft({
if fredo then
minetest.register_craft({
output = "ethereal:hearty_stew",
recipe = {
{"group:food_onion","flowers:mushroom_brown", "group:food_beans"},
{"","flowers:mushroom_brown", ""},
{"","group:food_bowl", ""}
}
})
})
end
-- Bucket of Cactus Pulp
minetest.register_craftitem("ethereal:bucket_cactus", {
description = S("Bucket of Cactus Pulp"),
@ -260,7 +305,7 @@ minetest.register_craftitem("ethereal:firethorn_jelly", {
if minetest.registered_items["farming:bowl"] then
minetest.register_craft({
minetest.register_craft({
output = "ethereal:firethorn_jelly",
recipe = {
{"farming:mortar_pestle","vessels:glass_bottle", ""},
@ -271,7 +316,7 @@ minetest.register_craft({
{"bucket:bucket_water", "bucket:bucket_empty 3"},
{"farming:mortar_pestle", "farming:mortar_pestle"}
}
})
})
end
@ -296,7 +341,9 @@ minetest.register_node("ethereal:lemon", {
drop = "ethereal:lemon",
on_use = minetest.item_eat(3),
sounds = default.node_sound_leaves_defaults(),
after_place_node = function(pos, placer)
if placer:is_player() then
minetest.set_node(pos, {name = "ethereal:lemon", param2 = 1})
end
@ -351,6 +398,7 @@ minetest.register_craft({
}
})
-- Olive
minetest.register_node("ethereal:olive", {
description = S("Olive"),
@ -373,7 +421,9 @@ minetest.register_node("ethereal:olive", {
drop = "ethereal:olive",
on_use = minetest.item_eat(1),
sounds = default.node_sound_leaves_defaults(),
after_place_node = function(pos, placer)
if placer:is_player() then
minetest.set_node(pos, {name = "ethereal:olive", param2 = 1})
end
@ -400,6 +450,7 @@ minetest.register_craft({
}
})
-- Kappa Maki (sushi with cucumber)
minetest.register_craftitem("ethereal:sushi_kappamaki", {
description = S("Kappa Maki Sushi"),
@ -414,6 +465,7 @@ minetest.register_craft({
}
})
-- Nigiri (sushi with raw fish)
minetest.register_craftitem("ethereal:sushi_nigiri", {
description = S("Nigiri Sushi"),
@ -428,6 +480,7 @@ minetest.register_craft({
}
})
-- Tamago (sushi with sweet egg)
minetest.register_craftitem("ethereal:sushi_tamago", {
description = S("Tamago Sushi"),
@ -442,12 +495,16 @@ minetest.register_craft({
}
})
-- Fugu (prepared pufferfish)
minetest.register_craftitem("ethereal:fugu", {
description = S("Fugusashi"),
inventory_image = "ethereal_fugu.png",
on_use = function(itemstack, user, pointed_thing)
if user then
if math.random(12) == 1 then
return minetest.do_item_eat(-16, nil, itemstack, user, pointed_thing)
else
@ -468,6 +525,7 @@ minetest.register_craft({
}
})
-- Teriyaki Chicken
minetest.register_craftitem("ethereal:teriyaki_chicken", {
description = S("Teriyaki Chicken"),
@ -487,6 +545,7 @@ minetest.register_craft({
}
})
-- Teriyaki Beef
minetest.register_craftitem("ethereal:teriyaki_beef", {
description = S("Teriyaki Beef"),
@ -506,3 +565,21 @@ minetest.register_craft({
{"group:food_saucepan", "farming:saucepan"}
}
})
-- mushroom soup (Heals 1 heart)
minetest.register_craftitem("ethereal:mushroom_soup", {
description = S("Mushroom Soup"),
inventory_image = "ethereal_mushroom_soup.png",
groups = {drink = 1},
on_use = minetest.item_eat(5, "ethereal:bowl")
})
minetest.register_craft({
output = "ethereal:mushroom_soup",
recipe = {
{"group:food_mushroom"},
{"group:food_mushroom"},
{"group:food_bowl"}
}
})

View File

@ -7,7 +7,7 @@
]]
ethereal = {version = "20220424"}
ethereal = {version = "20220930"}
local function setting(stype, name, default)
@ -75,12 +75,14 @@ local path = minetest.get_modpath("ethereal")
-- Load settings.conf file if found
local input = io.open(path.."/settings.conf", "r")
if input then
dofile(path .. "/settings.conf")
input:close()
input = nil
end
-- Intllib
local S
if minetest.get_translator then
@ -96,6 +98,7 @@ else
end
ethereal.intllib = S
-- Falling node function
ethereal.check_falling = minetest.check_for_falling or nodeupdate
@ -105,8 +108,8 @@ function ethereal.check_creative(name)
return creative_mode_cache or minetest.check_player_privs(name, {creative = true})
end
dofile(path .. "/plantlife.lua")
dofile(path .. "/mushroom.lua")
dofile(path .. "/onion.lua")
dofile(path .. "/crystal.lua")
dofile(path .. "/water.lua")
@ -127,12 +130,17 @@ dofile(path .. "/schems.lua")
dofile(path .. "/decor.lua")
dofile(path .. "/compatibility.lua")
dofile(path .. "/stairs.lua")
dofile(path .. "/lucky_block.lua")
-- add flight if enabled
if ethereal.flight then
dofile(path .. "/flight.lua")
end
-- add lucky blocks if mod active
if minetest.get_modpath("lucky_block") then
dofile(path .. "/lucky_block.lua")
end
-- Set bonemeal aliases
if minetest.get_modpath("bonemeal") then
minetest.register_alias("ethereal:bone", "bonemeal:bone")
@ -146,4 +154,5 @@ if minetest.get_modpath("xanadu") then
dofile(path .. "/plantpack.lua")
end
print ("[MOD] Ethereal loaded")

View File

@ -1,6 +1,7 @@
local S = ethereal.intllib
-- set leaftype (value inside init.lua)
local leaftype = "plantlike"
local leafscale = 1.4
@ -486,10 +487,11 @@ minetest.register_craft({
burntime = 1
})
-- compatibility check for new mt version with leafdecay function
if minetest.registered_nodes["default:dirt_with_rainforest_litter"] then
default.register_leafdecay({
default.register_leafdecay({
trunks = {"default:tree"},
leaves = {
"default:apple", "default:leaves",
@ -498,71 +500,71 @@ default.register_leafdecay({
"ethereal:vine"
},
radius = 3
})
})
default.register_leafdecay({
default.register_leafdecay({
trunks = {"ethereal:willow_trunk"},
leaves = {"ethereal:willow_twig"},
radius = 3
})
})
default.register_leafdecay({
default.register_leafdecay({
trunks = {"ethereal:redwood_trunk"},
leaves = {"ethereal:redwood_leaves"},
radius = 3
})
})
default.register_leafdecay({
default.register_leafdecay({
trunks = {"ethereal:frost_tree"},
leaves = {"ethereal:frost_leaves"},
radius = 3
})
})
default.register_leafdecay({
default.register_leafdecay({
trunks = {"ethereal:yellow_trunk"},
leaves = {"ethereal:yellowleaves", "ethereal:golden_apple"},
radius = 3
})
})
default.register_leafdecay({
default.register_leafdecay({
trunks = {"ethereal:palm_trunk"},
leaves = {"ethereal:palmleaves", "ethereal:coconut"},
radius = 3
})
})
default.register_leafdecay({
default.register_leafdecay({
trunks = {"ethereal:banana_trunk"},
leaves = {"ethereal:bananaleaves", "ethereal:banana", "ethereal:banana_bunch"},
radius = 3
})
})
default.register_leafdecay({
default.register_leafdecay({
trunks = {"ethereal:birch_trunk"},
leaves = {"ethereal:birch_leaves"},
radius = 3
})
})
default.register_leafdecay({
default.register_leafdecay({
trunks = {"ethereal:bamboo"},
leaves = {"ethereal:bamboo_leaves"},
radius = 2
})
})
default.register_leafdecay({
default.register_leafdecay({
trunks = {"ethereal:sakura_trunk"},
leaves = {"ethereal:sakura_leaves", "ethereal:sakura_leaves2"},
radius = 3
})
})
default.register_leafdecay({
default.register_leafdecay({
trunks = {"ethereal:olive_trunk"},
leaves = {"ethereal:olive_leaves", "ethereal:olive"},
radius = 3
})
})
default.register_leafdecay({
default.register_leafdecay({
trunks = {"ethereal:mushroom_trunk"},
leaves = {"ethereal:mushroom", "ethereal:mushroom_pore"},
radius = 3
})
})
end

View File

@ -1,8 +1,4 @@
-- add lucky blocks
if minetest.get_modpath("lucky_block") then
local epath = minetest.get_modpath("ethereal") .. "/schematics/"
lucky_block:add_schematics({
@ -94,20 +90,20 @@ lucky_block:add_blocks({
})
if minetest.get_modpath("3d_armor") then
lucky_block:add_blocks({
lucky_block:add_blocks({
{"dro", {"3d_armor:helmet_crystal"}},
{"dro", {"3d_armor:chestplate_crystal"}},
{"dro", {"3d_armor:leggings_crystal"}},
{"dro", {"3d_armor:boots_crystal"}},
{"lig"}
})
})
end
if minetest.get_modpath("shields") then
lucky_block:add_blocks({
lucky_block:add_blocks({
{"dro", {"shields:shield_crystal"}},
{"exp"}
})
})
end
end -- END IF

View File

@ -1,28 +0,0 @@
local S = ethereal.intllib
-- mushroom soup (Heals 1 heart)
minetest.register_craftitem("ethereal:mushroom_soup", {
description = S("Mushroom Soup"),
inventory_image = "ethereal_mushroom_soup.png",
groups = {drink = 1},
on_use = minetest.item_eat(5, "ethereal:bowl")
})
minetest.register_craft({
output = "ethereal:mushroom_soup",
recipe = {
{"group:food_mushroom"},
{"group:food_mushroom"},
{"group:food_bowl"}
}
})
-- 4x red mushrooms make mushroom block
minetest.register_craft({
output = "ethereal:mushroom",
recipe = {
{"flowers:mushroom_red", "flowers:mushroom_red"},
{"flowers:mushroom_red", "flowers:mushroom_red"}
}
})

View File

@ -1,20 +1,23 @@
local S = ethereal.intllib
-- wild onion
minetest.register_craftitem("ethereal:wild_onion_plant", {
description = S("Wild Onion"),
inventory_image = "ethereal_wild_onion.png",
wield_image = "ethereal_wild_onion.png",
groups = {food_onion = 1, flammable = 2},
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,
on_use = minetest.item_eat(2)
end
})
-- Define Onion growth stages
local crop_def = {
local def = {
drawtype = "plantlike",
tiles = {"ethereal_wild_onion_1.png"},
paramtype = "light",
@ -30,44 +33,45 @@ local crop_def = {
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
growing = 1, not_in_creative_inventory = 1
},
sounds = default.node_sound_leaves_defaults(),
sounds = default.node_sound_leaves_defaults()
}
--stage 1
minetest.register_node("ethereal:onion_1", table.copy(crop_def))
minetest.register_node("ethereal:onion_1", table.copy(def))
--stage 2
crop_def.tiles = {"ethereal_wild_onion_2.png"}
minetest.register_node("ethereal:onion_2", table.copy(crop_def))
def.tiles = {"ethereal_wild_onion_2.png"}
minetest.register_node("ethereal:onion_2", table.copy(def))
--stage 3
crop_def.tiles = {"ethereal_wild_onion_3.png"}
minetest.register_node("ethereal:onion_3", table.copy(crop_def))
def.tiles = {"ethereal_wild_onion_3.png"}
minetest.register_node("ethereal:onion_3", table.copy(def))
--stage 4
crop_def.tiles = {"ethereal_wild_onion_4.png"}
crop_def.drop = {
def.tiles = {"ethereal_wild_onion_4.png"}
def.drop = {
items = {
{items = {"ethereal:wild_onion_plant"}, rarity = 1},
{items = {"ethereal:wild_onion_plant 2"}, rarity = 3},
}
}
minetest.register_node("ethereal:onion_4", table.copy(crop_def))
minetest.register_node("ethereal:onion_4", table.copy(def))
--stage 5
crop_def.tiles = {"ethereal_wild_onion_5.png"}
crop_def.groups.growing = nil
crop_def.selection_box = {
def.tiles = {"ethereal_wild_onion_5.png"}
def.groups.growing = nil
def.selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -2.5/16, 0.5}
}
crop_def.drop = {
def.drop = {
items = {
{items = {"ethereal:wild_onion_plant 2"}, rarity = 1},
{items = {"ethereal:wild_onion_plant 3"}, rarity = 2},
}
}
minetest.register_node("ethereal:onion_5", table.copy(crop_def))
minetest.register_node("ethereal:onion_5", table.copy(def))
-- growing routine if farming redo isn't present
@ -94,6 +98,7 @@ else
interval = 11,
chance = 20,
catch_up = false,
action = function(pos, node)
-- are we on wet soil?

View File

@ -1,6 +1,7 @@
local S = ethereal.intllib
-- Firethorn (poisonous when eaten raw, must be crushed and washed in flowing water 1st)
minetest.register_node("ethereal:firethorn", {
description = S("Firethorn Shrub"),
@ -21,6 +22,7 @@ minetest.register_node("ethereal:firethorn", {
}
})
-- Fire Flower
minetest.register_node("ethereal:fire_flower", {
description = S("Fire Flower"),
@ -56,6 +58,7 @@ minetest.register_craft({
burntime = 20
})
-- Fire Dust
minetest.register_craftitem("ethereal:fire_dust", {
description = S("Fire Dust"),
@ -73,6 +76,7 @@ minetest.register_craft({
burntime = 10
})
-- vines
minetest.register_node("ethereal:vine", {
description = S("Vine"),
@ -102,6 +106,7 @@ minetest.register_craft({
}
})
-- light strings (glowing vine)
minetest.register_node("ethereal:lightstring", {
description = S("Light String Vine"),
@ -132,6 +137,7 @@ minetest.register_craft({
}
})
-- Fern (boston)
minetest.register_node("ethereal:fern", {
description = S("Fern"),
@ -168,6 +174,7 @@ minetest.register_craftitem("ethereal:fern_tubers", {
on_use = minetest.item_eat(1)
})
-- Red Shrub (not flammable)
minetest.register_node("ethereal:dry_shrub", {
description = S("Fiery Dry Shrub"),
@ -188,6 +195,7 @@ minetest.register_node("ethereal:dry_shrub", {
}
})
-- Grey Shrub (not Flammable - too cold to burn)
minetest.register_node("ethereal:snowygrass", {
description = S("Snowy Grass"),
@ -209,6 +217,7 @@ minetest.register_node("ethereal:snowygrass", {
}
})
-- Crystal Shrub (not Flammable - too cold to burn)
minetest.register_node("ethereal:crystalgrass", {
description = S("Crystal Grass"),
@ -230,6 +239,7 @@ minetest.register_node("ethereal:crystalgrass", {
}
})
-- Define Moss Types (Has grass textures on all sides)
local add_moss = function(typ, descr, texture, receipe_item)
@ -242,43 +252,27 @@ local add_moss = function(typ, descr, texture, receipe_item)
})
minetest.register_craft({
type = "shapeless",
output = "ethereal:" .. typ .. "_moss",
recipe = {"default:dirt", receipe_item}
recipe = {{"default:dirt", receipe_item}}
})
end
add_moss( "crystal", "Crystal", "ethereal_grass_crystal_top.png", "ethereal:frost_leaves")
add_moss( "mushroom", "Mushroom", "ethereal_grass_mushroom_top.png", "ethereal:mushroom")
add_moss( "fiery", "Fiery", "ethereal_grass_fiery_top.png", "ethereal:dry_shrub")
add_moss( "gray", "Gray", "ethereal_grass_gray_top.png", "ethereal:snowygrass")
add_moss( "green", "Green", "default_grass.png", "default:jungleleaves")
add_moss("crystal", "Crystal", "ethereal_grass_crystal_top.png", "ethereal:frost_leaves")
add_moss("mushroom", "Mushroom", "ethereal_grass_mushroom_top.png", "ethereal:mushroom")
add_moss("fiery", "Fiery", "ethereal_grass_fiery_top.png", "ethereal:dry_shrub")
add_moss("gray", "Gray", "ethereal_grass_gray_top.png", "ethereal:snowygrass")
add_moss("green", "Green", "default_grass.png", "default:jungleleaves")
-- Illuminated Cave Shrooms (Red, Green and Blue)
minetest.register_node("ethereal:illumishroom", {
description = S("Red Illumishroom"),
drawtype = "plantlike",
tiles = {"ethereal_illumishroom_red.png"},
inventory_image = "ethereal_illumishroom_red.png",
wield_image = "ethereal_illumishroom_red.png",
paramtype = "light",
light_source = 5,
sunlight_propagates = true,
walkable = false,
groups = {dig_immediate = 3, attached_node = 1, flammable = 3},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.47, 6 / 16}
}
})
local add_shroom = function(name, desc, ad)
minetest.register_node("ethereal:illumishroom2", {
description = S("Green Illumishroom"),
minetest.register_node("ethereal:illumishroom" .. ad, {
description = S(desc .. " Illumishroom"),
drawtype = "plantlike",
tiles = {"ethereal_illumishroom_green.png"},
inventory_image = "ethereal_illumishroom_green.png",
wield_image = "ethereal_illumishroom_green.png",
tiles = {"ethereal_illumishroom_" .. name .. ".png"},
inventory_image = "ethereal_illumishroom_" .. name .. ".png",
wield_image = "ethereal_illumishroom_" .. name .. ".png",
paramtype = "light",
light_source = 5,
sunlight_propagates = true,
@ -289,22 +283,9 @@ minetest.register_node("ethereal:illumishroom2", {
type = "fixed",
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.47, 6 / 16}
}
})
})
end
minetest.register_node("ethereal:illumishroom3", {
description = S("Cyan Illumishroom"),
drawtype = "plantlike",
tiles = {"ethereal_illumishroom_cyan.png"},
inventory_image = "ethereal_illumishroom_cyan.png",
wield_image = "ethereal_illumishroom_cyan.png",
paramtype = "light",
light_source = 5,
sunlight_propagates = true,
walkable = false,
groups = {dig_immediate = 3, attached_node = 1, flammable = 3},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.47, 6 / 16}
}
})
add_shroom("red", "Red", "")
add_shroom("green", "Green", "2")
add_shroom("cyan", "Cyan", "3")

View File

@ -96,7 +96,10 @@ minetest.register_decoration({
minetest.register_decoration({
deco_type = "simple",
place_on = {"ethereal:jungle_dirt", "default:dirt_with_grass", "default:dirt_with_rainforest_litter"},
place_on = {
"ethereal:jungle_dirt", "default:dirt_with_grass",
"default:dirt_with_rainforest_litter"
},
sidelen = 16,
fill_ratio = 0.007,
biomes = {"junglee", "jumble"},

View File

@ -1,6 +1,7 @@
local S = ethereal.intllib
-- Bamboo Sprout
minetest.register_node("ethereal:bamboo_sprout", {
description = S("Bamboo Sprout"),
@ -24,6 +25,7 @@ minetest.register_node("ethereal:bamboo_sprout", {
grown_height = 11
})
-- Register Saplings
local register_sapling = function(name, desc, texture, height)
@ -68,21 +70,25 @@ register_sapling("ethereal:olive_tree", "Olive", "ethereal_olive_tree_sapling",
local add_tree = function (pos, ofx, ofy, ofz, schem, replace)
-- check for schematic
if not schem then
print (S("Schematic not found"))
return
end
-- remove sapling and place schematic
minetest.swap_node(pos, {name = "air"})
minetest.place_schematic(
{x = pos.x - ofx, y = pos.y - ofy, z = pos.z - ofz},
minetest.place_schematic({x = pos.x - ofx, y = pos.y - ofy, z = pos.z - ofz},
schem, 0, replace, false)
end
local path = minetest.get_modpath("ethereal") .. "/schematics/"
-- grow tree functions
function ethereal.grow_yellow_tree(pos)
add_tree(pos, 4, 0, 4, ethereal.yellowtree)
end
@ -92,8 +98,9 @@ function ethereal.grow_big_tree(pos)
end
function ethereal.grow_banana_tree(pos)
if math.random(3) == 1
and minetest.find_node_near(pos, 1, {"farming:soil_wet"}) then
if math.random(3) == 1 and minetest.find_node_near(pos, 1, {"farming:soil_wet"}) then
add_tree(pos, 3, 0, 3, ethereal.bananatree,
{{"ethereal:banana", "ethereal:banana_bunch"}})
else
@ -140,6 +147,7 @@ end
function ethereal.grow_sakura_tree(pos)
if math.random(10) == 1 then
add_tree(pos, 4, 0, 3, ethereal.sakura_tree,
{{"ethereal:sakura_leaves", "ethereal:sakura_leaves2"}})
else
@ -155,6 +163,7 @@ function ethereal.grow_olive_tree(pos)
add_tree(pos, 3, 0, 3, ethereal.olivetree)
end
-- check if sapling has enough height room to grow
local enough_height = function(pos, height)
@ -169,13 +178,10 @@ local enough_height = function(pos, height)
end
end
local grow_sapling = function(pos, node)
local under = minetest.get_node({
x = pos.x,
y = pos.y - 1,
z = pos.z
}).name
local under = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z}).name
if not minetest.registered_nodes[node.name] then
return

View File

@ -12,7 +12,7 @@ ethereal.bambootree = {
{ypos = 0, prob = 127},
{ypos = 1, prob = 127},
{ypos = 2, prob = 127},
{ypos = 3, prob = 127},
{ypos = 3, prob = 127}
},
data = {

View File

@ -10,7 +10,7 @@ ethereal.bigtree = {
yslice_prob = {
{ypos = 0, prob = 127},
{ypos = 1, prob = 127},
{ypos = 1, prob = 127}
},
data = {

View File

@ -10,7 +10,7 @@ ethereal.birchtree = {
yslice_prob = {
{ypos = 0, prob = 127},
{ypos = 3, prob = 127},
{ypos = 3, prob = 127}
},
data = {

View File

@ -9,7 +9,7 @@ ethereal.bush = {
yslice_prob = {
{ypos = 0, prob = 127},
{ypos = 2, prob = 127},
{ypos = 2, prob = 127}
},
data = {

View File

@ -15,7 +15,7 @@ ethereal.frosttrees = {
{ypos = 4, prob = 127},
{ypos = 5, prob = 127},
{ypos = 13, prob = 127}, -- leaves
{ypos = 15, prob = 127},
{ypos = 15, prob = 127}
},
data = {

View File

@ -11,7 +11,7 @@ ethereal.lemontree = {
yslice_prob = {
{ypos = 0, prob = 127},
{ypos = 3, prob = 127},
{ypos = 3, prob = 127}
},
data = {

View File

@ -11,7 +11,7 @@ ethereal.mushroomone = {
yslice_prob = {
{ypos = 0, prob = 127},
{ypos = 1, prob = 127},
{ypos = 7, prob = 127},
{ypos = 7, prob = 127}
},
data = {

View File

@ -8,8 +8,6 @@ ethereal.olivetree = {
size = {x = 8, y = 9, z = 7},
data = {
_,_,_,_,_,_,_,_,
@ -82,7 +80,5 @@ ethereal.olivetree = {
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
}
}

View File

@ -10,7 +10,7 @@ ethereal.orangetree = {
size = {x = 5, y = 6, z = 5},
yslice_prob = {
{ypos = 0, prob = 127},
{ypos = 0, prob = 127}
},
data = {

View File

@ -11,7 +11,7 @@ ethereal.palmtree = {
size = {x = 9, y = 9, z = 9},
yslice_prob = {
{ypos = 3, prob = 127},
{ypos = 3, prob = 127}
},
data = {

View File

@ -9,7 +9,7 @@ ethereal.pinetree = {
yslice_prob = {
{ypos = 0, prob = 127},
{ypos = 4, prob = 127},
{ypos = 4, prob = 127}
},
data = {

View File

@ -12,208 +12,208 @@ ethereal.redwood_small_tree = {
{ypos = 1, prob = 127},
{ypos = 2, prob = 127},
{ypos = 3, prob = 127},
{ypos = 4, prob = 127},
{ypos = 4, prob = 127}
},
data = {
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,L,L,T,L,L,
_,_,_,_,_,L,L,L,_,
_,_,_,_,_,_,_,_,_,
_,L,L,L,L,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,L,L,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,L,L,T,L,L,
_,_,_,_,_,L,L,L,_,
_,_,_,_,_,_,_,_,_,
_,L,L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_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
L,L,L,_,_,_,_,_,_,
_,_,_,_,L,L,L,L,L,
_,_,_,_,_,_,L,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,L,L,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
}
}

File diff suppressed because it is too large Load Diff

View File

@ -10,7 +10,7 @@ ethereal.sakura_tree = {
yslice_prob = {
{ypos = 0, prob = 127},
{ypos = 3, prob = 127},
{ypos = 8, prob = 127},
{ypos = 8, prob = 127}
},
data = {
@ -92,5 +92,5 @@ _,_,_,P,P,P,_,_,_,_,
_,_,_,_,P,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,_,
},
}
}

View File

@ -12,7 +12,7 @@ ethereal.vinetree = {
size = {x = 7, y = 7, z = 7},
yslice_prob = {
{ypos = 0, prob = 127},
{ypos = 0, prob = 127}
},
data = {

View File

@ -13,7 +13,7 @@ ethereal.volcanol = {
yslice_prob = {
{ypos = 0, prob = 127},
{ypos = 1, prob = 127},
{ypos = 2, prob = 127},
{ypos = 2, prob = 127}
},
data = {

View File

@ -9,7 +9,7 @@ ethereal.volcanom = {
size = {x = 6, y = 2, z = 6},
yslice_prob = {
{ypos = 0, prob = 127},
{ypos = 0, prob = 127}
},
data = {

View File

@ -2,16 +2,19 @@
-- waterlily
ethereal.waterlily = {
size = {x = 1, y = 3, z = 1},
data = {
{name = "default:sand", param1 = 255},
{name = "default:water_source", param1 = 255},
{name = "flowers:waterlily", param1 = 255},
},
}
}
if ethereal.lilywalk == true then
minetest.override_item("flowers:waterlily", {

View File

@ -10,7 +10,7 @@ ethereal.willow = {
yslice_prob = {
{ypos = 0, prob = 127},
{ypos = 1, prob = 127},
{ypos = 1, prob = 127}
},
data = {

View File

@ -12,7 +12,7 @@ ethereal.yellowtree = {
yslice_prob = {
{ypos = 0, prob = 254},
{ypos = 3, prob = 254},
{ypos = 5, prob = 254},
{ypos = 5, prob = 254}
},
data = {

View File

@ -163,6 +163,7 @@ add_schem({"ethereal:grove_dirt"}, 0.002, {"mediterranean"}, 5, 35,
-- default large cactus
if ethereal.desert == 1 then
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:desert_sand"},

View File

@ -1,6 +1,7 @@
local S = ethereal.intllib
-- Seaweed
minetest.register_node("ethereal:seaweed", {
description = S("Seaweed"),
@ -20,6 +21,7 @@ minetest.register_node("ethereal:seaweed", {
groups = {food_seaweed = 1, snappy = 3, flammable = 3},
on_use = minetest.item_eat(1),
sounds = default.node_sound_leaves_defaults(),
after_dig_node = function(pos, node, metadata, digger)
default.dig_up(pos, node, digger)
end
@ -31,6 +33,7 @@ minetest.register_craft( {
recipe = {"ethereal:seaweed"}
})
-- agar powder
minetest.register_craftitem("ethereal:agar_powder", {
description = S("Agar Powder"),
@ -50,6 +53,7 @@ minetest.register_craft({
}
})
-- Blue Coral
minetest.register_node("ethereal:coral2", {
description = S("Blue Glow Coral"),
@ -72,6 +76,7 @@ minetest.register_craft( {
recipe = {{"ethereal:coral2"}}
})
-- Orange Coral
minetest.register_node("ethereal:coral3", {
description = S("Orange Glow Coral"),
@ -94,6 +99,7 @@ minetest.register_craft( {
recipe = {{"ethereal:coral3"}}
})
-- Pink Coral
minetest.register_node("ethereal:coral4", {
description = S("Pink Glow Coral"),
@ -116,6 +122,7 @@ minetest.register_craft( {
recipe = {{"ethereal:coral4"}}
})
-- Green Coral
minetest.register_node("ethereal:coral5", {
description = S("Green Glow Coral"),
@ -138,7 +145,8 @@ minetest.register_craft( {
recipe = {{"ethereal:coral5"}}
})
-- Undersea Sand
-- Undersea Sand (used for growing seaweed and corals)
minetest.register_node("ethereal:sandy", {
description = S("Sandy"),
tiles = {"default_sand.png"},
@ -150,10 +158,11 @@ minetest.register_node("ethereal:sandy", {
sounds = default.node_sound_sand_defaults()
})
-- randomly generate coral or seaweed and have seaweed grow up to 14 high
if ethereal.sealife == 1 then
minetest.register_abm({
minetest.register_abm({
label = "Grow coral/seaweed",
nodenames = {"ethereal:sandy"},
neighbors = {"group:water"},
@ -204,10 +213,11 @@ minetest.register_abm({
end
end
end
})
})
end
-- sponges
-- sponge nodes
minetest.register_node("ethereal:sponge_air", {
drawtype = "airlike",
@ -220,6 +230,12 @@ minetest.register_node("ethereal:sponge_air", {
groups = {not_in_creative_inventory = 1}
})
minetest.register_node("ethereal:sponge_wet", {
description = S("Wet sponge"),
tiles = {"ethereal_sponge_wet.png"},
groups = {crumbly = 3},
sounds = default.node_sound_sand_defaults()
})
minetest.register_node("ethereal:sponge", {
description = S("Sponge"),
@ -259,14 +275,6 @@ minetest.register_node("ethereal:sponge", {
end
})
minetest.register_node("ethereal:sponge_wet", {
description = S("Wet sponge"),
tiles = {"ethereal_sponge_wet.png"},
groups = {crumbly = 3},
sounds = default.node_sound_sand_defaults()
})
-- cook wet sponge into dry sponge
minetest.register_craft({
type = "cooking",

View File

@ -22,7 +22,7 @@ local do_stair = function(description, name, node, groups, texture, sound)
description = S(description),
tiles = texture,
groups = groups,
sounds = sound,
sounds = sound
})
-- aliases need to be set for previous stairs to avoid unknown nodes

View File

@ -1,20 +1,23 @@
local S = ethereal.intllib
-- Strawberry (can also be planted as seed)
minetest.register_craftitem("ethereal:strawberry", {
description = S("Strawberry"),
inventory_image = "ethereal_strawberry.png",
wield_image = "ethereal_strawberry.png",
groups = {food_strawberry = 1, food_berry = 1, flammable = 2},
on_use = minetest.item_eat(1),
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "ethereal:strawberry_1")
end,
on_use = minetest.item_eat(1)
end
})
-- Define Strawberry Bush growth stages
local crop_def = {
local def = {
drawtype = "plantlike",
tiles = {"ethereal_strawberry_1.png"},
paramtype = "light",
@ -35,58 +38,58 @@ local crop_def = {
}
--stage 1
minetest.register_node("ethereal:strawberry_1", table.copy(crop_def))
minetest.register_node("ethereal:strawberry_1", table.copy(def))
-- stage 2
crop_def.tiles = {"ethereal_strawberry_2.png"}
minetest.register_node("ethereal:strawberry_2", table.copy(crop_def))
def.tiles = {"ethereal_strawberry_2.png"}
minetest.register_node("ethereal:strawberry_2", table.copy(def))
-- stage 3
crop_def.tiles = {"ethereal_strawberry_3.png"}
minetest.register_node("ethereal:strawberry_3", table.copy(crop_def))
def.tiles = {"ethereal_strawberry_3.png"}
minetest.register_node("ethereal:strawberry_3", table.copy(def))
-- stage 4
crop_def.tiles = {"ethereal_strawberry_4.png"}
minetest.register_node("ethereal:strawberry_4", table.copy(crop_def))
def.tiles = {"ethereal_strawberry_4.png"}
minetest.register_node("ethereal:strawberry_4", table.copy(def))
-- stage 5
crop_def.tiles = {"ethereal_strawberry_5.png"}
minetest.register_node("ethereal:strawberry_5", table.copy(crop_def))
def.tiles = {"ethereal_strawberry_5.png"}
minetest.register_node("ethereal:strawberry_5", table.copy(def))
-- stage 6
crop_def.tiles = {"ethereal_strawberry_6.png"}
crop_def.drop = {
def.tiles = {"ethereal_strawberry_6.png"}
def.drop = {
items = {
{items = {"ethereal:strawberry 1"}, rarity = 2},
{items = {"ethereal:strawberry 2"}, rarity = 3}
}
}
minetest.register_node("ethereal:strawberry_6", table.copy(crop_def))
minetest.register_node("ethereal:strawberry_6", table.copy(def))
-- stage 7
crop_def.tiles = {"ethereal_strawberry_7.png"}
crop_def.drop = {
def.tiles = {"ethereal_strawberry_7.png"}
def.drop = {
items = {
{items = {"ethereal:strawberry 1"}, rarity = 1},
{items = {"ethereal:strawberry 2"}, rarity = 3}
}
}
minetest.register_node("ethereal:strawberry_7", table.copy(crop_def))
minetest.register_node("ethereal:strawberry_7", table.copy(def))
-- stage 8
crop_def.tiles = {"ethereal_strawberry_8.png"}
crop_def.groups.growing = nil
crop_def.selection_box = {
-- stage 8 (final)
def.tiles = {"ethereal_strawberry_8.png"}
def.groups.growing = nil
def.selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -2.5/16, 0.5}
}
crop_def.drop = {
def.drop = {
items = {
{items = {"ethereal:strawberry 2"}, rarity = 1},
{items = {"ethereal:strawberry 3"}, rarity = 3}
}
}
minetest.register_node("ethereal:strawberry_8", table.copy(crop_def))
minetest.register_node("ethereal:strawberry_8", table.copy(def))
-- growing routine if farming redo isn't present
@ -114,6 +117,7 @@ else
interval = 9,
chance = 20,
catch_up = false,
action = function(pos, node)
-- are we on wet soil?

View File

@ -1,6 +1,7 @@
local S = ethereal.intllib
-- Ice Brick
minetest.register_node("ethereal:icebrick", {
description = S("Ice Brick"),
@ -19,6 +20,7 @@ minetest.register_craft({
}
})
-- Snow Brick
minetest.register_node("ethereal:snowbrick", {
description = S("Snow Brick"),
@ -41,6 +43,7 @@ minetest.register_craft({
}
})
-- If Crystal Spike, Snow near Water, change Water to Ice
minetest.register_abm({
label = "Ethereal freeze water",
@ -52,6 +55,7 @@ minetest.register_abm({
interval = 15,
chance = 4,
catch_up = false,
action = function(pos, node)
local near = minetest.find_node_near(pos, 1,
@ -60,9 +64,10 @@ minetest.register_abm({
if near then
minetest.swap_node(near, {name = "default:ice"})
end
end,
end
})
-- If Heat Source near Ice or Snow then melt.
minetest.register_abm({
label = "Ethereal melt snow/ice",
@ -78,6 +83,7 @@ minetest.register_abm({
interval = 5,
chance = 4,
catch_up = false,
action = function(pos, node)
local water_node = "default:water"
@ -90,19 +96,20 @@ minetest.register_abm({
or node.name == "default:snowblock"
or node.name == "ethereal:icebrick"
or node.name == "ethereal:snowbrick" then
minetest.swap_node(pos, {name = water_node.."_source"})
minetest.swap_node(pos, {name = water_node .. "_source"})
elseif node.name == "default:snow" then
minetest.swap_node(pos, {name = water_node.."_flowing"})
minetest.swap_node(pos, {name = water_node .. "_flowing"})
elseif node.name == "default:dirt_with_snow" then
minetest.swap_node(pos, {name = "default:dirt_with_grass"})
end
ethereal.check_falling(pos)
end,
end
})
-- If Water Source near Dry Dirt, change to normal Dirt
minetest.register_abm({
label = "Ethereal wet dry dirt",
@ -114,6 +121,7 @@ minetest.register_abm({
interval = 15,
chance = 2,
catch_up = false,
action = function(pos, node)
if node.name == "ethereal:dry_dirt"
@ -127,35 +135,36 @@ minetest.register_abm({
end
})
-- when enabled, drop torches that are touching water
if ethereal.torchdrop == true and not minetest.get_modpath("real_torch") then
minetest.register_abm({
minetest.register_abm({
label = "Ethereal drop torch",
nodenames = {"default:torch", "default:torch_wall", "default:torch_ceiling"},
neighbors = {"group:water"},
interval = 5,
chance = 1,
catch_up = false,
action = function(pos, node)
local num = #minetest.find_nodes_in_area(
{x = pos.x - 1, y = pos.y, z = pos.z},
{x = pos.x + 1, y = pos.y, z = pos.z},
{"group:water"})
{x = pos.x + 1, y = pos.y, z = pos.z}, {"group:water"})
if num == 0 then
num = num + #minetest.find_nodes_in_area(
{x = pos.x, y = pos.y, z = pos.z - 1},
{x = pos.x, y = pos.y, z = pos.z + 1},
{"group:water"})
{x = pos.x, y = pos.y, z = pos.z + 1}, {"group:water"})
end
if num == 0 then
num = num + #minetest.find_nodes_in_area(
{x = pos.x, y = pos.y + 1, z = pos.z},
{x = pos.x, y = pos.y + 1, z = pos.z},
{"group:water"})
{x = pos.x, y = pos.y + 1, z = pos.z}, {"group:water"})
end
if num > 0 then
@ -163,10 +172,10 @@ minetest.register_abm({
minetest.set_node(pos, {name = "air"})
minetest.sound_play("fire_extinguish_flame",
{pos = pos, gain = 0.2, max_hear_distance = 10})
{pos = pos, gain = 0.2, max_hear_distance = 10}, true)
minetest.add_item(pos, {name = "default:torch"})
end
end
})
})
end

View File

@ -1,6 +1,7 @@
local S = ethereal.intllib
-- sakura trunk
minetest.register_node("ethereal:sakura_trunk", {
description = S("Sakura Trunk"),
@ -31,6 +32,7 @@ minetest.register_craft({
recipe = {{"ethereal:sakura_trunk"}}
})
-- willow trunk
minetest.register_node("ethereal:willow_trunk", {
description = S("Willow Trunk"),
@ -61,6 +63,7 @@ minetest.register_craft({
recipe = {{"ethereal:willow_trunk"}}
})
-- redwood trunk
minetest.register_node("ethereal:redwood_trunk", {
description = S("Redwood Trunk"),
@ -91,6 +94,7 @@ minetest.register_craft({
recipe = {{"ethereal:redwood_trunk"}}
})
-- frost trunk
minetest.register_node("ethereal:frost_tree", {
description = S("Frost Tree"),
@ -121,6 +125,7 @@ minetest.register_craft({
recipe = {{"ethereal:frost_tree"}}
})
-- healing trunk
minetest.register_node("ethereal:yellow_trunk", {
description = S("Healing Tree Trunk"),
@ -151,6 +156,7 @@ minetest.register_craft({
recipe = {{"ethereal:yellow_trunk"}}
})
-- palm trunk (thanks to VanessaE for palm textures)
minetest.register_node("ethereal:palm_trunk", {
description = S("Palm Trunk"),
@ -181,6 +187,7 @@ minetest.register_craft({
recipe = {{"ethereal:palm_trunk"}}
})
-- banana trunk
minetest.register_node("ethereal:banana_trunk", {
description = S("Banana Trunk"),
@ -211,6 +218,7 @@ minetest.register_craft({
recipe = {{"ethereal:banana_trunk"}}
})
-- scorched trunk
minetest.register_node("ethereal:scorched_tree", {
description = S("Scorched Tree"),
@ -234,6 +242,7 @@ minetest.register_craft({
}
})
-- mushroom trunk
minetest.register_node("ethereal:mushroom_trunk", {
description = S("Mushroom"),
@ -248,6 +257,7 @@ minetest.register_node("ethereal:mushroom_trunk", {
on_place = minetest.rotate_node
})
-- birch trunk (thanks to VanessaE for birch textures)
minetest.register_node("ethereal:birch_trunk", {
description = S("Birch Trunk"),
@ -278,6 +288,7 @@ minetest.register_craft({
recipe = {{"ethereal:birch_trunk"}}
})
-- Bamboo (thanks to Nelo-slay on DeviantArt for the free Bamboo base image)
minetest.register_node("ethereal:bamboo", {
description = S("Bamboo"),
@ -294,6 +305,7 @@ minetest.register_node("ethereal:bamboo", {
},
groups = {choppy = 3, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default.node_sound_leaves_defaults(),
after_dig_node = function(pos, node, metadata, digger)
default.dig_up(pos, node, digger)
end
@ -305,6 +317,7 @@ minetest.register_craft({
burntime = 2
})
-- olive trunk
minetest.register_node("ethereal:olive_trunk", {
description = S("Olive Trunk"),