electric/mods/ebiome/biomes/grasslands.lua
Aleksey Chubukov e20268de06 day 03-19: refactor tree registration
* refactored tree registration
* renamed textures so they can be used in loops
2023-03-18 23:52:22 +03:00

47 lines
1.1 KiB
Lua

local S = minetest.get_translator("ebiome")
minetest.register_biome({
name = "grasslands",
node_top = "mapgen_topsoil",
depth_top = 1,
node_filler = "mapgen_soil",
depth_filler = 3,
y_max = 1000,
y_min = -3,
heat_point = 50,
humidity_point = 50,
})
ebiometrees.register_tree("ebiome", "oak",{
description = "Oak",
groups = {flammable = 2}
})
minetest.register_node("ebiome:grass", {
description = S("Grass"),
tiles = {"ebiome_grass.png"},
drawtype = "plantlike",
visual_scale = 1.4,
waving = 1,
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
groups = {snappy = 3, attached_node = 1,
flora = 1, grass = 1, flammable = 1,
fuel = 1
},
})
minetest.register_alias("grass", "ebiome:grass")
minetest.register_alias("grassplant", "ebiome:grass")
minetest.register_decoration({
deco_type = "simple",
place_on = {"mapgen_topsoil"},
sidelen = 16,
fill_ratio = 0.9,
biomes = {"grasslands"},
y_max = 200,
y_min = 1,
decoration = "ebiome:grass",
})