forked from MineClone5/MineClone5
makes moss able to bonemeal
This commit is contained in:
parent
72c25d6e92
commit
53c367e718
|
@ -11,6 +11,7 @@ else
|
|||
ice_drawtype = "normal"
|
||||
ice_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false
|
||||
end
|
||||
local mossnodes = {"mcl_core:stone", "mcl_core:granite", "mcl_core:granite_smooth", "mcl_core:diorite", "mcl_core:diorite_smooth", "mcl_core:andesite", "mcl_core:andesite_smooth", "mcl_deepslate:deepslate", --[[glowberries, ]]"mcl_core:dirt", "mcl_core:dirt_with_grass", "mcl_core:podzol", "mcl_core:coarse_dirt", "mcl_core:mycelium"}
|
||||
|
||||
mcl_core.fortune_drop_ore = {
|
||||
discrete_uniform_distribution = true,
|
||||
|
@ -1099,6 +1100,37 @@ minetest.register_node("mcl_core:moss", {
|
|||
--sounds = TODO: add sound
|
||||
_mcl_blast_resistance = 0.1,
|
||||
_mcl_hardness = 0.1,
|
||||
on_rightclick = function(pos, node, pointed_thing, itemstack)
|
||||
-- TODO: fix no-place-possiblity
|
||||
if pointed_thing:get_wielded_item():get_name() == "mcl_dye:white" then
|
||||
itemstack:take_item()
|
||||
for i, j in pairs(minetest.find_nodes_in_area_under_air({x = pos.x-1, y = pos.y, z = pos.z-1}, {x = pos.x+1, y = pos.y, z = pos.z+1}, mossnodes)) do
|
||||
minetest.set_node(j, {name="mcl_core:moss"})
|
||||
end
|
||||
for i, j in pairs(minetest.find_nodes_in_area_under_air({x = pos.x-2, y = pos.y, z = pos.z-2}, {x = pos.x+2, y = pos.y, z = pos.z+2}, mossnodes)) do
|
||||
if math.random(1,3) == 1 then minetest.set_node(j, {name="mcl_core:moss"}) end
|
||||
end
|
||||
for i, j in pairs(minetest.find_nodes_in_area_under_air({x = pos.x-3, y = pos.y, z = pos.z-3}, {x = pos.x+3, y = pos.y, z = pos.z+3}, mossnodes)) do
|
||||
if math.random(1,9) == 1 then minetest.set_node(j, {name="mcl_core:moss"}) end
|
||||
end
|
||||
for i, j in pairs(minetest.find_nodes_in_area_under_air({x = pos.x-3, y = pos.y, z = pos.z-3}, {x = pos.x+3, y = pos.y, z = pos.z+3}, {"mcl_core:moss"})) do
|
||||
if math.random(1,2) == 1 then
|
||||
minetest.set_node({x=j.x,y=j.y+1,z=j.z} ,{name="mcl_flowers:tallgrass"})
|
||||
end
|
||||
end
|
||||
for i, j in pairs(minetest.find_nodes_in_area_under_air({x = pos.x-3, y = pos.y, z = pos.z-3}, {x = pos.x+3, y = pos.y, z = pos.z+3}, {"mcl_core:moss"})) do
|
||||
if math.random(1,4) == 1 then
|
||||
minetest.set_node({x=j.x,y=j.y+1,z=j.z}, {name="mcl_core:moss_carpet"})
|
||||
end
|
||||
end
|
||||
for i, j in pairs(minetest.find_nodes_in_area_under_air({x = pos.x-3, y = pos.y, z = pos.z-3}, {x = pos.x+3, y = pos.y, z = pos.z+3}, {"mcl_core:moss"})) do
|
||||
if math.random(1,10) == 1 then
|
||||
minetest.set_node({x=j.x,y=j.y+1,z=j.z} ,{name="mcl_flowers:double_grass"})
|
||||
minetest.set_node({x=j.x,y=j.y+2,z=j.z} ,{name="mcl_flowers:double_grass_top"})
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_core:moss_carpet", {
|
||||
|
|
Loading…
Reference in New Issue