mirror of
https://github.com/minetest/minetest_game.git
synced 2024-11-08 16:53:53 +01:00
Update nodes papyrus can grow on, include default:dry_dirt (#2705)
Fixes papyrus not growing on savanna dirt. Also updates the nodes papyrus can grow on, which were incorrect for a long time.
This commit is contained in:
parent
e8a7e75319
commit
b2d0f0ac8d
@ -210,7 +210,12 @@ end
|
|||||||
function default.grow_papyrus(pos, node)
|
function default.grow_papyrus(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_with_grass" and name ~= "default:dirt" then
|
if name ~= "default:dirt" and
|
||||||
|
name ~= "default:dirt_with_grass" and
|
||||||
|
name ~= "default:dirt_with_dry_grass" and
|
||||||
|
name ~= "default:dirt_with_rainforest_litter" and
|
||||||
|
name ~= "default:dry_dirt" and
|
||||||
|
name ~= "default:dry_dirt_with_dry_grass" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if not minetest.find_node_near(pos, 3, {"group:water"}) then
|
if not minetest.find_node_near(pos, 3, {"group:water"}) then
|
||||||
@ -247,7 +252,17 @@ minetest.register_abm({
|
|||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
label = "Grow papyrus",
|
label = "Grow papyrus",
|
||||||
nodenames = {"default:papyrus"},
|
nodenames = {"default:papyrus"},
|
||||||
neighbors = {"default:dirt", "default:dirt_with_grass"},
|
-- Grows on the dirt and surface dirt nodes of the biomes papyrus appears in,
|
||||||
|
-- including the old savanna nodes.
|
||||||
|
-- 'default:dirt_with_grass' is here only because it was allowed before.
|
||||||
|
neighbors = {
|
||||||
|
"default:dirt",
|
||||||
|
"default:dirt_with_grass",
|
||||||
|
"default:dirt_with_dry_grass",
|
||||||
|
"default:dirt_with_rainforest_litter",
|
||||||
|
"default:dry_dirt",
|
||||||
|
"default:dry_dirt_with_dry_grass",
|
||||||
|
},
|
||||||
interval = 14,
|
interval = 14,
|
||||||
chance = 71,
|
chance = 71,
|
||||||
action = function(...)
|
action = function(...)
|
||||||
|
Loading…
Reference in New Issue
Block a user