mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-04 15:21:06 +01:00
Make sugar canes grow on more blocks
This commit is contained in:
parent
06f8ec3b25
commit
b513385e7b
3 changed files with 8 additions and 7 deletions
1
API.md
1
API.md
|
@ -12,6 +12,7 @@ This section explains all the used groups in this subgame.
|
||||||
* `cultivatable=1`: Block will be turned into Dirt by using a hoe on it
|
* `cultivatable=1`: Block will be turned into Dirt by using a hoe on it
|
||||||
* `flammable`: Block helps spreading fire and gets destroyed by nearby fire (rating doesn't matter)
|
* `flammable`: Block helps spreading fire and gets destroyed by nearby fire (rating doesn't matter)
|
||||||
* `soil=1`: Saplings and other small plants can grow on it
|
* `soil=1`: Saplings and other small plants can grow on it
|
||||||
|
* `soil_sugarcane=1`: Sugar canes will grow on this near water
|
||||||
|
|
||||||
### Groups (mostly) used for crafting recipes
|
### Groups (mostly) used for crafting recipes
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ end
|
||||||
grow_reeds = function(pos, node)
|
grow_reeds = function(pos, node)
|
||||||
pos.y = pos.y-1
|
pos.y = pos.y-1
|
||||||
local name = minetest.get_node(pos).name
|
local name = minetest.get_node(pos).name
|
||||||
if name == "default:dirt" or name == "default:dirt_with_grass" then
|
if minetest.get_node_group(name, "soil_sugarcane") ~= 0 then
|
||||||
if minetest.find_node_near(pos, 3, {"group:water"}) == nil then
|
if minetest.find_node_near(pos, 3, {"group:water"}) == nil then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
|
@ -257,7 +257,7 @@ minetest.register_node("default:dirt_with_grass", {
|
||||||
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
|
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = {crumbly=3, soil=1, cultivatable=2},
|
groups = {crumbly=3, soil=1, soil_sugarcane=1, cultivatable=2},
|
||||||
drop = 'default:dirt',
|
drop = 'default:dirt',
|
||||||
sounds = default.node_sound_dirt_defaults({
|
sounds = default.node_sound_dirt_defaults({
|
||||||
footstep = {name="default_grass_footstep", gain=0.4},
|
footstep = {name="default_grass_footstep", gain=0.4},
|
||||||
|
@ -282,7 +282,7 @@ minetest.register_node("default:podzol", {
|
||||||
tiles = {"default_dirt_podzol_top.png", "default_dirt.png", "default_dirt_podzol_side.png"},
|
tiles = {"default_dirt_podzol_top.png", "default_dirt.png", "default_dirt_podzol_side.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = {crumbly=3, soil=1},
|
groups = {crumbly=3, soil=1, soil_sugarcane=1},
|
||||||
drop = 'default:dirt',
|
drop = 'default:dirt',
|
||||||
sounds = default.node_sound_dirt_defaults(),
|
sounds = default.node_sound_dirt_defaults(),
|
||||||
})
|
})
|
||||||
|
@ -292,7 +292,7 @@ minetest.register_node("default:dirt", {
|
||||||
tiles = {"default_dirt.png"},
|
tiles = {"default_dirt.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = {crumbly=3, soil=1, cultivatable=2},
|
groups = {crumbly=3, soil=1, soil_sugarcane=1, cultivatable=2},
|
||||||
sounds = default.node_sound_dirt_defaults(),
|
sounds = default.node_sound_dirt_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -301,7 +301,7 @@ minetest.register_node("default:coarse_dirt", {
|
||||||
tiles = {"default_coarse_dirt.png"},
|
tiles = {"default_coarse_dirt.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = {crumbly=3, soil=1, cultivatable=1},
|
groups = {crumbly=3, soil=1, soil_sugarcane=1, cultivatable=1},
|
||||||
sounds = default.node_sound_dirt_defaults(),
|
sounds = default.node_sound_dirt_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -329,7 +329,7 @@ minetest.register_node("default:sand", {
|
||||||
tiles = {"default_sand.png"},
|
tiles = {"default_sand.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = {crumbly=3, falling_node=1, sand=1},
|
groups = {crumbly=3, falling_node=1, sand=1, soil_sugarcane=1},
|
||||||
sounds = default.node_sound_sand_defaults(),
|
sounds = default.node_sound_sand_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -367,7 +367,7 @@ minetest.register_node("default:redsand", {
|
||||||
tiles = {"default_red_sand.png"},
|
tiles = {"default_red_sand.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = {crumbly=3, falling_node=1, sand=1},
|
groups = {crumbly=3, falling_node=1, sand=1, soil_sugarcane=1},
|
||||||
sounds = default.node_sound_sand_defaults(),
|
sounds = default.node_sound_sand_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue