Compare commits
3 Commits
fcae65e8f8
...
757221e668
| Author | SHA1 | Date | |
|---|---|---|---|
| 757221e668 | |||
| 3793afebbd | |||
| af3ce8c769 |
@@ -9,6 +9,7 @@ local Plant = Node:getExtended({
|
||||
paramtype = "light",
|
||||
paramtype2 = "meshoptions",
|
||||
walkable = false,
|
||||
waving = 1,
|
||||
buildable_to = true,
|
||||
groups = {dig_immediate = 3},
|
||||
selection_box = {
|
||||
|
||||
@@ -16,9 +16,9 @@ local MapGen = mapGenRequire('MapGen')
|
||||
|
||||
-- Rocks
|
||||
sylite = 'rocks:sylite',
|
||||
syliteGray = 'rocks:sylite_gray',
|
||||
syliteGray = 'rocks:sylite_gray',
|
||||
syliteBlack = 'rocks:sylite_black',
|
||||
--tauitite = 'rocks:tauitite',
|
||||
tauititeLight = 'rocks:tauitite_light',
|
||||
--iyellite = 'rocks:iyellite',
|
||||
--falmyte = 'rocks:falmyte',
|
||||
--hapcoryte = 'rocks:hapcoryte',
|
||||
@@ -717,6 +717,7 @@ local ryeNoiseParams = {
|
||||
}
|
||||
local ryeNoise
|
||||
|
||||
---@param mapGenerator MapGen
|
||||
---@param nodeType MapGen.nodeType
|
||||
---@param area VoxelArea
|
||||
local function meadowPostProcessing(biome, mapGenerator, factors, data, data2, index, x, y, z, nodeType, area)
|
||||
@@ -726,10 +727,22 @@ local function meadowPostProcessing(biome, mapGenerator, factors, data, data2, i
|
||||
|
||||
if ryeNoise == nil then ryeNoise = core.get_value_noise(ryeNoiseParams) end
|
||||
|
||||
if ryeNoise:get_2d({x=x, y=z}) + math.random(0, 3) > 8 then
|
||||
local i = area:index(x,y+1,z)
|
||||
local value = ryeNoise:get_2d({x=x, y=z}) + math.random(0, 5)
|
||||
local i = area:index(x,y+1,z)
|
||||
|
||||
if value > 8 then
|
||||
data[i] = id('plants:rye')
|
||||
data2[i] = 3
|
||||
elseif value > 5 then
|
||||
data[i] = id('plants:meadow_grass_1')
|
||||
data2[i] = 3
|
||||
elseif value > 3 then
|
||||
data[i] = id('plants:meadow_grass_2')
|
||||
data2[i] = 3
|
||||
end
|
||||
|
||||
if ryeNoise:get_2d({x=x, y=z}) - math.random(0, 3) < -8 then
|
||||
data[index] = mapGenerator.nodeIDs.tauititeLight
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -38,3 +38,21 @@ Plant:new({
|
||||
}
|
||||
})
|
||||
|
||||
Plant:new({
|
||||
settings = {
|
||||
name = 'meadow_grass_1',
|
||||
tiles = {PlantsTileSheet:t(4,0)},
|
||||
place_param2 = 3,
|
||||
}
|
||||
})
|
||||
|
||||
Plant:new({
|
||||
settings = {
|
||||
name = 'meadow_grass_2',
|
||||
tiles = {PlantsTileSheet:t(5,0)},
|
||||
place_param2 = 3,
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Reference in New Issue
Block a user