forked from VoxeLibre/VoxeLibre
Add weeping vines
This commit is contained in:
parent
3fc12ed946
commit
70294d9e34
|
@ -13,19 +13,19 @@ function generate_crimson_tree(pos)
|
||||||
minetest.place_schematic(pos,modpath.."/schematics/crimson_fungus_1.mts","random",nil,false,"place_center_x,place_center_z")
|
minetest.place_schematic(pos,modpath.."/schematics/crimson_fungus_1.mts","random",nil,false,"place_center_x,place_center_z")
|
||||||
end
|
end
|
||||||
|
|
||||||
function grow_twisting_vines(pos, moreontop)
|
function grow_vines(pos, moreontop ,vine, dir)
|
||||||
local y = pos.y + 1
|
if dir == nil then dir = 1 end
|
||||||
while not (moreontop == 0) do
|
local n
|
||||||
if minetest.get_node({x = pos.x, y = y, z = pos.z}).name == "air" then
|
repeat
|
||||||
minetest.set_node({x = pos.x, y = y, z = pos.z}, {name="mcl_crimson:twisting_vines"})
|
pos = vector.offset(pos,0,dir,0)
|
||||||
moreontop = moreontop - 1
|
n = minetest.get_node(pos)
|
||||||
y = y + 1
|
if n.name == "air" then
|
||||||
elseif minetest.get_node({x = pos.x, y = y, z = pos.z}).name == "mcl_crimson:twisting_vines" then
|
for i=0,math.max(moreontop,1) do
|
||||||
y = y + 1
|
minetest.set_node(vector.offset(pos,0,i*dir,0),{name=vine})
|
||||||
else
|
|
||||||
moreontop = 0
|
|
||||||
end
|
end
|
||||||
end
|
break
|
||||||
|
end
|
||||||
|
until n.name ~= "air" and n.name ~= vine
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node("mcl_crimson:warped_fungus", {
|
minetest.register_node("mcl_crimson:warped_fungus", {
|
||||||
|
@ -77,10 +77,10 @@ minetest.register_node("mcl_crimson:twisting_vines", {
|
||||||
on_rightclick = function(pos, node, pointed_thing, itemstack)
|
on_rightclick = function(pos, node, pointed_thing, itemstack)
|
||||||
if pointed_thing:get_wielded_item():get_name() == "mcl_crimson:twisting_vines" then
|
if pointed_thing:get_wielded_item():get_name() == "mcl_crimson:twisting_vines" then
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
grow_twisting_vines(pos, 1)
|
grow_vines(pos, 1, "mcl_crimson:twisting_vines")
|
||||||
elseif pointed_thing:get_wielded_item():get_name() == "mcl_dye:white" then
|
elseif pointed_thing:get_wielded_item():get_name() == "mcl_dye:white" then
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
grow_twisting_vines(pos, math.random(1, 3))
|
grow_vines(pos, math.random(1, 3),"mcl_crimson:twisting_vines")
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
drop = {
|
drop = {
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
name = mcl_crimson
|
name = mcl_crimson
|
||||||
author = debiankaios
|
author = debiankaios
|
||||||
depends = mcl_stairs, mobs_mc, mcl_util, mcl_dye
|
depends = mcl_core, mcl_stairs, mobs_mc, mcl_util, mcl_dye
|
||||||
|
|
|
@ -4794,7 +4794,7 @@ local function register_dimension_decorations()
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {"mcl_crimson:warped_nylium","mcl_crimson:twisting_vines"},
|
place_on = {"mcl_crimson:warped_nylium","mcl_crimson:twisting_vines"},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
fill_ratio = 0.012,
|
fill_ratio = 0.032,
|
||||||
biomes = {"WarpedForest"},
|
biomes = {"WarpedForest"},
|
||||||
y_min = mcl_vars.mg_lava_nether_max + 1,
|
y_min = mcl_vars.mg_lava_nether_max + 1,
|
||||||
flags = "all_floors",
|
flags = "all_floors",
|
||||||
|
@ -4877,6 +4877,18 @@ local function register_dimension_decorations()
|
||||||
size = {x = 7, y = 13, z = 7},
|
size = {x = 7, y = 13, z = 7},
|
||||||
rotation = "random",
|
rotation = "random",
|
||||||
})
|
})
|
||||||
|
minetest.register_decoration({
|
||||||
|
deco_type = "simple",
|
||||||
|
place_on = {"mcl_crimson:warped_nylium","mcl_crimson:weeping_vines","mcl_nether:netherrack"},
|
||||||
|
sidelen = 16,
|
||||||
|
fill_ratio = 0.063,
|
||||||
|
biomes = {"CrimsonForest"},
|
||||||
|
y_min = mcl_vars.mg_lava_nether_max + 1,
|
||||||
|
flags = "all_ceilings",
|
||||||
|
height = 2,
|
||||||
|
height_max = 8,
|
||||||
|
decoration = "mcl_crimson:weeping_vines",
|
||||||
|
})
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {"mcl_crimson:crimson_nylium"},
|
place_on = {"mcl_crimson:crimson_nylium"},
|
||||||
|
|
Loading…
Reference in New Issue