mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-04-30 05:01:41 -04:00
Fix dry_grass_N on dirt producing dirt_with_grass
`dry_grass_N` has groups `grass` and `dry_grass`, so if the check for `grass` is done first, having dry_grass on it makes it turn into `dirt_with_grass` instead of `dirt_with_dry_grass`. Changing the order fixes this.
This commit is contained in:
parent
c6fabe4734
commit
838ad60ad0
1 changed files with 3 additions and 2 deletions
|
@ -645,10 +645,11 @@ minetest.register_abm({
|
||||||
-- Snow check is cheapest, so comes first
|
-- Snow check is cheapest, so comes first
|
||||||
if name == "default:snow" then
|
if name == "default:snow" then
|
||||||
minetest.set_node(pos, {name = "default:dirt_with_snow"})
|
minetest.set_node(pos, {name = "default:dirt_with_snow"})
|
||||||
elseif minetest.get_item_group(name, "grass") ~= 0 then
|
-- The group grass is also present in dry grass, so check dry grass first
|
||||||
minetest.set_node(pos, {name = "default:dirt_with_grass"})
|
|
||||||
elseif minetest.get_item_group(name, "dry_grass") ~= 0 then
|
elseif minetest.get_item_group(name, "dry_grass") ~= 0 then
|
||||||
minetest.set_node(pos, {name = "default:dirt_with_dry_grass"})
|
minetest.set_node(pos, {name = "default:dirt_with_dry_grass"})
|
||||||
|
elseif minetest.get_item_group(name, "grass") ~= 0 then
|
||||||
|
minetest.set_node(pos, {name = "default:dirt_with_grass"})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue