Code tidy and fixed fruit not dropping
This commit is contained in:
parent
2bc7406c9a
commit
023d0303c1
55
crystal.lua
55
crystal.lua
@ -7,9 +7,10 @@ minetest.register_node("ethereal:crystal_spike", {
|
||||
wield_image = "crystal_spike.png",
|
||||
paramtype = "light",
|
||||
light_source = default.LIGHT_MAX - 7,
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
damage_per_second = 1,
|
||||
groups = {cracky=1,falling_node=1,puts_out_fire=1},
|
||||
groups = {cracky = 1, falling_node = 1, puts_out_fire = 1},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
@ -38,7 +39,7 @@ minetest.register_node("ethereal:crystal_block", {
|
||||
tiles = {"crystal_block.png"},
|
||||
light_source = default.LIGHT_MAX - 5,
|
||||
is_ground_content = false,
|
||||
groups = {cracky=1,level=2,puts_out_fire=1},
|
||||
groups = {cracky = 1, level = 2, puts_out_fire = 1},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
@ -64,11 +65,15 @@ minetest.register_tool("ethereal:sword_crystal", {
|
||||
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},
|
||||
max_drop_level = 1,
|
||||
groupcaps = {
|
||||
snappy = {
|
||||
times = {[1] = 1.70, [2] = 0.70, [3] = 0.25},
|
||||
uses = 50,
|
||||
maxlevel = 3
|
||||
},
|
||||
},
|
||||
damage_groups = {fleshy=10},
|
||||
damage_groups = {fleshy = 10},
|
||||
}
|
||||
})
|
||||
|
||||
@ -87,11 +92,15 @@ minetest.register_tool("ethereal:axe_crystal", {
|
||||
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},
|
||||
max_drop_level = 1,
|
||||
groupcaps = {
|
||||
choppy = {
|
||||
times = {[1] = 2.00, [2] = 0.80, [3] = 0.40},
|
||||
uses = 30,
|
||||
maxlevel = 2
|
||||
},
|
||||
},
|
||||
damage_groups = {fleshy=7},
|
||||
damage_groups = {fleshy = 7},
|
||||
},
|
||||
})
|
||||
|
||||
@ -110,11 +119,15 @@ minetest.register_tool("ethereal:pick_crystal", {
|
||||
inventory_image = "crystal_pick.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.7,
|
||||
max_drop_level=3,
|
||||
max_drop_level = 3,
|
||||
groupcaps={
|
||||
cracky = {times={[1]=1.8, [2]=0.8, [3]=0.40}, uses=40, maxlevel=3},
|
||||
cracky = {
|
||||
times = {[1] = 1.8, [2] = 0.8, [3] = 0.40},
|
||||
uses = 40,
|
||||
maxlevel = 3
|
||||
},
|
||||
},
|
||||
damage_groups = {fleshy=7},
|
||||
damage_groups = {fleshy = 7},
|
||||
},
|
||||
})
|
||||
|
||||
@ -141,11 +154,11 @@ minetest.register_tool("ethereal:shovel_crystal", {
|
||||
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")
|
||||
local nn = minetest.get_node_or_nil(pos)
|
||||
if nn then nn = nn.name else return end
|
||||
|
||||
-- Is node dirt, sand or gravel
|
||||
if is_crumbly == 1 or is_crumbly == 2 or is_crumbly == 3 then
|
||||
if minetest.get_item_group(nn, "crumbly") > 0 then
|
||||
|
||||
local inv = user:get_inventory()
|
||||
|
||||
@ -153,13 +166,11 @@ minetest.register_tool("ethereal:shovel_crystal", {
|
||||
nodeupdate(pos)
|
||||
|
||||
inv:add_item("main", {name = nn})
|
||||
itemstack:add_wear(65535/100) -- 111 uses
|
||||
itemstack:add_wear(65535 / 100) -- 111 uses
|
||||
minetest.sound_play("default_dirt_footstep", {pos = pos, gain = 0.35})
|
||||
return itemstack
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end,
|
||||
})
|
||||
|
||||
@ -172,18 +183,16 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
-- Crystal Gilly Staff (replenishes air supply when used, great for exploring underwater)
|
||||
-- Crystal Gilly Staff (replenishes air supply when used)
|
||||
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,
|
||||
})
|
||||
|
||||
@ -194,4 +203,4 @@ minetest.register_craft({
|
||||
{"ethereal:crystal_moss", "ethereal:crystal_ingot", "ethereal:mushroom_moss"},
|
||||
{"", "ethereal:crystal_ingot", ""},
|
||||
}
|
||||
})
|
||||
})
|
25
dirt.lua
25
dirt.lua
@ -6,7 +6,7 @@ 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},
|
||||
groups = {crumbly = 3, soil = 1, ethereal_grass = 1},
|
||||
drop = "default:dirt",
|
||||
sounds = default.node_sound_dirt_defaults()
|
||||
})
|
||||
@ -16,7 +16,7 @@ minetest.register_node("ethereal:dry_dirt", {
|
||||
description = "Dried Dirt",
|
||||
tiles = {"ethereal_dry_dirt.png"},
|
||||
is_ground_content = false,
|
||||
groups = {crumbly=3},
|
||||
groups = {crumbly = 3},
|
||||
sounds = default.node_sound_dirt_defaults()
|
||||
})
|
||||
|
||||
@ -29,7 +29,8 @@ minetest.register_craft({
|
||||
|
||||
local dirt = {}
|
||||
dirt.type = {
|
||||
{"Bamboo"}, {"Jungle"}, {"Grove"}, {"Prairie"}, {"Cold"}, {"Crystal"}, {"Mushroom"}, {"Fiery"}, {"Gray"},
|
||||
{"Bamboo"}, {"Jungle"}, {"Grove"}, {"Prairie"}, {"Cold"},
|
||||
{"Crystal"}, {"Mushroom"}, {"Fiery"}, {"Gray"},
|
||||
}
|
||||
|
||||
for _, row in ipairs(dirt.type) do
|
||||
@ -40,9 +41,9 @@ for _, row in ipairs(dirt.type) do
|
||||
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"},
|
||||
"default_dirt.png^ethereal_grass_"..name.."_side.png"},
|
||||
is_ground_content = false,
|
||||
groups = {crumbly=3,soil=1,ethereal_grass=1},
|
||||
groups = {crumbly = 3, soil = 1, ethereal_grass = 1},
|
||||
drop = "default:dirt",
|
||||
sounds = default.node_sound_dirt_defaults()
|
||||
})
|
||||
@ -65,8 +66,8 @@ minetest.register_abm({
|
||||
local curr_max = 0
|
||||
local curr_type = "ethereal:green_dirt" -- fallback
|
||||
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)},
|
||||
{x = (pos.x - 2), y = (pos.y - 1), z = (pos.z - 2)},
|
||||
{x = (pos.x + 2), y = (pos.y + 1), z = (pos.z + 2)},
|
||||
"group:ethereal_grass")
|
||||
local n
|
||||
-- count new grass nodes
|
||||
@ -82,7 +83,7 @@ minetest.register_abm({
|
||||
end
|
||||
end
|
||||
minetest.set_node(pos, {name = curr_type})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
-- if grass devoid of light, change to dirt
|
||||
@ -91,7 +92,7 @@ minetest.register_abm({
|
||||
interval = 2,
|
||||
chance = 20,
|
||||
action = function(pos, node)
|
||||
local name = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name
|
||||
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")
|
||||
@ -107,7 +108,7 @@ if not minetest.get_modpath("bakedclay") then
|
||||
minetest.register_node(":bakedclay:red", {
|
||||
description = "Red Baked Clay",
|
||||
tiles = {"baked_clay_red.png"},
|
||||
groups = {cracky=3},
|
||||
groups = {cracky = 3},
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
@ -122,7 +123,7 @@ if not minetest.get_modpath("bakedclay") then
|
||||
minetest.register_node(":bakedclay:orange", {
|
||||
description = "Orange Baked Clay",
|
||||
tiles = {"baked_clay_orange.png"},
|
||||
groups = {cracky=3},
|
||||
groups = {cracky = 3},
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
@ -134,4 +135,4 @@ if not minetest.get_modpath("bakedclay") then
|
||||
"Baked Clay Orange Slab",
|
||||
default.node_sound_stone_defaults())
|
||||
|
||||
end
|
||||
end
|
33
extra.lua
33
extra.lua
@ -13,7 +13,7 @@ minetest.register_node("ethereal:vine", {
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
},
|
||||
groups = {choppy=3, oddly_breakable_by_hand=1},
|
||||
groups = {choppy = 3, oddly_breakable_by_hand = 1},
|
||||
legacy_wallmounted = true,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
@ -35,6 +35,7 @@ minetest.register_node("ethereal:stone_ladder", {
|
||||
inventory_image = "stone_ladder.png",
|
||||
wield_image = "stone_ladder.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "wallmounted",
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
@ -42,7 +43,7 @@ minetest.register_node("ethereal:stone_ladder", {
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
},
|
||||
groups = {cracky=3, oddly_breakable_by_hand=1},
|
||||
groups = {cracky = 3, oddly_breakable_by_hand = 1},
|
||||
legacy_wallmounted = true,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
@ -62,7 +63,7 @@ minetest.register_node("ethereal:paper_wall", {
|
||||
description = ("Paper Wall"),
|
||||
tiles = {"paper_wall.png",},
|
||||
paramtype = "light",
|
||||
groups = {snappy=3},
|
||||
groups = {snappy = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
walkable = true,
|
||||
is_ground_content = false,
|
||||
@ -92,7 +93,7 @@ minetest.register_craft({
|
||||
minetest.register_node("ethereal:glostone", {
|
||||
description = "Glo Stone",
|
||||
tiles = {"glostone.png"},
|
||||
groups = {cracky=3},
|
||||
groups = {cracky = 3},
|
||||
light_source = default.LIGHT_MAX - 1,
|
||||
drop = "ethereal:glostone",
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
@ -180,8 +181,8 @@ minetest.register_node("ethereal:quicksand", {
|
||||
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},
|
||||
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(),
|
||||
})
|
||||
|
||||
@ -202,8 +203,8 @@ minetest.register_node("ethereal:quicksand2", {
|
||||
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},
|
||||
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(),
|
||||
})
|
||||
|
||||
@ -217,7 +218,7 @@ minetest.register_node("ethereal:illumishroom", {
|
||||
paramtype = "light",
|
||||
light_source = 5,
|
||||
walkable = false,
|
||||
groups = {dig_immediate=3, attached_node=1,flammable=3},
|
||||
groups = {dig_immediate = 3, attached_node = 1,flammable = 3},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
@ -234,7 +235,7 @@ minetest.register_node("ethereal:illumishroom2", {
|
||||
paramtype = "light",
|
||||
light_source = 5,
|
||||
walkable = false,
|
||||
groups = {dig_immediate=3, attached_node=1,flammable=3},
|
||||
groups = {dig_immediate = 3, attached_node = 1,flammable = 3},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
@ -251,7 +252,7 @@ minetest.register_node("ethereal:illumishroom3", {
|
||||
paramtype = "light",
|
||||
light_source = 5,
|
||||
walkable = false,
|
||||
groups = {dig_immediate=3, attached_node=1,flammable=3},
|
||||
groups = {dig_immediate = 3, attached_node = 1,flammable = 3},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
@ -278,7 +279,8 @@ minetest.register_tool("ethereal:light_staff", {
|
||||
return
|
||||
end
|
||||
|
||||
local node = minetest.get_node(pos).name
|
||||
local node = minetest.get_node_or_nil(pos)
|
||||
if node then node = node.name else return end
|
||||
|
||||
if node == "default:stone" then
|
||||
minetest.add_node(pos, {name="ethereal:glostone"})
|
||||
@ -302,13 +304,12 @@ minetest.register_craft({
|
||||
|
||||
-- Generate Illumishroom in caves next to coal
|
||||
minetest.register_on_generated(function(minp, maxp)
|
||||
if minp.y > -30
|
||||
or maxp.y < -3000 then
|
||||
if minp.y > -30 or maxp.y < -3000 then
|
||||
return
|
||||
end
|
||||
local bpos
|
||||
for key, pos in pairs(minetest.find_nodes_in_area(minp, maxp, "default:stone_with_coal")) do
|
||||
bpos = { x=pos.x, y=pos.y + 1, z=pos.z }
|
||||
bpos = {x = pos.x, y = pos.y + 1, z = pos.z }
|
||||
if minetest.get_node(bpos).name == "air" then
|
||||
if bpos.y > -3000 and bpos.y < -2000 then
|
||||
minetest.add_node(bpos, {name = "ethereal:illumishroom3"})
|
||||
@ -319,4 +320,4 @@ minetest.register_on_generated(function(minp, maxp)
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
end)
|
53
fences.lua
53
fences.lua
@ -1,47 +1,42 @@
|
||||
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"},
|
||||
{"pine", "Pine Wood", "default_pinewood.png", "default:pinewood"},
|
||||
local fences = {
|
||||
{"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"},
|
||||
{"pine", "Pine Wood", "default_pinewood.png", "default:pinewood"},
|
||||
}
|
||||
|
||||
for _, row in ipairs(fence.type) do
|
||||
local name = row[1]
|
||||
local desc = row[2]
|
||||
local texture = row[3]
|
||||
local nod = row[4]
|
||||
for _, row in ipairs(fences) do
|
||||
|
||||
minetest.register_node("ethereal:fence_"..name, {
|
||||
description = desc.." Fence",
|
||||
minetest.register_node("ethereal:fence_"..row[1], {
|
||||
description = row[2].." Fence",
|
||||
drawtype = "fencelike",
|
||||
is_ground_content = false,
|
||||
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",
|
||||
tiles = {row[3]},
|
||||
inventory_image = "default_fence_overlay.png^"..row[3].."^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
wield_image = "default_fence_overlay.png^"..row[3].."^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
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},
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "ethereal:fence_"..name.." 4",
|
||||
output = "ethereal:fence_"..row[1].." 4",
|
||||
recipe = {
|
||||
{nod, "group:stick", nod},
|
||||
{nod, "group:stick", nod},
|
||||
{row[4], "group:stick", row[4]},
|
||||
{row[4], "group:stick", row[4]},
|
||||
}
|
||||
})
|
||||
|
||||
end
|
||||
end
|
72
fishing.lua
72
fishing.lua
@ -12,6 +12,13 @@ minetest.register_craftitem("ethereal:fish_cooked", {
|
||||
on_use = minetest.item_eat(5),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "ethereal:fish_cooked",
|
||||
recipe = "ethereal:fish_raw",
|
||||
cooktime = 2,
|
||||
})
|
||||
|
||||
-- Sashimi (Thanks to Natalia Grosner for letting me use the sashimi image)
|
||||
minetest.register_craftitem("ethereal:sashimi", {
|
||||
description = "Sashimi",
|
||||
@ -36,38 +43,8 @@ minetest.register_craftitem("ethereal:worm", {
|
||||
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.type ~= "node" then return end
|
||||
|
||||
local node = minetest.get_node(pointed_thing.under)
|
||||
if (node.name == "default:water_source"
|
||||
or node.name == "default:river_water_source")
|
||||
and 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(), "Inventory full, your Fish Got Away!")
|
||||
end
|
||||
end
|
||||
|
||||
end,
|
||||
})
|
||||
|
||||
-- Fishing Rod
|
||||
minetest.register_craft({
|
||||
output = "ethereal:fishing_rod",
|
||||
recipe = {
|
||||
@ -85,17 +62,36 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
-- Cooking Fish
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "ethereal:fish_cooked",
|
||||
recipe = "ethereal:fish_raw",
|
||||
cooktime = 2,
|
||||
-- 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.type ~= "node" then return end
|
||||
|
||||
local node = minetest.get_node_or_nil(pointed_thing.under)
|
||||
if node then node = node.name else return end
|
||||
|
||||
if (node == "default:water_source"
|
||||
or node == "default:river_water_source")
|
||||
and 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(), "Inventory full, Fish Got Away!")
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- Baiting Fishing Rod
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "ethereal:fishing_rod_baited",
|
||||
recipe = {"ethereal:fishing_rod", "ethereal:worm"},
|
||||
})
|
||||
})
|
10
flowers.lua
10
flowers.lua
@ -12,8 +12,8 @@ minetest.register_abm({
|
||||
return
|
||||
end
|
||||
|
||||
local pos0 = {x=pos.x-4,y=pos.y-2,z=pos.z-4}
|
||||
local pos1 = {x=pos.x+4,y=pos.y+2,z=pos.z+4}
|
||||
local pos0 = {x = pos.x - 4, y = pos.y - 2, z = pos.z - 4}
|
||||
local pos1 = {x = pos.x + 4, y = pos.y + 2, z = pos.z + 4}
|
||||
|
||||
if #minetest.find_nodes_in_area(pos0, pos1, "group:flora") > 3 then
|
||||
|
||||
@ -25,7 +25,7 @@ minetest.register_abm({
|
||||
grass.y = grass.y - 1
|
||||
if minetest.get_node(grass).name == "ethereal:crystal_dirt" then
|
||||
grass.y = grass.y + 1
|
||||
minetest.set_node(grass, {name="ethereal:crystal_spike"})
|
||||
minetest.set_node(grass, {name = "ethereal:crystal_spike"})
|
||||
end
|
||||
end
|
||||
|
||||
@ -42,8 +42,8 @@ minetest.register_abm({
|
||||
return
|
||||
end
|
||||
if minetest.get_node(seedling).name == "air" then
|
||||
minetest.set_node(seedling, {name=node.name})
|
||||
minetest.set_node(seedling, {name = node.name})
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
})
|
65
gates.lua
65
gates.lua
@ -17,7 +17,6 @@ local nb_pil = {
|
||||
function gate_rightclick(pos, node)
|
||||
local gate, open = unpack(string.split(node.name, "_", 2))
|
||||
local gate = gate.."_"
|
||||
|
||||
local sound, name
|
||||
if open == "open" then
|
||||
sound = "close"
|
||||
@ -28,38 +27,39 @@ function gate_rightclick(pos, node)
|
||||
end
|
||||
node.name = gate..name
|
||||
minetest.set_node(pos, node)
|
||||
minetest.sound_play("doors_door_"..sound, {pos=pos, gain = 0.3, max_hear_distance = 10})
|
||||
minetest.sound_play("doors_door_"..sound, {
|
||||
pos = pos,
|
||||
gain = 0.3,
|
||||
max_hear_distance = 10
|
||||
})
|
||||
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"},
|
||||
{"pine", "Pine Wood", "default_pinewood.png", "default:pinewood"},
|
||||
local gates = {
|
||||
{"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"},
|
||||
{"pine", "Pine Wood", "default_pinewood.png", "default:pinewood"},
|
||||
}
|
||||
|
||||
for _, row in pairs(gate.type) do
|
||||
local name, desc, texture, nod = unpack(row)
|
||||
|
||||
minetest.register_node("ethereal:"..name.."gate_open", {
|
||||
tiles = {texture},
|
||||
for _, row in pairs(gates) do
|
||||
|
||||
minetest.register_node("ethereal:"..row[1].."gate_open", {
|
||||
tiles = {row[3]},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
walkable = true,
|
||||
groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, not_in_inventory = 1},
|
||||
drop = "ethereal:"..name.."gate_closed",
|
||||
drop = "ethereal:"..row[1].."gate_closed",
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
@ -86,11 +86,11 @@ minetest.register_node("ethereal:"..name.."gate_open", {
|
||||
on_rightclick = gate_rightclick,
|
||||
})
|
||||
|
||||
minetest.register_node("ethereal:"..name.."gate_closed", {
|
||||
description = desc.." 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",
|
||||
minetest.register_node("ethereal:"..row[1].."gate_closed", {
|
||||
description = row[2].." Gate",
|
||||
tiles = {row[3]},
|
||||
inventory_image = "default_gate_overlay.png^"..row[3].."^default_gate_overlay.png^[makealpha:255,126,126",
|
||||
wield_image = "default_gate_overlay.png^"..row[3].."^default_gate_overlay.png^[makealpha:255,126,126",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
@ -114,13 +114,12 @@ minetest.register_node("ethereal:"..name.."gate_closed", {
|
||||
on_rightclick = gate_rightclick,
|
||||
})
|
||||
|
||||
-- Fencegate Recipe
|
||||
minetest.register_craft({
|
||||
output = "ethereal:"..name.."gate_closed",
|
||||
output = "ethereal:"..row[1].."gate_closed",
|
||||
recipe = {
|
||||
{"group:stick", nod, "group:stick"},
|
||||
{"group:stick", nod, "group:stick"},
|
||||
{"group:stick", row[4], "group:stick"},
|
||||
{"group:stick", row[4], "group:stick"},
|
||||
}
|
||||
})
|
||||
|
||||
end
|
||||
end
|
46
init.lua
46
init.lua
@ -1,6 +1,6 @@
|
||||
--[[
|
||||
|
||||
Minetest Ethereal Mod 1.16 (24th June 2015)
|
||||
Minetest Ethereal Mod 1.16 (4th July 2015)
|
||||
|
||||
Created by ChinChow
|
||||
|
||||
@ -13,27 +13,27 @@ 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, also used for ocean floor
|
||||
ethereal.plains = 1 -- Dry dirt with scorched trees
|
||||
ethereal.fiery = 1 -- Red grass with lava craters
|
||||
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, also used for ocean floor
|
||||
ethereal.plains = 1 -- Dry dirt with scorched trees
|
||||
ethereal.fiery = 1 -- Red grass with lava craters
|
||||
ethereal.sandclay = 1 -- Sand areas with clay underneath
|
||||
ethereal.icewater = 1 -- Ice surrounding cold coastal areas
|
||||
|
||||
@ -58,4 +58,4 @@ dofile(minetest.get_modpath("ethereal").."/stairs.lua")
|
||||
dofile(minetest.get_modpath("ethereal").."/mapgen_v7n.lua") -- 0.4.12 and above
|
||||
|
||||
-- Xanadu server Only
|
||||
--dofile(minetest.get_modpath("ethereal").."/plantpack.lua")
|
||||
--dofile(minetest.get_modpath("ethereal").."/plantpack.lua")
|
77
leaves.lua
77
leaves.lua
@ -17,12 +17,12 @@ minetest.register_node("ethereal:acacia_leaves", {
|
||||
walkable = false,
|
||||
visual_scale = 1.2,
|
||||
waving = 1,
|
||||
groups = {snappy=3, leafdecay=3, leaves=1, flammable=2},
|
||||
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{ items = {"ethereal:acacia_sapling"}, rarity = 20},
|
||||
{ items = {"ethereal:acacia_leaves"}}
|
||||
{items = {"ethereal:acacia_sapling"}, rarity = 20},
|
||||
{items = {"ethereal:acacia_leaves"}}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
@ -39,12 +39,12 @@ minetest.register_node("ethereal:willow_twig", {
|
||||
walkable = false,
|
||||
visual_scale = 1.2,
|
||||
waving = 1,
|
||||
groups = {snappy=3, leafdecay=3, leaves=1, flammable=2},
|
||||
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{ items = {"ethereal:willow_sapling"}, rarity = 50},
|
||||
{ items = {"ethereal:willow_twig"}}
|
||||
{items = {"ethereal:willow_sapling"}, rarity = 50},
|
||||
{items = {"ethereal:willow_twig"}}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
@ -61,12 +61,12 @@ minetest.register_node("ethereal:redwood_leaves", {
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
waving = 1,
|
||||
groups = {snappy=3, leafdecay=3, leaves=1, flammable=2},
|
||||
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{ items = {"ethereal:redwood_sapling"}, rarity = 50},
|
||||
{ items = {"ethereal:redwood_leaves"}}
|
||||
{items = {"ethereal:redwood_sapling"}, rarity = 50},
|
||||
{items = {"ethereal:redwood_leaves"}}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
@ -82,8 +82,8 @@ minetest.override_item("default:leaves", {
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{ items = {"ethereal:tree_sapling"}, rarity = 20},
|
||||
{ items = {"default:leaves"}}
|
||||
{items = {"ethereal:tree_sapling"}, rarity = 20},
|
||||
{items = {"default:leaves"}}
|
||||
}
|
||||
},
|
||||
})
|
||||
@ -98,12 +98,12 @@ minetest.register_node("ethereal:orange_leaves", {
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
waving = 1,
|
||||
groups = {snappy=3, leafdecay=3, leaves=1, flammable=2},
|
||||
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"}}
|
||||
{items = {"ethereal:orange_tree_sapling"}, rarity = 20},
|
||||
{items = {"ethereal:orange_leaves"}}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
@ -119,8 +119,8 @@ minetest.override_item("default:jungleleaves", {
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{ items = {"ethereal:jungle_tree_sapling"}, rarity = 20},
|
||||
{ items = {"default:jungleleaves"}}
|
||||
{items = {"ethereal:jungle_tree_sapling"}, rarity = 20},
|
||||
{items = {"default:jungleleaves"}}
|
||||
}
|
||||
},
|
||||
})
|
||||
@ -135,12 +135,12 @@ minetest.register_node("ethereal:bananaleaves", {
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
waving = 1,
|
||||
groups = {snappy=3, leafdecay=3, leaves=1, flammable=2},
|
||||
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{ items = {"ethereal:banana_tree_sapling"}, rarity = 20},
|
||||
{ items = {"ethereal:bananaleaves"}}
|
||||
{items = {"ethereal:banana_tree_sapling"}, rarity = 20},
|
||||
{items = {"ethereal:bananaleaves"}}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
@ -157,12 +157,12 @@ minetest.register_node("ethereal:yellowleaves", {
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
waving = 1,
|
||||
groups = {snappy=3, leafdecay=3, leaves=1},
|
||||
groups = {snappy = 3, leafdecay = 3, leaves = 1},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{ items = {"ethereal:yellow_tree_sapling"}, rarity = 50},
|
||||
{ items = {"ethereal:yellowleaves"}}
|
||||
{items = {"ethereal:yellow_tree_sapling"}, rarity = 50},
|
||||
{items = {"ethereal:yellowleaves"}}
|
||||
}
|
||||
},
|
||||
-- Leaves are edible, heal half a heart
|
||||
@ -182,12 +182,12 @@ minetest.register_node("ethereal:palmleaves", {
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
waving = 1,
|
||||
groups = {snappy=3, leafdecay=3, leaves=1, flammable=2},
|
||||
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{ items = {"ethereal:palm_sapling"}, rarity = 20},
|
||||
{ items = {"ethereal:palmleaves"}}
|
||||
{items = {"ethereal:palm_sapling"}, rarity = 20},
|
||||
{items = {"ethereal:palmleaves"}}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
@ -204,13 +204,13 @@ minetest.register_node("ethereal:pineleaves", {
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
waving = 1,
|
||||
groups = {snappy=3, leafdecay=3, leaves=1, flammable=2},
|
||||
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"},}
|
||||
{items = {"ethereal:pine_tree_sapling"}, rarity = 20},
|
||||
{items = {"ethereal:pine_nuts"}, rarity = 5},
|
||||
{items = {"ethereal:pineleaves"},}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
@ -227,12 +227,12 @@ minetest.register_node("ethereal:frost_leaves", {
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
waving = 1,
|
||||
groups = {snappy=3, leafdecay=3, leaves=1, puts_out_fire=1},
|
||||
groups = {snappy = 3, leafdecay = 3, leaves = 1, puts_out_fire = 1},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{ items = {"ethereal:frost_tree_sapling"}, rarity = 20},
|
||||
{ items = {"ethereal:frost_leaves"}}
|
||||
{items = {"ethereal:frost_tree_sapling"}, rarity = 20},
|
||||
{items = {"ethereal:frost_leaves"}}
|
||||
}
|
||||
},
|
||||
light_source = 9,
|
||||
@ -244,12 +244,12 @@ minetest.register_node("ethereal:frost_leaves", {
|
||||
minetest.register_node("ethereal:mushroom", {
|
||||
description = "Mushroom Cap",
|
||||
tiles = {"mushroom_block.png"},
|
||||
groups = {choppy=2, oddly_breakable_by_hand=1, flammable=2},
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{ items = {"ethereal:mushroom_sapling"}, rarity = 20},
|
||||
{ items = {"ethereal:mushroom"}}
|
||||
{items = {"ethereal:mushroom_sapling"}, rarity = 20},
|
||||
{items = {"ethereal:mushroom"}}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
@ -265,6 +265,9 @@ minetest.register_craft({
|
||||
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},
|
||||
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(),
|
||||
})
|
||||
})
|
@ -2,10 +2,12 @@
|
||||
minetest.clear_registered_biomes()
|
||||
minetest.clear_registered_decorations()
|
||||
|
||||
local path = minetest.get_modpath("ethereal").."/schematics/"
|
||||
|
||||
-- tree schematics
|
||||
dofile(minetest.get_modpath("ethereal").."/schematics/apple_tree.lua")
|
||||
dofile(minetest.get_modpath("ethereal").."/schematics/orange_tree.lua")
|
||||
dofile(minetest.get_modpath("ethereal").."/schematics/banana_tree.lua")
|
||||
dofile(path.."apple_tree.lua")
|
||||
dofile(path.."orange_tree.lua")
|
||||
dofile(path.."banana_tree.lua")
|
||||
|
||||
--= Biomes (Minetest 0.4.12 and above)
|
||||
|
||||
@ -323,8 +325,6 @@ end
|
||||
|
||||
--= schematic decorations
|
||||
|
||||
local path = minetest.get_modpath("ethereal").."/schematics/"
|
||||
|
||||
-- redwood tree
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
@ -402,7 +402,6 @@ minetest.register_decoration({
|
||||
biomes = {"fiery"},
|
||||
schematic = path.."volcanol.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
-- replacements = {{"default:stone", "default:desert_stone"}},
|
||||
})
|
||||
|
||||
-- jungle tree
|
||||
@ -529,7 +528,10 @@ minetest.register_decoration({
|
||||
-- dry shrub
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"ethereal:dry_dirt", "default:sand", "default:desert_sand", "sandstone", "bakedclay:red"},
|
||||
place_on = {
|
||||
"ethereal:dry_dirt", "default:sand", "default:desert_sand",
|
||||
"sandstone", "bakedclay:red"
|
||||
},
|
||||
sidelen = 80,
|
||||
fill_ratio = 0.015,
|
||||
biomes = {"plains", "lake", "desert", "desertstone", "mesa"},
|
||||
@ -543,7 +545,11 @@ minetest.register_decoration({
|
||||
sidelen = 80,
|
||||
fill_ratio = 0.03,
|
||||
biomes = {"grassy", "grassy", "grassytwo"},
|
||||
decoration = {"flowers:dandelion_white", "flowers:dandelion_yellow", "flowers:geranium", "flowers:rose", "flowers:tulip", "flowers:viola", "ethereal:strawberry_7"},
|
||||
decoration = {
|
||||
"flowers:dandelion_white", "flowers:dandelion_yellow",
|
||||
"flowers:geranium", "flowers:rose", "flowers:tulip",
|
||||
"flowers:viola", "ethereal:strawberry_7"
|
||||
},
|
||||
})
|
||||
|
||||
-- prairie flowers & strawberry
|
||||
@ -553,7 +559,11 @@ minetest.register_decoration({
|
||||
sidelen = 80,
|
||||
fill_ratio = 0.05,
|
||||
biomes = {"prairie"},
|
||||
decoration = {"flowers:dandelion_white", "flowers:dandelion_yellow", "flowers:geranium", "flowers:rose", "flowers:tulip", "flowers:viola", "ethereal:strawberry_7"},
|
||||
decoration = {
|
||||
"flowers:dandelion_white", "flowers:dandelion_yellow",
|
||||
"flowers:geranium", "flowers:rose", "flowers:tulip",
|
||||
"flowers:viola", "ethereal:strawberry_7"
|
||||
},
|
||||
})
|
||||
|
||||
-- crystal spike & crystal grass
|
||||
@ -630,11 +640,17 @@ minetest.register_decoration({
|
||||
-- grass
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"ethereal:green_dirt_top", "ethereal:jungle_dirt", "ethereal:prairie_dirt", "ethereal:grove_dirt"},
|
||||
place_on = {
|
||||
"ethereal:green_dirt_top", "ethereal:jungle_dirt",
|
||||
"ethereal:prairie_dirt", "ethereal:grove_dirt"
|
||||
},
|
||||
sidelen = 80,
|
||||
fill_ratio = 0.4,
|
||||
biomes = {"grassy", "grassytwo", "jumble", "junglee", "prairie", "grove"},
|
||||
decoration = "default:grass_2", "default:grass_3", "default:grass_4", "default:grass_5",
|
||||
decoration = {
|
||||
"default:grass_2", "default:grass_3",
|
||||
"default:grass_4", "default:grass_5"
|
||||
},
|
||||
})
|
||||
|
||||
-- ferns
|
||||
@ -682,23 +698,25 @@ minetest.register_decoration({
|
||||
|
||||
-- palm tree on sand next to water
|
||||
minetest.register_on_generated(function(minp, maxp, seed)
|
||||
local nn
|
||||
if maxp.y > 1 and minp.y < 1 then
|
||||
local perlin1 = minetest.get_perlin(354, 3, 0.7, 100)
|
||||
local divlen = 8
|
||||
local divs = (maxp.x-minp.x)/divlen+1
|
||||
local divs = (maxp.x - minp.x) / divlen + 1
|
||||
local pr, x, z
|
||||
for divx=0,divs-1 do
|
||||
for divz=0,divs-1 do
|
||||
-- find random positions for palm tree
|
||||
pr = PseudoRandom(seed+1)
|
||||
x = pr:next(minp.x + math.floor((divx+0)*divlen), minp.x + math.floor((divx+1)*divlen))
|
||||
z = pr:next(minp.z + math.floor((divz+0)*divlen), minp.z + math.floor((divz+1)*divlen))
|
||||
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
|
||||
minetest.place_schematic({x=x-4,y=2,z=z-4}, path.."palmtree.mts", 0, '', 0)
|
||||
end
|
||||
for divz=0,divs-1 do
|
||||
-- find random positions for palm tree
|
||||
pr = PseudoRandom(seed + 1)
|
||||
x = pr:next(minp.x + math.floor((divx + 0) * divlen), minp.x + math.floor((divx + 1) * divlen))
|
||||
z = pr:next(minp.z + math.floor((divz + 0) * divlen), minp.z + math.floor((divz + 1) * divlen))
|
||||
nn = minetest.get_node_or_nil({x = x, y = 1, z = z})
|
||||
if nn and nn.name == "default:sand"
|
||||
and minetest.find_node_near({x = x, y = 1,z = z}, 1, "default:water_source") then
|
||||
minetest.place_schematic({x = x - 4, y = 2, z = z - 4}, path.."palmtree.mts", 0, '', 0)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
@ -706,7 +724,7 @@ end)
|
||||
|
||||
if farming.mod and farming.mod == "redo" then
|
||||
|
||||
print ("[MOD] Ethereal - Detected and using Farming Redo mod")
|
||||
print ("[MOD] Ethereal - Farming Redo detected and in use")
|
||||
|
||||
-- potato
|
||||
minetest.register_decoration({
|
||||
@ -725,7 +743,11 @@ minetest.register_decoration({
|
||||
sidelen = 80,
|
||||
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"},
|
||||
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"
|
||||
},
|
||||
})
|
||||
|
||||
-- melon and pumpkin
|
||||
@ -749,4 +771,5 @@ minetest.register_decoration({
|
||||
biomes = {"grassytwo"},
|
||||
decoration = "farming:beanbush",
|
||||
})
|
||||
end
|
||||
|
||||
end
|
39
mushroom.lua
39
mushroom.lua
@ -1,7 +1,7 @@
|
||||
-- Mushroom Spores
|
||||
minetest.register_craftitem("ethereal:mushroom_craftingitem", {
|
||||
description = "Mushroom Spores",
|
||||
groups = {not_in_creative_inventory=1},
|
||||
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")
|
||||
@ -14,13 +14,16 @@ minetest.register_node("ethereal:mushroom_plant", {
|
||||
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}},
|
||||
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},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2},
|
||||
sounds = default.node_sound_defaults(),
|
||||
on_use = minetest.item_eat(1),
|
||||
})
|
||||
@ -65,12 +68,18 @@ local ndef = {
|
||||
buildable_to = true,
|
||||
drop = {
|
||||
items = {
|
||||
{items = {"ethereal:mushroom_craftingitem"},rarity=1},
|
||||
{items = {"ethereal:mushroom_plant"},rarity=14},
|
||||
{items = {"ethereal:mushroom_craftingitem"},rarity = 1},
|
||||
{items = {"ethereal:mushroom_plant"},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},
|
||||
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_node("ethereal:mushroom_1", table.copy(ndef))
|
||||
@ -81,13 +90,13 @@ ndef.groups.mushroom = 2
|
||||
minetest.register_node("ethereal:mushroom_2", table.copy(ndef))
|
||||
|
||||
ndef.tiles[1] = "ethereal_mushroom_garden_3.png"
|
||||
ndef.drop.items[2] = {items = {"ethereal:mushroom_plant 3"},rarity=3}
|
||||
ndef.drop.items[2] = {items = {"ethereal:mushroom_plant 3"}, rarity = 3}
|
||||
ndef.groups.mushroom = 3
|
||||
minetest.register_node("ethereal:mushroom_3", table.copy(ndef))
|
||||
|
||||
ndef.tiles[1] = "ethereal_mushroom_garden_4.png"
|
||||
ndef.drop.items[2].rarity = 1
|
||||
ndef.drop.items[3] = {items = {"ethereal:mushroom_plant 3"},rarity=7}
|
||||
ndef.drop.items[3] = {items = {"ethereal:mushroom_plant 3"}, rarity = 7}
|
||||
ndef.groups.mushroom = 4
|
||||
ndef.groups.growing = nil
|
||||
minetest.register_node("ethereal:mushroom_4", table.copy(ndef))
|
||||
@ -107,11 +116,11 @@ minetest.register_abm({
|
||||
end
|
||||
|
||||
-- check if on wet soil
|
||||
pos.y = pos.y-1
|
||||
pos.y = pos.y - 1
|
||||
if minetest.get_item_group(minetest.get_node(pos).name, "soil") < 3 then
|
||||
return
|
||||
end
|
||||
pos.y = pos.y+1
|
||||
pos.y = pos.y + 1
|
||||
|
||||
-- check light
|
||||
local light = minetest.get_node_light(pos)
|
||||
@ -121,20 +130,18 @@ minetest.register_abm({
|
||||
end
|
||||
|
||||
-- grow
|
||||
node.name = "ethereal:mushroom_garden_" .. minetest.get_item_group(node.name, "mushroom") + 1
|
||||
node.name = "ethereal:mushroom_garden_"..minetest.get_item_group(node.name, "mushroom") + 1
|
||||
minetest.set_node(pos, node)
|
||||
end
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
|
||||
-- legacy
|
||||
|
||||
for i = 1,4 do
|
||||
for i = 1, 4 do
|
||||
minetest.register_alias("ethereal:mushroom_garden_"..i, "ethereal:mushroom_"..i)
|
||||
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")
|
||||
minetest.register_alias("ethereal:mushroom_8", "ethereal:mushroom_4")
|
32
onion.lua
32
onion.lua
@ -8,7 +8,6 @@ minetest.register_craftitem("ethereal:wild_onion_plant", {
|
||||
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
|
||||
local onion_def = {
|
||||
@ -20,11 +19,17 @@ local onion_def = {
|
||||
buildable_to = true,
|
||||
drop = {
|
||||
items = {
|
||||
{items = {"ethereal:wild_onion_plant"},rarity=1},
|
||||
{items = {"ethereal:wild_onion_plant"}, 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},
|
||||
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_node("ethereal:onion_1", table.copy(onion_def))
|
||||
@ -36,14 +41,14 @@ minetest.register_node("ethereal:onion_2", table.copy(onion_def))
|
||||
onion_def.tiles[1] = "ethereal_wild_onion_3.png"
|
||||
onion_def.groups.onion = 3
|
||||
onion_def.drop.items[2] = {
|
||||
items = {"ethereal:wild_onion_plant 2"}, rarity=3
|
||||
items = {"ethereal:wild_onion_plant 2"}, rarity = 3
|
||||
}
|
||||
minetest.register_node("ethereal:onion_3", table.copy(onion_def))
|
||||
|
||||
onion_def.tiles[1] = "ethereal_wild_onion_4.png"
|
||||
onion_def.groups.onion = 4
|
||||
onion_def.drop.items[2] = {
|
||||
items = {"ethereal:wild_onion_plant 3"}, rarity=3
|
||||
items = {"ethereal:wild_onion_plant 3"}, rarity = 3
|
||||
}
|
||||
minetest.register_node("ethereal:onion_4", table.copy(onion_def))
|
||||
|
||||
@ -51,8 +56,8 @@ onion_def.tiles[1] = "ethereal_wild_onion_5.png"
|
||||
onion_def.groups.onion = 5
|
||||
onion_def.groups.growing = nil
|
||||
onion_def.drop.items = {
|
||||
{items = {"ethereal:wild_onion_plant 2"},rarity=1},
|
||||
{items = {"ethereal:wild_onion_plant 3"},rarity=2},
|
||||
{items = {"ethereal:wild_onion_plant 2"}, rarity = 1},
|
||||
{items = {"ethereal:wild_onion_plant 3"}, rarity = 2},
|
||||
}
|
||||
minetest.register_node("ethereal:onion_5", table.copy(onion_def))
|
||||
|
||||
@ -72,11 +77,11 @@ minetest.register_abm({
|
||||
end
|
||||
|
||||
-- check if on wet soil
|
||||
pos.y = pos.y-1
|
||||
pos.y = pos.y - 1
|
||||
if minetest.get_item_group(minetest.get_node(pos).name, "soil") < 3 then
|
||||
return
|
||||
end
|
||||
pos.y = pos.y+1
|
||||
pos.y = pos.y + 1
|
||||
|
||||
-- check light
|
||||
local light = minetest.get_node_light(pos)
|
||||
@ -86,7 +91,7 @@ minetest.register_abm({
|
||||
end
|
||||
|
||||
-- grow
|
||||
node.name = "ethereal:onion_" .. minetest.get_item_group(node.name, "onion") + 1
|
||||
node.name = "ethereal:onion_"..minetest.get_item_group(node.name, "onion") + 1
|
||||
minetest.set_node(pos, node)
|
||||
end
|
||||
})
|
||||
@ -97,7 +102,8 @@ end
|
||||
-- Legacy
|
||||
|
||||
minetest.register_alias("ethereal:wild_onion_craftingitem", "ethereal:wild_onion_plant")
|
||||
for i = 1,5 do
|
||||
|
||||
for i = 1, 5 do
|
||||
minetest.register_alias("ethereal:wild_onion_"..i, "ethereal:onion_"..i)
|
||||
end
|
||||
|
||||
@ -105,4 +111,4 @@ end
|
||||
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")
|
||||
minetest.register_alias("ethereal:wild_onion_8", "ethereal:onion_5")
|
@ -1,5 +1,5 @@
|
||||
-- override default papyrus to make it walkable
|
||||
minetest.override_item("default:papyrus", {walkable=true, sunlight_propagates=true})
|
||||
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({
|
||||
@ -34,8 +34,8 @@ minetest.register_abm({
|
||||
|
||||
nod = minetest.get_node_or_nil(pos)
|
||||
if nod and nod.name == "air" and height < high then
|
||||
minetest.set_node(pos, {name=node.name})
|
||||
minetest.set_node(pos, {name = node.name})
|
||||
end
|
||||
|
||||
end,
|
||||
})
|
||||
})
|
@ -14,15 +14,15 @@ minetest.register_node("ethereal:fern", {
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {"ethereal:fern_tubers"},rarity = 6},
|
||||
{items = {"ethereal:fern"}},
|
||||
{items = {"ethereal:fern_tubers"}, rarity = 6},
|
||||
{items = {"ethereal:fern"}}
|
||||
}
|
||||
},
|
||||
groups = {snappy=3,flora=1,attached_node=1,flammable=2},
|
||||
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},
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
|
||||
},
|
||||
})
|
||||
|
||||
@ -46,11 +46,11 @@ minetest.register_node("ethereal:dry_shrub", {
|
||||
waving = 1,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy=3,flora=1,attached_node=1},
|
||||
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},
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
|
||||
},
|
||||
})
|
||||
|
||||
@ -67,11 +67,11 @@ minetest.register_node("ethereal:snowygrass", {
|
||||
waving = 1,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy=3,flora=1,attached_node=1},
|
||||
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},
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
|
||||
},
|
||||
})
|
||||
|
||||
@ -88,11 +88,11 @@ minetest.register_node("ethereal:crystalgrass", {
|
||||
waving = 1,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy=3,flora=1,attached_node=1},
|
||||
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},
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
|
||||
},
|
||||
})
|
||||
|
||||
@ -100,8 +100,8 @@ minetest.register_node("ethereal:crystalgrass", {
|
||||
function ethereal.add_moss(typ, descr, texture, receipe_item)
|
||||
minetest.register_node("ethereal:"..typ.."_moss", {
|
||||
description = descr.." Moss",
|
||||
tiles = { texture },
|
||||
groups = {crumbly=3 },
|
||||
tiles = {texture},
|
||||
groups = {crumbly = 3},
|
||||
sounds = default.node_sound_dirt_defaults
|
||||
})
|
||||
|
||||
@ -111,11 +111,16 @@ function ethereal.add_moss(typ, descr, texture, 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")
|
||||
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")
|
||||
|
||||
-- apple
|
||||
minetest.override_item("default:apple", {
|
||||
drop = "default:apple",
|
||||
})
|
||||
|
||||
-- Banana (Heals one heart when eaten)
|
||||
minetest.register_node("ethereal:banana", {
|
||||
@ -131,12 +136,16 @@ minetest.register_node("ethereal:banana", {
|
||||
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},
|
||||
groups = {
|
||||
fleshy = 3, dig_immediate = 3, flammable = 2,
|
||||
leafdecay = 1, leafdecay_drop = 1
|
||||
},
|
||||
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})
|
||||
minetest.set_node(pos, {name = "ethereal:banana", param2 = 1})
|
||||
end
|
||||
end,
|
||||
})
|
||||
@ -174,12 +183,16 @@ minetest.register_node("ethereal:orange", {
|
||||
type = "fixed",
|
||||
fixed = {-0.2, -0.3, -0.2, 0.2, 0.2, 0.2}
|
||||
},
|
||||
groups = {fleshy=3,dig_immediate=3,flammable=2,leafdecay=3,leafdecay_drop=1},
|
||||
groups = {
|
||||
fleshy = 3, dig_immediate = 3, flammable = 2,
|
||||
leafdecay = 3, leafdecay_drop = 1
|
||||
},
|
||||
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})
|
||||
minetest.set_node(pos, {name = "ethereal:orange", param2 = 1})
|
||||
end
|
||||
end,
|
||||
})
|
||||
@ -210,7 +223,10 @@ minetest.register_node("ethereal:coconut", {
|
||||
type = "fixed",
|
||||
fixed = {-0.35, -0.35, -0.35, 0.35, 0.35, 0.35}
|
||||
},
|
||||
groups = {snappy=1,oddly_breakable_by_hand=1,cracky=1,choppy=1,flammable=1,leafdecay=3,leafdecay_drop=1},
|
||||
groups = {
|
||||
snappy = 1, oddly_breakable_by_hand = 1, cracky = 1,
|
||||
choppy = 1, flammable = 1, leafdecay = 3, leafdecay_drop = 1
|
||||
},
|
||||
drop = "ethereal:coconut_slice 4",
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
@ -236,12 +252,16 @@ minetest.register_node("ethereal:golden_apple", {
|
||||
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},
|
||||
groups = {
|
||||
fleshy = 3, dig_immediate = 3,
|
||||
leafdecay = 3,leafdecay_drop = 1
|
||||
},
|
||||
drop = "ethereal:golden_apple",
|
||||
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})
|
||||
minetest.set_node(pos, {name = "ethereal:golden_apple", param2 = 1})
|
||||
end
|
||||
end,
|
||||
})
|
||||
@ -260,7 +280,7 @@ minetest.register_node("ethereal:bamboo", {
|
||||
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},
|
||||
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)
|
||||
@ -278,13 +298,12 @@ minetest.register_node("ethereal:bamboo_sprout", {
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy=3,flora=1,attached_node=1,flammable=2},
|
||||
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)
|
||||
@ -368,7 +387,7 @@ minetest.register_node("ethereal:bamboo_floor", {
|
||||
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},
|
||||
groups = {snappy = 3, choppy = 3 , flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
@ -455,17 +474,25 @@ minetest.register_node("ethereal: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}},
|
||||
{
|
||||
name = "candle.png",
|
||||
animation={
|
||||
type="vertical_frames",
|
||||
aspect_w = 32,
|
||||
aspect_h = 32,
|
||||
length = 1.0
|
||||
}
|
||||
},
|
||||
},
|
||||
paramtype = "light",
|
||||
light_source = default.LIGHT_MAX-3,
|
||||
light_source = default.LIGHT_MAX - 3,
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
groups = {dig_immediate=3, attached_node=1},
|
||||
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 },
|
||||
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15 }
|
||||
},
|
||||
})
|
||||
|
||||
@ -476,4 +503,4 @@ minetest.register_craft({
|
||||
{"","ethereal:palm_wax"},
|
||||
{"","ethereal:palm_wax"},
|
||||
}
|
||||
})
|
||||
})
|
@ -10,7 +10,10 @@ minetest.register_decoration({
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.005,
|
||||
biomes = {"desert", "desertstone"},
|
||||
decoration = {"bakedclay:cactus_echinocereus", "bakedclay:cactus_matucana", "bakedclay:cactus_baseball", "bakedclay:cactus_golden"},
|
||||
decoration = {
|
||||
"bakedclay:cactus_echinocereus", "bakedclay:cactus_matucana",
|
||||
"bakedclay:cactus_baseball", "bakedclay:cactus_golden"
|
||||
},
|
||||
})
|
||||
|
||||
-- Desert Plants
|
||||
@ -20,7 +23,10 @@ minetest.register_decoration({
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.004,
|
||||
biomes = {"desert", "desertstone"},
|
||||
decoration = {"bakedclay:desert_kangaroo", "bakedclay:desert_brittle", "bakedclay:desert_ocotillo", "bakedclay:desert_whitesage"},
|
||||
decoration = {
|
||||
"bakedclay:desert_kangaroo", "bakedclay:desert_brittle",
|
||||
"bakedclay:desert_ocotillo", "bakedclay:desert_whitesage"
|
||||
},
|
||||
})
|
||||
|
||||
--= Prairie Biome
|
||||
@ -32,35 +38,57 @@ minetest.register_decoration({
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.005,
|
||||
biomes = {"prairie", "grassy", "grassytwo"},
|
||||
decoration = {"bakedclay:grass_prairie", "bakedclay:grass_cord", "bakedclay:grass_wheatgrass", "bakedclay:desert_whitesage"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
biomes = {
|
||||
"prairie", "grassy", "grassytwo", "grove", "junglee",
|
||||
"grayness", "jumble"
|
||||
},
|
||||
decoration = {"bakedclay:shrub_kerria", "bakedclay:shrub_spicebush"},
|
||||
})
|
||||
|
||||
@ -72,18 +100,29 @@ minetest.register_decoration({
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
decoration = {
|
||||
"bakedclay:mountain_edelweiss", "bakedclay:mountain_armeria",
|
||||
"bakedclay:mountain_bellflower", "bakedclay:mountain_willowherb",
|
||||
"bakedclay:mountain_bistort"
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
@ -95,7 +134,10 @@ minetest.register_decoration({
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.005,
|
||||
biomes = {"mushroom"},
|
||||
decoration = {"bakedclay:mushroom_powderpuff", "bakedclay:mushroom_chanterelle", "bakedclay:mushroom_parasol"},
|
||||
decoration = {
|
||||
"bakedclay:mushroom_powderpuff", "bakedclay:mushroom_chanterelle",
|
||||
"bakedclay:mushroom_parasol"
|
||||
},
|
||||
})
|
||||
|
||||
--= Lakeside
|
||||
@ -106,7 +148,10 @@ minetest.register_decoration({
|
||||
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"},
|
||||
decoration = {
|
||||
"bakedclay:wetlands_cattails", "bakedclay:wetlands_pickerel",
|
||||
"bakedclay:wetlands_mannagrass", "bakedclay:wetlands_turtle"
|
||||
},
|
||||
spawn_by = "default:water_source",
|
||||
num_spawn_by = 1,
|
||||
})
|
||||
@ -115,9 +160,31 @@ minetest.register_decoration({
|
||||
|
||||
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"},
|
||||
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"},
|
||||
biomes = {
|
||||
"mushroom", "prairie", "grayness", "plains", "desert", "lake",
|
||||
"junglee", "grassy", "grassytwo", "jumble", "snowy", "alpine",
|
||||
"fiery", "mesa", "bamboo"
|
||||
},
|
||||
decoration = {"bakedclay:spooky_thornbush", "bakedclay:spooky_baneberry"},
|
||||
})
|
||||
|
||||
-- Extra recipe for hearty stew
|
||||
|
||||
minetest.register_craft({
|
||||
output = "ethereal:hearty_stew",
|
||||
recipe = {
|
||||
{"ethereal:wild_onion_plant","ethereal:mushroom_plant", "farming:beans"},
|
||||
{"","ethereal:mushroom_plant", ""},
|
||||
{"","ethereal:bowl", ""},
|
||||
}
|
||||
})
|
59
sapling.lua
59
sapling.lua
@ -1,6 +1,5 @@
|
||||
-- Function to Register Saplings
|
||||
ethereal.register_sapling = function( sapling_node_name, sapling_descr, sapling_texture )
|
||||
|
||||
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, {
|
||||
@ -14,37 +13,46 @@ ethereal.register_sapling = function( sapling_node_name, sapling_descr, sapling_
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
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},
|
||||
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.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")
|
||||
|
||||
-- current routine
|
||||
ethereal.place_tree = function (pos, ofx, ofz, schem)
|
||||
-- Remove Sapling and Place Tree Schematic
|
||||
minetest.set_node(pos, {name="air"})
|
||||
minetest.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 )
|
||||
minetest.place_schematic(
|
||||
pos,
|
||||
minetest.get_modpath("ethereal").."/schematics/"..schem..".mts",
|
||||
"0", {}, false
|
||||
)
|
||||
end
|
||||
|
||||
-- new routine
|
||||
@ -55,8 +63,11 @@ ethereal.add_tree = function (pos, ofx, ofz, schem)
|
||||
return
|
||||
end
|
||||
-- remove sapling and place schematic
|
||||
minetest.set_node(pos, {name="air"})
|
||||
minetest.place_schematic({x=pos.x - ofx, y=pos.y, z=pos.z - ofz}, schem, "random", {}, false)
|
||||
minetest.set_node(pos, {name = "air"})
|
||||
minetest.place_schematic(
|
||||
{x = pos.x - ofx, y = pos.y, z =pos.z - ofz},
|
||||
schem, "random", {}, false
|
||||
)
|
||||
end
|
||||
|
||||
-- Grow saplings
|
||||
@ -99,4 +110,4 @@ minetest.register_abm({
|
||||
ethereal.place_tree(pos, 5, 5, "acaciatree")
|
||||
end
|
||||
end,
|
||||
})
|
||||
})
|
48
sealife.lua
48
sealife.lua
@ -9,9 +9,12 @@ minetest.register_node("ethereal:seaweed", {
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
drowning = 1,
|
||||
selection_box = {type = "fixed", fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}},
|
||||
post_effect_color = {a=64, r=100, g=100, b=200},
|
||||
groups = {snappy=3},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
|
||||
},
|
||||
post_effect_color = {a = 64, r = 100, g = 100, b = 200},
|
||||
groups = {snappy = 3},
|
||||
on_use = minetest.item_eat(1),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
@ -29,9 +32,12 @@ minetest.register_node("ethereal:coral2", {
|
||||
tiles = {"coral2.png"},
|
||||
inventory_image = "coral2.png",
|
||||
paramtype = "light",
|
||||
selection_box = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
|
||||
},
|
||||
light_source = 3,
|
||||
groups = {snappy=3},
|
||||
groups = {snappy = 3},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -48,9 +54,12 @@ minetest.register_node("ethereal:coral3", {
|
||||
tiles = {"coral3.png"},
|
||||
inventory_image = "coral3.png",
|
||||
paramtype = "light",
|
||||
selection_box = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
|
||||
},
|
||||
light_source = 3,
|
||||
groups = {snappy=3},
|
||||
groups = {snappy = 3},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -67,9 +76,12 @@ minetest.register_node("ethereal:coral4", {
|
||||
tiles = {"coral4.png"},
|
||||
inventory_image = "coral4.png",
|
||||
paramtype = "light",
|
||||
selection_box = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
|
||||
},
|
||||
light_source = 3,
|
||||
groups = {snappy=3},
|
||||
groups = {snappy = 3},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -86,9 +98,12 @@ minetest.register_node("ethereal:coral5", {
|
||||
tiles = {"coral5.png"},
|
||||
inventory_image = "coral5.png",
|
||||
paramtype = "light",
|
||||
selection_box = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
|
||||
},
|
||||
light_source = 3,
|
||||
groups = {snappy=3},
|
||||
groups = {snappy = 3},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -103,7 +118,10 @@ minetest.register_node("ethereal:sandy", {
|
||||
description = "Sandy",
|
||||
tiles = {"default_sand.png"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3, falling_node=1, sand=1, soil=1, not_in_creative_inventory=1},
|
||||
groups = {
|
||||
crumbly = 3, falling_node = 1, sand = 1, soil = 1,
|
||||
not_in_creative_inventory = 1
|
||||
},
|
||||
drop = "default:sand",
|
||||
sounds = default.node_sound_sand_defaults(),
|
||||
})
|
||||
@ -142,15 +160,15 @@ minetest.register_abm({
|
||||
|
||||
if height < 14 and pos.y < 0
|
||||
and minetest.get_node(pos).name == "default:water_source" then
|
||||
minetest.set_node(pos, {name="ethereal:seaweed"})
|
||||
minetest.set_node(pos, {name = "ethereal:seaweed"})
|
||||
end
|
||||
|
||||
else
|
||||
pos.y = pos.y + 1
|
||||
if minetest.get_node(pos).name == "default:water_source" then
|
||||
minetest.set_node(pos, {name="ethereal:coral"..sel})
|
||||
minetest.set_node(pos, {name = "ethereal:coral"..sel})
|
||||
end
|
||||
|
||||
end
|
||||
end,
|
||||
})
|
||||
})
|
32
stairs.lua
32
stairs.lua
@ -1,95 +1,95 @@
|
||||
-- Register Stairs & Slabs
|
||||
|
||||
stairs.register_stair_and_slab("crystal_block", "ethereal:crystal_block",
|
||||
{cracky=1, level=2, not_in_craft_guide=1},
|
||||
{cracky = 1, level = 2, not_in_craft_guide = 1},
|
||||
{"crystal_block.png"},
|
||||
"Crystal Block Stair",
|
||||
"Crystal Block Slab",
|
||||
default.node_sound_glass_defaults())
|
||||
|
||||
stairs.register_stair_and_slab("icebrick", "ethereal:icebrick",
|
||||
{crumbly=3, melts = 1, not_in_craft_guide=1},
|
||||
{crumbly = 3, melts = 1, not_in_craft_guide = 1},
|
||||
{"brick_ice.png"},
|
||||
"Ice Brick Stair",
|
||||
"Ice Brick Slab",
|
||||
default.node_sound_glass_defaults())
|
||||
|
||||
stairs.register_stair_and_slab("snowbrick", "ethereal:snowbrick",
|
||||
{crumbly=3, melts = 1, not_in_craft_guide=1},
|
||||
{crumbly = 3, melts = 1, not_in_craft_guide = 1},
|
||||
{"brick_snow.png"},
|
||||
"Snow Brick Stair",
|
||||
"Snow Brick Slab",
|
||||
default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_snow_footstep", gain=0.25},
|
||||
dug = {name="default_snow_footstep", gain=0.75},
|
||||
footstep = {name = "default_snow_footstep", gain = 0.25},
|
||||
dug = {name = "default_snow_footstep", gain = 0.75},
|
||||
}))
|
||||
|
||||
stairs.register_stair_and_slab("dry_dirt", "ethereal:dry_dirt",
|
||||
{crumbly=3, not_in_craft_guide=1},
|
||||
{crumbly = 3, not_in_craft_guide = 1},
|
||||
{"ethereal_dry_dirt.png"},
|
||||
"Dry Dirt Stair",
|
||||
"Dry Dirt Slab",
|
||||
default.node_sound_dirt_defaults())
|
||||
|
||||
stairs.register_stair_and_slab("mushroom_trunk", "ethereal:mushroom_trunk",
|
||||
{choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_craft_guide=1},
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, not_in_craft_guide = 1},
|
||||
{"mushroom_trunk.png"},
|
||||
"Mushroom Trunk Stair",
|
||||
"Mushroom Trunk Slab",
|
||||
default.node_sound_wood_defaults())
|
||||
|
||||
stairs.register_stair_and_slab("mushroom", "ethereal:mushroom",
|
||||
{choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_craft_guide=1},
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, not_in_craft_guide = 1},
|
||||
{"mushroom_block.png"},
|
||||
"Mushroom Top Stair",
|
||||
"Mushroom Top Slab",
|
||||
default.node_sound_wood_defaults())
|
||||
|
||||
stairs.register_stair_and_slab("frost_wood", "ethereal:frost_wood",
|
||||
{choppy=2,oddly_breakable_by_hand=1,put_out_fire=1, not_in_craft_guide=1},
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, put_out_fire = 1, not_in_craft_guide = 1},
|
||||
{"frost_wood.png"},
|
||||
"Frost Wood Stair",
|
||||
"Frost Wood Slab",
|
||||
default.node_sound_wood_defaults())
|
||||
|
||||
stairs.register_stair_and_slab("yellow_wood", "ethereal:yellow_wood",
|
||||
{choppy=2,oddly_breakable_by_hand=1,put_out_fire=1, not_in_craft_guide=1},
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, put_out_fire = 1, not_in_craft_guide = 1},
|
||||
{"yellow_wood.png"},
|
||||
"Healing Wood Stair",
|
||||
"Healing Wood Slab",
|
||||
default.node_sound_wood_defaults())
|
||||
|
||||
stairs.register_stair_and_slab("palm_wood", "ethereal:palm_wood",
|
||||
{choppy=2,oddly_breakable_by_hand=1,flammable=3, not_in_craft_guide=1},
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3, not_in_craft_guide = 1},
|
||||
{"moretrees_palm_wood.png"},
|
||||
"Palm Wood Stair",
|
||||
"Palm Wood Slab",
|
||||
default.node_sound_wood_defaults())
|
||||
|
||||
stairs.register_stair_and_slab("banana_wood", "ethereal:banana_wood",
|
||||
{choppy=2,oddly_breakable_by_hand=1,flammable=3, not_in_craft_guide=1},
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3, not_in_craft_guide = 1},
|
||||
{"banana_wood.png"},
|
||||
"Banana Wood Stair",
|
||||
"Banana Wood Slab",
|
||||
default.node_sound_wood_defaults())
|
||||
|
||||
stairs.register_stair_and_slab("willow_wood", "ethereal:willow_wood",
|
||||
{choppy=2,oddly_breakable_by_hand=1,flammable=3, not_in_craft_guide=1},
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3, not_in_craft_guide = 1},
|
||||
{"willow_wood.png"},
|
||||
"Willow Wood Stair",
|
||||
"Willow Wood Slab",
|
||||
default.node_sound_wood_defaults())
|
||||
|
||||
stairs.register_stair_and_slab("redwood_wood", "ethereal:redwood_wood",
|
||||
{choppy=2,oddly_breakable_by_hand=1,flammable=3, not_in_craft_guide=1},
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3, not_in_craft_guide = 1},
|
||||
{"redwood_wood.png"},
|
||||
"Redwood stair",
|
||||
"Redwood Slab",
|
||||
default.node_sound_wood_defaults())
|
||||
|
||||
stairs.register_stair_and_slab("acacia_wood", "ethereal:acacia_wood",
|
||||
{choppy=2,oddly_breakable_by_hand=1,flammable=3, not_in_craft_guide=1},
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3, not_in_craft_guide = 1},
|
||||
{"moretrees_acacia_wood.png"},
|
||||
"Acacia Wood Stair",
|
||||
"Acacia Wood Slab",
|
||||
default.node_sound_wood_defaults())
|
||||
default.node_sound_wood_defaults())
|
116
strawberry.lua
116
strawberry.lua
@ -17,9 +17,15 @@ minetest.register_node("ethereal:strawberry_1", {
|
||||
waving = 1,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
drop = "",
|
||||
selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
|
||||
groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,strawberry=1,growing=1},
|
||||
drop = "",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
|
||||
},
|
||||
groups = {
|
||||
snappy = 3, flammable =2, plant = 1, attached_node = 1,
|
||||
not_in_creative_inventory = 1, strawberry = 1, growing = 1
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -31,9 +37,15 @@ minetest.register_node("ethereal:strawberry_2", {
|
||||
waving = 1,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
drop = "",
|
||||
selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
|
||||
groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,strawberry=2,growing=1},
|
||||
drop = "",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
|
||||
},
|
||||
groups = {
|
||||
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||
not_in_creative_inventory = 1, strawberry = 2, growing = 1
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -45,9 +57,15 @@ minetest.register_node("ethereal:strawberry_3", {
|
||||
waving = 1,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
drop = "",
|
||||
selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
|
||||
groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,strawberry=3,growing=1},
|
||||
drop = "",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
|
||||
},
|
||||
groups = {
|
||||
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||
not_in_creative_inventory = 1, strawberry = 3, growing = 1
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -59,9 +77,15 @@ minetest.register_node("ethereal:strawberry_4", {
|
||||
waving = 1,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
drop = "",
|
||||
selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
|
||||
groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,strawberry=4,growing=1},
|
||||
drop = "",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
|
||||
},
|
||||
groups = {
|
||||
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||
not_in_creative_inventory = 1, strawberry = 4, growing=1
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -73,9 +97,15 @@ minetest.register_node("ethereal:strawberry_5", {
|
||||
waving = 1,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
drop = "",
|
||||
selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
|
||||
groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,strawberry=5,growing=1},
|
||||
drop = "",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
|
||||
},
|
||||
groups = {
|
||||
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||
not_in_creative_inventory = 1, strawberry = 5, growing = 1
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -87,14 +117,20 @@ minetest.register_node("ethereal:strawberry_6", {
|
||||
waving = 1,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
drop = {
|
||||
drop = {
|
||||
items = {
|
||||
{items = {"ethereal:strawberry 1"},rarity=2},
|
||||
{items = {"ethereal:strawberry 2"},rarity=3},
|
||||
{items = {"ethereal:strawberry 1"},rarity = 2},
|
||||
{items = {"ethereal:strawberry 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,not_in_creative_inventory=1,attached_node=1,strawberry=6,growing=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,
|
||||
not_in_creative_inventory = 1, strawberry = 6, growing = 1
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -107,14 +143,20 @@ minetest.register_node("ethereal:strawberry_7", {
|
||||
waving = 1,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
drop = {
|
||||
drop = {
|
||||
items = {
|
||||
{items = {"ethereal:strawberry 1"},rarity=1},
|
||||
{items = {"ethereal:strawberry 2"},rarity=3},
|
||||
{items = {"ethereal:strawberry 1"},rarity = 1},
|
||||
{items = {"ethereal:strawberry 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,not_in_creative_inventory=1,attached_node=1,strawberry=7,growing=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,
|
||||
not_in_creative_inventory = 1, strawberry = 7, growing = 1
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -126,14 +168,20 @@ minetest.register_node("ethereal:strawberry_8", {
|
||||
waving = 1,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
drop = {
|
||||
drop = {
|
||||
items = {
|
||||
{items = {"ethereal:strawberry 2"},rarity=1},
|
||||
{items = {"ethereal:strawberry 3"},rarity=3},
|
||||
{items = {"ethereal:strawberry 2"},rarity = 1},
|
||||
{items = {"ethereal:strawberry 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,not_in_creative_inventory=1,attached_node=1,strawberry=8},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
|
||||
},
|
||||
groups = {
|
||||
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||
not_in_creative_inventory = 1, strawberry = 8
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -156,12 +204,12 @@ minetest.register_abm({
|
||||
end
|
||||
|
||||
-- check if on wet soil
|
||||
pos.y = pos.y-1
|
||||
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
|
||||
pos.y = pos.y + 1
|
||||
|
||||
-- check light
|
||||
if not minetest.get_node_light(pos) then
|
||||
@ -173,8 +221,8 @@ minetest.register_abm({
|
||||
|
||||
-- grow
|
||||
local height = minetest.get_item_group(node.name, "strawberry") + 1
|
||||
minetest.set_node(pos, {name="ethereal:strawberry_"..height})
|
||||
minetest.set_node(pos, {name = "ethereal:strawberry_"..height})
|
||||
end
|
||||
})
|
||||
|
||||
end
|
||||
end
|
64
water.lua
64
water.lua
@ -5,7 +5,7 @@ minetest.register_node("ethereal:icebrick", {
|
||||
paramtype = "light",
|
||||
freezemelt = "default:water_source",
|
||||
is_ground_content = false,
|
||||
groups = {cracky=3, melts=1},
|
||||
groups = {cracky = 3, melts = 1},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
@ -24,10 +24,10 @@ minetest.register_node("ethereal:snowbrick", {
|
||||
paramtype = "light",
|
||||
freezemelt = "default:water_source",
|
||||
is_ground_content = false,
|
||||
groups = {crumbly=3, melts=1},
|
||||
groups = {crumbly = 3, melts = 1},
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_snow_footstep", gain=0.25},
|
||||
dug = {name="default_snow_footstep", gain=0.75},
|
||||
footstep = {name="default_snow_footstep", gain = 0.25},
|
||||
dug = {name="default_snow_footstep", gain = 0.75},
|
||||
}),
|
||||
})
|
||||
|
||||
@ -46,41 +46,52 @@ minetest.register_abm({
|
||||
interval = 30,
|
||||
chance = 10,
|
||||
action = function(pos, node)
|
||||
minetest.add_node(pos, {name="default:mossycobble"})
|
||||
minetest.add_node(pos, {name = "default:mossycobble"})
|
||||
end
|
||||
})
|
||||
|
||||
-- If Crystal Spike, Crystal Dirt, Snow near Water, change Water to Ice
|
||||
minetest.register_abm({
|
||||
nodenames = {"ethereal:crystal_spike", "default:snow", "default:snowblock", "ethereal:snowbrick"},
|
||||
nodenames = {
|
||||
"ethereal:crystal_spike", "default:snow", "default:snowblock",
|
||||
"ethereal:snowbrick"
|
||||
},
|
||||
neighbors = {"default:water_source"},
|
||||
interval = 15,
|
||||
chance = 2,
|
||||
action = function(pos, node)
|
||||
local water = minetest.find_nodes_in_area(
|
||||
{x=pos.x-1,y=pos.y-1,z=pos.z-1},
|
||||
{x=pos.x+1,y=pos.y+1,z=pos.z+1},
|
||||
{x = pos.x - 1, y = pos.y - 1, z = pos.z - 1},
|
||||
{x = pos.x + 1, y = pos.y + 1, z = pos.z + 1},
|
||||
"default:water_source")
|
||||
if water then
|
||||
minetest.set_node(water[1], {name="default:ice"})
|
||||
minetest.set_node(water[1], {name = "default:ice"})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- If Heat Source near Ice or Snow then melt
|
||||
minetest.register_abm({
|
||||
nodenames = {"default:ice", "default:snowblock", "default:snow", "default:dirt_with_snow", "ethereal:snowbrick", "ethereal:icebrick"},
|
||||
neighbors = {"fire:basic_fire", "default:lava_source", "default:lava_flowing", "default:furnace_active", "default:torch"},
|
||||
nodenames = {
|
||||
"default:ice", "default:snowblock", "default:snow",
|
||||
"default:dirt_with_snow", "ethereal:snowbrick", "ethereal:icebrick"
|
||||
},
|
||||
neighbors = {
|
||||
"fire:basic_fire", "default:lava_source", "default:lava_flowing",
|
||||
"default:furnace_active", "default:torch"
|
||||
},
|
||||
interval = 5,
|
||||
chance = 2,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
if node.name == "default:ice" or node.name == "default:snowblock"
|
||||
or node.name == "ethereal:icebrick" or node.name == "ethereal:snowbrick" then
|
||||
minetest.add_node(pos,{name="default:water_source"})
|
||||
if node.name == "default:ice"
|
||||
or node.name == "default:snowblock"
|
||||
or node.name == "ethereal:icebrick"
|
||||
or node.name == "ethereal:snowbrick" then
|
||||
minetest.add_node(pos, {name = "default:water_source"})
|
||||
elseif node.name == "default:snow" then
|
||||
minetest.add_node(pos,{name="default:water_flowing"})
|
||||
minetest.add_node(pos, {name = "default:water_flowing"})
|
||||
elseif node.name == "default:dirt_with_snow" then
|
||||
minetest.add_node(pos,{name="default:dirt_with_grass"})
|
||||
minetest.add_node(pos, {name = "default:dirt_with_grass"})
|
||||
end
|
||||
nodeupdate(pos)
|
||||
end,
|
||||
@ -93,7 +104,7 @@ minetest.register_abm({
|
||||
interval = 15,
|
||||
chance = 2,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
minetest.add_node(pos,{name="default:dirt"})
|
||||
minetest.add_node(pos, {name = "default:dirt"})
|
||||
end,
|
||||
})
|
||||
|
||||
@ -104,12 +115,21 @@ minetest.register_abm({
|
||||
interval = 5,
|
||||
chance = 1,
|
||||
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"})
|
||||
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"})
|
||||
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"})
|
||||
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"})
|
||||
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"})
|
||||
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"})
|
||||
if num > 0 then
|
||||
minetest.set_node(pos, {name="default:water_flowing"})
|
||||
minetest.set_node(pos, {name = "default:water_flowing"})
|
||||
minetest.add_item(pos, {name = node.name})
|
||||
end
|
||||
end,
|
||||
})
|
||||
})
|
139
wood.lua
139
wood.lua
@ -1,17 +1,24 @@
|
||||
-- Define Trunks and Wood
|
||||
minetest.register_node("ethereal:acacia_trunk", { -- Acacia Trunk (thanks to VanessaE for acacia textures)
|
||||
--= Define Trunks and Wood
|
||||
|
||||
-- Acacia Trunk (thanks to VanessaE for acacia textures)
|
||||
minetest.register_node("ethereal:acacia_trunk", {
|
||||
description = "Acacia Trunk",
|
||||
tiles = {"moretrees_acacia_trunk_top.png", "moretrees_acacia_trunk_top.png", "moretrees_acacia_trunk.png"},
|
||||
groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
|
||||
tiles = {
|
||||
"moretrees_acacia_trunk_top.png",
|
||||
"moretrees_acacia_trunk_top.png",
|
||||
"moretrees_acacia_trunk.png"
|
||||
},
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
})
|
||||
|
||||
minetest.register_node("ethereal:acacia_wood", { -- Acacia Wood
|
||||
-- Acacia Wood
|
||||
minetest.register_node("ethereal:acacia_wood", {
|
||||
description = "Acacia Wood",
|
||||
tiles = {"moretrees_acacia_wood.png"},
|
||||
is_ground_content = false,
|
||||
groups = {wood=1,choppy=2,oddly_breakable_by_hand=1,flammable=3},
|
||||
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
@ -20,19 +27,25 @@ minetest.register_craft({
|
||||
recipe = {{"ethereal:acacia_trunk"}}
|
||||
})
|
||||
|
||||
minetest.register_node("ethereal:willow_trunk", { -- Willow Trunk
|
||||
-- Willow Trunk
|
||||
minetest.register_node("ethereal:willow_trunk", {
|
||||
description = "Willow Trunk",
|
||||
tiles = {"willow_trunk_top.png", "willow_trunk_top.png", "willow_trunk.png"},
|
||||
groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
|
||||
tiles = {
|
||||
"willow_trunk_top.png",
|
||||
"willow_trunk_top.png",
|
||||
"willow_trunk.png"
|
||||
},
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
})
|
||||
|
||||
minetest.register_node("ethereal:willow_wood", { -- Willow Wood
|
||||
-- Willow Wood
|
||||
minetest.register_node("ethereal:willow_wood", {
|
||||
description = "Willow Wood",
|
||||
tiles = {"willow_wood.png"},
|
||||
is_ground_content = false,
|
||||
groups = {wood=1,choppy=2,oddly_breakable_by_hand=1,flammable=3},
|
||||
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
@ -41,19 +54,25 @@ minetest.register_craft({
|
||||
recipe = {{"ethereal:willow_trunk"}}
|
||||
})
|
||||
|
||||
minetest.register_node("ethereal:redwood_trunk", { -- Redwood Trunk
|
||||
-- Redwood Trunk
|
||||
minetest.register_node("ethereal:redwood_trunk", {
|
||||
description = "Redwood Trunk",
|
||||
tiles = {"redwood_trunk_top.png", "redwood_trunk_top.png", "redwood_trunk.png"},
|
||||
groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
|
||||
tiles = {
|
||||
"redwood_trunk_top.png",
|
||||
"redwood_trunk_top.png",
|
||||
"redwood_trunk.png"
|
||||
},
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
})
|
||||
|
||||
minetest.register_node("ethereal:redwood_wood", { -- Redwood Wood
|
||||
-- Redwood Wood
|
||||
minetest.register_node("ethereal:redwood_wood", {
|
||||
description = "Redwood Wood",
|
||||
tiles = {"redwood_wood.png"},
|
||||
is_ground_content = false,
|
||||
groups = {wood=1,choppy=2,oddly_breakable_by_hand=1,flammable=3},
|
||||
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
@ -62,19 +81,25 @@ minetest.register_craft({
|
||||
recipe = {{"ethereal:redwood_trunk"}},
|
||||
})
|
||||
|
||||
minetest.register_node("ethereal:frost_tree", { -- Frost Trunk
|
||||
-- Frost Trunk
|
||||
minetest.register_node("ethereal:frost_tree", {
|
||||
description = "Frost Tree",
|
||||
tiles = {"ethereal_frost_tree_top.png", "ethereal_frost_tree_top.png", "ethereal_frost_tree.png"},
|
||||
groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,put_out_fire=1},
|
||||
tiles = {
|
||||
"ethereal_frost_tree_top.png",
|
||||
"ethereal_frost_tree_top.png",
|
||||
"ethereal_frost_tree.png"
|
||||
},
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, put_out_fire = 1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
})
|
||||
|
||||
minetest.register_node("ethereal:frost_wood", { -- Frost Wood
|
||||
-- Frost Wood
|
||||
minetest.register_node("ethereal:frost_wood", {
|
||||
description = "Frost Wood",
|
||||
tiles = {"frost_wood.png"},
|
||||
is_ground_content = false,
|
||||
groups = {wood=1,choppy=2,oddly_breakable_by_hand=1,put_out_fire=1},
|
||||
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, put_out_fire = 1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
@ -83,19 +108,25 @@ minetest.register_craft({
|
||||
recipe = {{"ethereal:frost_tree"}}
|
||||
})
|
||||
|
||||
minetest.register_node("ethereal:yellow_trunk", { -- Healing Trunk
|
||||
-- Healing Trunk
|
||||
minetest.register_node("ethereal:yellow_trunk", {
|
||||
description = "Healing Tree Trunk",
|
||||
tiles = {"yellow_tree_top.png", "yellow_tree_top.png", "yellow_tree.png"},
|
||||
groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,put_out_fire=1},
|
||||
tiles = {
|
||||
"yellow_tree_top.png",
|
||||
"yellow_tree_top.png",
|
||||
"yellow_tree.png"
|
||||
},
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, put_out_fire = 1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
})
|
||||
|
||||
minetest.register_node("ethereal:yellow_wood", { -- Healing Wood
|
||||
-- Healing Wood
|
||||
minetest.register_node("ethereal:yellow_wood", {
|
||||
description = "Healing Tree Wood",
|
||||
tiles = {"yellow_wood.png"},
|
||||
is_ground_content = false,
|
||||
groups = {wood=1,choppy=2,oddly_breakable_by_hand=1,put_out_fire=1},
|
||||
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, put_out_fire = 1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
@ -104,19 +135,25 @@ minetest.register_craft({
|
||||
recipe = {{"ethereal:yellow_trunk"}}
|
||||
})
|
||||
|
||||
minetest.register_node("ethereal:palm_trunk", { -- Palm Trunk
|
||||
-- Palm Trunk (thanks to VanessaE for palm textures)
|
||||
minetest.register_node("ethereal:palm_trunk", {
|
||||
description = "Palm Trunk",
|
||||
tiles = {"moretrees_palm_trunk_top.png", "moretrees_palm_trunk_top.png", "moretrees_palm_trunk.png"},
|
||||
groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
|
||||
tiles = {
|
||||
"moretrees_palm_trunk_top.png",
|
||||
"moretrees_palm_trunk_top.png",
|
||||
"moretrees_palm_trunk.png"
|
||||
},
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
})
|
||||
|
||||
minetest.register_node("ethereal:palm_wood", { -- Palm Wood
|
||||
-- Palm Wood
|
||||
minetest.register_node("ethereal:palm_wood", {
|
||||
description = "Palm Wood",
|
||||
tiles = {"moretrees_palm_wood.png"},
|
||||
is_ground_content = false,
|
||||
groups = {wood=1,choppy=2,oddly_breakable_by_hand=1,flammable=3},
|
||||
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
@ -125,19 +162,25 @@ minetest.register_craft({
|
||||
recipe = {{"ethereal:palm_trunk"}}
|
||||
})
|
||||
|
||||
minetest.register_node("ethereal:banana_trunk", { -- Banana Tree Trunk
|
||||
-- Banana Tree Trunk
|
||||
minetest.register_node("ethereal:banana_trunk", {
|
||||
description = "Banana Trunk",
|
||||
tiles = {"banana_trunk_top.png", "banana_trunk_top.png", "banana_trunk.png"},
|
||||
groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
|
||||
tiles = {
|
||||
"banana_trunk_top.png",
|
||||
"banana_trunk_top.png",
|
||||
"banana_trunk.png"
|
||||
},
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
})
|
||||
|
||||
minetest.register_node("ethereal:banana_wood", { -- Banana Tree Wood
|
||||
-- Banana Tree Wood
|
||||
minetest.register_node("ethereal:banana_wood", {
|
||||
description = "Banana Wood",
|
||||
tiles = {"banana_wood.png"},
|
||||
is_ground_content = false,
|
||||
groups = {wood=1,choppy=2,oddly_breakable_by_hand=1,flammable=3},
|
||||
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
@ -146,10 +189,15 @@ minetest.register_craft({
|
||||
recipe = {{"ethereal:banana_trunk"}}
|
||||
})
|
||||
|
||||
minetest.register_node("ethereal:scorched_tree", { -- Scorched Trunk
|
||||
-- Scorched Trunk
|
||||
minetest.register_node("ethereal:scorched_tree", {
|
||||
description = "Scorched Tree",
|
||||
tiles = {"scorched_tree_top.png", "scorched_tree_top.png", "scorched_tree.png"},
|
||||
groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=1},
|
||||
tiles = {
|
||||
"scorched_tree_top.png",
|
||||
"scorched_tree_top.png",
|
||||
"scorched_tree.png"
|
||||
},
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
})
|
||||
@ -163,10 +211,15 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("ethereal:mushroom_trunk", { -- Mushroom Trunk
|
||||
-- Mushroom Trunk
|
||||
minetest.register_node("ethereal:mushroom_trunk", {
|
||||
description = "Mushroom",
|
||||
tiles = {"mushroom_trunk_top.png", "mushroom_trunk_top.png", "mushroom_trunk.png"},
|
||||
groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
|
||||
tiles = {
|
||||
"mushroom_trunk_top.png",
|
||||
"mushroom_trunk_top.png",
|
||||
"mushroom_trunk.png"
|
||||
},
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
})
|
||||
})
|
Loading…
Reference in New Issue
Block a user