Fixed farming compatibility with ethereal grass blocks
This commit is contained in:
parent
2106464751
commit
e13c78da63
10
dirt.lua
10
dirt.lua
@ -11,6 +11,11 @@ minetest.register_node("ethereal:green_dirt", {
|
||||
},
|
||||
is_ground_content = false,
|
||||
groups = {crumbly = 3, soil = 1, ethereal_grass = 1},
|
||||
soil = {
|
||||
base = "ethereal:green_dirt",
|
||||
dry = "farming:soil",
|
||||
wet = "farming:soil_wet"
|
||||
},
|
||||
drop = "default:dirt",
|
||||
sounds = default.node_sound_dirt_defaults()
|
||||
})
|
||||
@ -51,6 +56,11 @@ for _, row in ipairs(dirt.type) do
|
||||
},
|
||||
is_ground_content = false,
|
||||
groups = {crumbly = 3, soil = 1, ethereal_grass = 1},
|
||||
soil = {
|
||||
base = "ethereal:"..name.."_dirt",
|
||||
dry = "farming:soil",
|
||||
wet = "farming:soil_wet"
|
||||
},
|
||||
drop = "default:dirt",
|
||||
sounds = default.node_sound_dirt_defaults()
|
||||
})
|
||||
|
@ -103,13 +103,17 @@ minetest.register_abm({
|
||||
|
||||
-- If Water Source near Dry Dirt, change to normal Dirt
|
||||
minetest.register_abm({
|
||||
nodenames = {"ethereal:dry_dirt"},
|
||||
nodenames = {"ethereal:dry_dirt", "default:dirt_with_dry_grass"},
|
||||
neighbors = {"group:water"},
|
||||
interval = 15,
|
||||
chance = 2,
|
||||
catch_up = false,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
minetest.set_node(pos, {name = "default:dirt"})
|
||||
if node == "ethereal:dry_dirt" then
|
||||
minetest.set_node(pos, {name = "default:dirt"})
|
||||
else
|
||||
minetest.set_node(pos, {name = "ethereal:green_dirt"})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user