mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-16 16:11:06 +01:00
Fix the seagrass param2 and more
This commit is contained in:
parent
3ba77e408c
commit
dbbac7962d
1 changed files with 26 additions and 1 deletions
|
@ -112,7 +112,7 @@ for s=1, #surfaces do
|
||||||
drawtype = "plantlike_rooted",
|
drawtype = "plantlike_rooted",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "meshoptions",
|
paramtype2 = "meshoptions",
|
||||||
place_param2 = 3,
|
param2 = 3,
|
||||||
tiles = def.tiles,
|
tiles = def.tiles,
|
||||||
special_tiles = {
|
special_tiles = {
|
||||||
{
|
{
|
||||||
|
@ -149,3 +149,28 @@ end
|
||||||
if mod_doc then
|
if mod_doc then
|
||||||
doc.add_entry_alias("nodes", "mcl_ocean:seagrass_dirt", "craftitems", "mcl_ocean:seagrass")
|
doc.add_entry_alias("nodes", "mcl_ocean:seagrass_dirt", "craftitems", "mcl_ocean:seagrass")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
minetest.register_lbm({
|
||||||
|
label = "Fix incorrect seagrass",
|
||||||
|
name = "mcl_ocean:fix_incorrect_seagrass",
|
||||||
|
nodenames = {"group:seagrass"},
|
||||||
|
run_at_every_load = false,
|
||||||
|
action = function(pos, node)
|
||||||
|
if node.param2 ~= 3 then
|
||||||
|
node.param2 = 3
|
||||||
|
minetest.set_node(pos, node)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_on_generated(function(minp, maxp, blockseed)
|
||||||
|
local seagrass = minetest.find_nodes_in_area(minp, maxp, {"group:seagrass"})
|
||||||
|
for _, sgpos in pairs(seagrass) do
|
||||||
|
local sgnode = minetest.get_node(sgpos)
|
||||||
|
if sgnode.param2 ~= 3 then
|
||||||
|
sgnode.param2 = 3
|
||||||
|
minetest.set_node(sgpos, sgnode)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in a new issue