diff --git a/LICENSE.txt b/LICENSE.txt index 56132c0..d990448 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -849,11 +849,6 @@ GNU Lesser General Public License v2.1 or later (see included LICENSE file) - everness_grass_with_blue_extra_top_2.png - everness_grass_with_yellow_extra_top_1.png -**CC-BY-SA-3.0, Pithydon** - -- everness_coral_skeleton.png - - ### Sounds **CC0-1.0, by ProdMultimediasHQI**, https://freesound.org/people/ProdMultimediasHQI/sounds/512501/ diff --git a/api.lua b/api.lua index 563069e..acce734 100644 --- a/api.lua +++ b/api.lua @@ -221,15 +221,16 @@ Everness = { } function Everness.grow_cactus(self, pos, node, params) + local node_copy = table.copy(node) + if node.param2 >= 4 then return end pos.y = pos.y - 1 - if minetest.get_item_group(minetest.get_node(pos).name, 'mold_soil') == 0 - or minetest.get_item_group(minetest.get_node(pos).name, 'sand') == 0 - or minetest.get_item_group(minetest.get_node(pos).name, 'everness_sand') == 0 + if minetest.get_item_group(minetest.get_node(pos).name, 'sand') == 0 + and minetest.get_item_group(minetest.get_node(pos).name, 'everness_sand') == 0 then return end @@ -252,7 +253,7 @@ function Everness.grow_cactus(self, pos, node, params) return end - minetest.set_node(pos, { name = node.name }) + minetest.set_node(pos, { name = node_copy.name }) return true end diff --git a/functions.lua b/functions.lua index 916d416..09cccf5 100644 --- a/functions.lua +++ b/functions.lua @@ -515,7 +515,7 @@ minetest.register_abm({ 'everness:cactus_orange', 'everness:cactus_blue' }, - neighbors = { 'group:mold_soil' }, + neighbors = { 'group:sand', 'group:everness_sand' }, interval = 12, chance = 83, action = function(...)