Update Fork #1

Merged
chmodsayshello merged 696 commits from MineClone5/MineClone5:master into master 2022-03-23 14:40:26 +01:00
1 changed files with 32 additions and 0 deletions
Showing only changes of commit 53c367e718 - Show all commits

View File

@ -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", {