mirror of
https://github.com/Splizard/minetest-mod-snow.git
synced 2024-12-29 16:00:16 +01:00
use the default pine tree node, try to improve performance in mapgen_v6 and comment a weird "and y ~= "air")"
This commit is contained in:
parent
943efa6110
commit
e889cbc6a4
@ -40,7 +40,7 @@ local pine_tree = {
|
|||||||
axiom="TABff",
|
axiom="TABff",
|
||||||
rules_a="[&T+f+ff+ff+ff+f]GA",
|
rules_a="[&T+f+ff+ff+ff+f]GA",
|
||||||
rules_b="[&T+f+Gf+Gf+Gf]GB",
|
rules_b="[&T+f+Gf+Gf+Gf]GB",
|
||||||
trunk="default:tree",
|
trunk="default:pinetree",
|
||||||
leaves="snow:needles",
|
leaves="snow:needles",
|
||||||
angle=90,
|
angle=90,
|
||||||
iterations=1,
|
iterations=1,
|
||||||
@ -55,7 +55,7 @@ local xmas_tree = {
|
|||||||
axiom="TABff",
|
axiom="TABff",
|
||||||
rules_a="[&T+f+ff+ff+ff+f]GA",
|
rules_a="[&T+f+ff+ff+ff+f]GA",
|
||||||
rules_b="[&T+f+Gf+Gf+Gf]GB",
|
rules_b="[&T+f+Gf+Gf+Gf]GB",
|
||||||
trunk="default:tree",
|
trunk="default:pinetree",
|
||||||
leaves="snow:needles_decorated",
|
leaves="snow:needles_decorated",
|
||||||
angle=90,
|
angle=90,
|
||||||
iterations=1,
|
iterations=1,
|
||||||
@ -118,7 +118,7 @@ end
|
|||||||
function snow.voxelmanip_pine(pos,a,data)
|
function snow.voxelmanip_pine(pos,a,data)
|
||||||
local c_snow = minetest.get_content_id("default:snow")
|
local c_snow = minetest.get_content_id("default:snow")
|
||||||
local c_pine_needles = minetest.get_content_id("snow:needles")
|
local c_pine_needles = minetest.get_content_id("snow:needles")
|
||||||
local c_tree = minetest.get_content_id("default:tree")
|
local c_pinetree = minetest.get_content_id("default:pinetree")
|
||||||
local c_air = minetest.get_content_id("air")
|
local c_air = minetest.get_content_id("air")
|
||||||
|
|
||||||
local perlin1 = minetest.get_perlin(112,3, 0.5, 150)
|
local perlin1 = minetest.get_perlin(112,3, 0.5, 150)
|
||||||
@ -170,7 +170,7 @@ function snow.voxelmanip_pine(pos,a,data)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
data[a:index(pos.x,pos.y+i,pos.z)] = c_tree
|
data[a:index(pos.x,pos.y+i,pos.z)] = c_pinetree
|
||||||
end
|
end
|
||||||
data[a:index(pos.x,pos.y+5,pos.z)] = c_pine_needles
|
data[a:index(pos.x,pos.y+5,pos.z)] = c_pine_needles
|
||||||
data[a:index(pos.x,pos.y+6,pos.z)] = c_pine_needles
|
data[a:index(pos.x,pos.y+6,pos.z)] = c_pine_needles
|
||||||
|
@ -256,24 +256,24 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||||||
local rand = pr:next(1,4) == 1
|
local rand = pr:next(1,4) == 1
|
||||||
if ((x1 and x1 ~= c_water and x1 ~= c_ice
|
if ((x1 and x1 ~= c_water and x1 ~= c_ice
|
||||||
and x1 ~= c_air and x1 ~= c_ignore)
|
and x1 ~= c_air and x1 ~= c_ignore)
|
||||||
or ((cool or icebergs) and x1 == c_ice and rand))
|
or (rand and (cool or icebergs) and x1 == c_ice))
|
||||||
or ((z1 and z1 ~= c_water and z1 ~= c_ice
|
or ((z1 and z1 ~= c_water and z1 ~= c_ice
|
||||||
and z1 ~= c_air and z1 ~= c_ignore)
|
and z1 ~= c_air and z1 ~= c_ignore)
|
||||||
or ((cool or icebergs) and z1 == c_ice and rand))
|
or (rand and (cool or icebergs) and z1 == c_ice))
|
||||||
or ((xz1 and xz1 ~= c_water and xz1 ~= c_ice
|
or ((xz1 and xz1 ~= c_water and xz1 ~= c_ice
|
||||||
and xz1 ~= c_air and xz1 ~= c_ignore)
|
and xz1 ~= c_air and xz1 ~= c_ignore)
|
||||||
or ((cool or icebergs) and xz1 == c_ice and rand))
|
or (rand and (cool or icebergs) and xz1 == c_ice))
|
||||||
or ((xz2 and xz2 ~= c_water and xz2 ~= c_ice
|
or ((xz2 and xz2 ~= c_water and xz2 ~= c_ice
|
||||||
and xz2 ~= c_air and xz2 ~= c_ignore)
|
and xz2 ~= c_air and xz2 ~= c_ignore)
|
||||||
or ((cool or icebergs) and xz2 == c_ice and rand))
|
or (rand and (cool or icebergs) and xz2 == c_ice))
|
||||||
or ((x2 and x2 ~= c_water and x2 ~= c_ice
|
or ((x2 and x2 ~= c_water and x2 ~= c_ice
|
||||||
and x2 ~= c_air and x2 ~= c_ignore)
|
and x2 ~= c_air and x2 ~= c_ignore)
|
||||||
or ((cool or icebergs) and x2 == c_ice and rand))
|
or (rand and (cool or icebergs) and x2 == c_ice))
|
||||||
or ((z2 and z2 ~= c_water and z2 ~= c_ice
|
or ((z2 and z2 ~= c_water and z2 ~= c_ice
|
||||||
and z2 ~= c_air and z2 ~= c_ignore)
|
and z2 ~= c_air and z2 ~= c_ignore)
|
||||||
or ((cool or icebergs) and z2 == c_ice and rand))
|
or (rand and (cool or icebergs) and z2 == c_ice))
|
||||||
or (y ~= c_water and y ~= c_ice and y ~= "air")
|
or (y ~= c_water and y ~= c_ice) -- and y ~= "air") …I don't think y can be a string here ~HybridDog
|
||||||
or (pr:next(1,6) == 1 and icebergs) then
|
or (icebergs and pr:next(1,6) == 1) then
|
||||||
data[node] = c_ice
|
data[node] = c_ice
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user