Skip to content

Commit

Permalink
naive cave dirt placement
Browse files Browse the repository at this point in the history
  • Loading branch information
NatureFreshMilk committed Jul 29, 2019
1 parent 73303a5 commit b767d1e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mapgen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ local cave_params = {
local c_base = minetest.get_content_id("default:desert_stone")
local c_stone = minetest.get_content_id("default:desert_stone")
local c_sand = minetest.get_content_id("default:desert_sand")
local c_dirt = minetest.get_content_id("default:dirt")
-- local c_dirt = minetest.get_content_id("default:dirt")
local c_dirt_with_grass = minetest.get_content_id("default:dirt_with_grass")
local c_meselamp = minetest.get_content_id("default:meselamp")
local c_air = minetest.get_content_id("air")
local c_vacuum = c_air
Expand Down Expand Up @@ -155,13 +156,12 @@ minetest.register_on_generated(function(minp, maxp, seed)

if is_cave and is_deep then
-- caves only deep below

if is_cave_dirt then
-- cave with dirt and lamps
if math.random(0, 15) == 1 then
data[index] = c_meselamp
else
data[index] = c_dirt
data[index] = c_dirt_with_grass
end
else
-- cave with air
Expand Down

0 comments on commit b767d1e

Please sign in to comment.