add seagrass

This commit is contained in:
unknown 2021-09-04 17:53:54 -04:00
parent 04a93b0399
commit b2e953f6c3
3 changed files with 44 additions and 1 deletions

View File

@ -82,4 +82,22 @@ minetest.register_decoration({
{ypos = 3, prob = 160}
}
}
})
})
for i = 1, 3 do
minetest.register_decoration({
name = "fl_topsoil:sea_grass_" .. i,
deco_type = "simple",
place_on = {"fl_stone:sand"},
sidelen = 16,
fill_ratio = 0.06,
--biomes = {"grassland", "deciduousforest"},
place_offset_y = -1,
y_max = 0,
y_min = -16,
param2 = 0,
param2_max = 4,
flags = "force_placement",
decoration = "fl_topsoil:sea_grass_" .. i
})
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 B

View File

@ -189,6 +189,31 @@ minetest.register_node("fl_topsoil:permafrost_with_stones", {
},
groups = {dig_stone = 2},
})
for i=1, 3 do
minetest.register_node("fl_topsoil:sea_grass_" .. i, {
description = "sea grass",
drawtype = "plantlike_rooted",
paramtype = "light",
paramtype2 = "meshoptions",
tiles = {"farlands_sand.png"},
special_tiles = {"[combine:16x16:0," .. 10 - 3*i .. "=farlands_sea_grass.png"},
inventory_image = "[combine:16x16:0," .. 10 - 3*i .. "=farlands_sea_grass.png",
wield_image = "[combine:16x16:0," .. 10 - 3*i .. "=farlands_sea_grass.png",
node_dig_prediction = "fl_stone:sand",
node_placement_prediction = "",
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.type ~= "node" then return end
if minetest.get_node_or_nil(pointed_thing.under)
and minetest.get_node_or_nil(pointed_thing.under).name == "fl_stone:sand" then
minetest.set_node(pointed_thing.under, {name = "fl_topsoil:sea_grass_" .. i})
end
end,
after_destruct = function(pos, oldnode)
minetest.set_node(pos, {name = "fl_stone:sand"})
end,
groups = {not_in_creative_inventory = 1, dig_sand = 3},
})
end
minetest.register_alias("fl_terrain:dirt", "fl_topsoil:dirt")
minetest.register_alias("fl_terrain:dirt_with_grass", "fl_topsoil:dirt_with_grass")