forked from VoxeLibre/VoxeLibre
Remove excessive functions and change the appropriate stuff
This commit is contained in:
parent
7d642c9929
commit
68e6965dd0
|
@ -802,24 +802,14 @@ end
|
|||
|
||||
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
|
||||
function mcl_core.get_grass_block_type(pos)
|
||||
return {name = "mcl_core:dirt_with_grass", param2 = mcl_core.get_grass_palette_index(pos)}
|
||||
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
|
||||
return {name = minetest.get_node(pos).name, param2 = mcl_util.get_palette_indexes_from_pos(pos).grass_palette_index}
|
||||
end
|
||||
|
||||
-- Return appropriate foliage block node for 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
|
||||
|
||||
------------------------------
|
||||
|
|
|
@ -127,7 +127,7 @@ minetest.register_node("mcl_core:reeds", {
|
|||
on_construct = function(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
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
|
||||
minetest.set_node(pos, node)
|
||||
end
|
||||
|
|
Reference in New Issue