1
0
Fork 0

Remove excessive functions and change the appropriate stuff

texture_conversion_wool
FossFanatic 2023-02-16 18:09:39 +00:00
parent 7d642c9929
commit 68e6965dd0
2 changed files with 3 additions and 13 deletions

View File

@ -802,24 +802,14 @@ end
local grass_spread_randomizer = PseudoRandom(minetest.get_mapgen_setting("seed")) local grass_spread_randomizer = PseudoRandom(minetest.get_mapgen_setting("seed"))
function mcl_core.get_grass_palette_index(pos)
local grass_palette_index = mcl_util.get_palette_indexes_from_pos(pos).grass_palette_index
return grass_palette_index
end
-- Return appropriate grass block node for pos -- Return appropriate grass block node for pos
function mcl_core.get_grass_block_type(pos) function mcl_core.get_grass_block_type(pos)
return {name = "mcl_core:dirt_with_grass", param2 = mcl_core.get_grass_palette_index(pos)} return {name = minetest.get_node(pos).name, param2 = mcl_util.get_palette_indexes_from_pos(pos).grass_palette_index}
end
function mcl_core.get_foliage_palette_index(pos)
local foliage_palette_index = mcl_util.get_palette_indexes_from_pos(pos).foliage_palette_index
return foliage_palette_index
end end
-- Return appropriate foliage block node for pos -- Return appropriate foliage block node for pos
function mcl_core.get_foliage_block_type(pos) function mcl_core.get_foliage_block_type(pos)
return {name = minetest.get_node(pos).name, param2 = mcl_core.get_foliage_palette_index(pos)} return {name = minetest.get_node(pos).name, param2 = mcl_util.get_palette_indexes_from_pos(pos).foliage_palette_index}
end end
------------------------------ ------------------------------

View File

@ -127,7 +127,7 @@ minetest.register_node("mcl_core:reeds", {
on_construct = function(pos) on_construct = function(pos)
local node = minetest.get_node(pos) local node = minetest.get_node(pos)
if node.param2 == 0 then if node.param2 == 0 then
node.param2 = mcl_core.get_grass_palette_index(pos) node.param2 = mcl_util.get_palette_indexes_from_pos(pos).grass_palette_index
if node.param2 ~= 0 then if node.param2 ~= 0 then
minetest.set_node(pos, node) minetest.set_node(pos, node)
end end