diff options
author | tenplus1 <kinsellaja@yahoo.com> | 2014-11-21 20:26:04 +0000 |
---|---|---|
committer | tenplus1 <kinsellaja@yahoo.com> | 2014-11-21 20:26:04 +0000 |
commit | c20f259f4b00ac69be37f79f8500e53db395e7f5 (patch) | |
tree | 1ac67f0a63822323b9df224fc731ab3aebb677a9 | |
parent | c4d4e229f7d63959508e4505099a7fca5ca87534 (diff) |
Updated: flowers and code tidy
-rw-r--r-- | crystal.lua | 2 | ||||
-rw-r--r-- | extra.lua | 3 | ||||
-rw-r--r-- | flowers.lua | 16 | ||||
-rw-r--r-- | init.lua | 2 | ||||
-rw-r--r-- | plantlife.lua | 6 | ||||
-rw-r--r-- | wood.lua | 2 |
6 files changed, 13 insertions, 18 deletions
diff --git a/crystal.lua b/crystal.lua index c5da26e..d8fcc73 100644 --- a/crystal.lua +++ b/crystal.lua @@ -37,7 +37,7 @@ minetest.register_node("ethereal:crystal_block", { description = "Crystal Block", tiles = {"crystal_block.png"}, light_source = LIGHT_MAX - 5, - groups = {cracky=1,level=2,puts_out_fire}, + groups = {cracky=1,level=2,puts_out_fire=1}, sounds = default.node_sound_glass_defaults(), }) @@ -287,9 +287,8 @@ minetest.register_on_generated(function(minp, maxp, seed) for key, pos in pairs(coal_nodes) do local bpos = { x=pos.x, y=pos.y + 1, z=pos.z } - nod = minetest.get_node(bpos).name - if nod == "air" then + if minetest.get_node(bpos).name == "air" then if bpos.y > -3000 and bpos.y < -2000 then minetest.add_node(bpos, {name = "ethereal:illumishroom3"}) elseif bpos.y > -2000 and bpos.y < -1000 then diff --git a/flowers.lua b/flowers.lua index 39ba76a..94f20bd 100644 --- a/flowers.lua +++ b/flowers.lua @@ -5,20 +5,22 @@ minetest.register_abm({ interval = 40, chance = 20, action = function(pos, node) + local light = minetest.get_node_light(pos) + if not light or light < 13 then return end - - local pos0 = {x=pos.x-4,y=pos.y-4,z=pos.z-4} - local pos1 = {x=pos.x+4,y=pos.y+4,z=pos.z+4} - - local flowers = minetest.find_nodes_in_area(pos0, pos1, "group:flora") - if #flowers > 3 then + + 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 return end - + local seedling = minetest.find_nodes_in_area(pos0, pos1, {"group:soil"}) + if #seedling > 0 then seedling = seedling[math.random(#seedling)] seedling.y = seedling.y + 1 @@ -1,6 +1,6 @@ --[[
- Minetest Ethereal Mod 1.12 (7th November 2014)
+ Minetest Ethereal Mod 1.12 (21st November 2014)
Created by ChinChow
diff --git a/plantlife.lua b/plantlife.lua index 9e85b06..79d1ae1 100644 --- a/plantlife.lua +++ b/plantlife.lua @@ -347,11 +347,8 @@ minetest.register_craft({ -- Mushroom Tops give 4x Mushrooms for Planting minetest.register_craft({ output = "ethereal:mushroom_craftingitem 4", - type = shapeless, recipe = { - {"ethereal:mushroom", ""}, - {"", ""}, - {"", ""}, + {"ethereal:mushroom"}, } }) @@ -456,7 +453,6 @@ minetest.register_craftitem("ethereal:bucket_cactus", { minetest.register_craft({ output = "ethereal:bucket_cactus", - type = shapeless, recipe = { {"bucket:bucket_empty","default:cactus"}, } @@ -16,7 +16,6 @@ minetest.register_node("ethereal:acacia_wood", { -- Acacia Wood minetest.register_craft({ output = "ethereal:acacia_wood 4", - type = shapeless, recipe = {{"ethereal:acacia_trunk"}} }) @@ -117,7 +116,6 @@ minetest.register_node("ethereal:palm_wood", { -- Palm Wood minetest.register_craft({ output = "ethereal:palm_wood 4", - type = shapeless, recipe = {{"ethereal:palm_trunk"}} }) |