Add new coral & kelp. Change ore distribution.

master
vlapsley 2016-04-22 13:35:41 +10:00
parent 91b29899da
commit c22c8e8130
42 changed files with 1618 additions and 192 deletions

View File

@ -1,4 +1,4 @@
Copyright (c) 2016, demon_boy
Copyright (c) 2016, Vaughan Lapsley
All rights reserved.
Redistribution and use in source and binary forms, with or without

View File

@ -1,6 +1,6 @@
# Australia
A mod for Minetest 0.4.13-dev. Work in progress.
Created by vlapsley. See *credits.txt* for all acknowledgements.
Created by vlapsley.
![Screenshot](https://raw.githubusercontent.com/vlapsley/australia/master/screenshot.png)
@ -17,7 +17,7 @@ Stone. No change from the default game.
#### Mangroves
The mangroves of Queensland and Northern Territory. Watch out for crocodiles!
#### Tasman Sea
Beautiful sandy beaches.
Beautiful sandy beaches. You will find lots of Brown and Giant Kelp.
#### Great Australian Bight
Sandstone cliffs and wild ocean.
#### Indian Ocean
@ -75,14 +75,11 @@ The area is extremely hot and dry. Famous for it's red sand dunes.
The highest parts of the Great Dividing Range.
## To-do list
* Fix no-air blocks for Great Barrier Reef.
* Redo some tree textures, especially wood. Some of them are great, some are awful.
* Fix ore distribution.
* Finish corals in Great Barrier Reef.
* Opals in Central Australia biome.
* Work out way to place some tree and plants along rivers.
* Salt lakes in Central Australia biome.
* Uranium? Silver? Potential support for technic mod
* Adjust tree and plant distribution.
* Adjust tree size and leaf functions.
* Add some rocky beaches.
@ -117,6 +114,16 @@ This will also disable plants, trees and more that are unique to that biome.
All biomes are enabled by default. Currently, disabling the *Underground* biome will have no effect.
## Changelog
### 0.3.1 (2016-04-22)
* Changed ore distribution to use minetest.register_ore function.
* Added uranium in two biomes if technic_worldgen mod is enabled.
* Added 4 new corals to the Great Barrier Reef biome.
* Added Brown and Giant Kelp to some ocean biomes.
* Changed muddy river water opacity. It's now much harder to see underwater in these rivers.
* Removed necessity to use voxel manipulator, voxel.lua file.
* Fixed noairblocks.
* Fixed a naming issue with some fern textures, credit: Napiophelios.
### 0.2 (2016-04-13)
* Added ferns.
* Fixed muddy water bucket.
@ -128,3 +135,19 @@ All biomes are enabled by default. Currently, disabling the *Underground* biome
* 48 trees
* 10 plants
* 4 corals
## Credits
### Code
* Original tree code adapted from Gael-de-Sailly [GNU GPLv3](http://www.gnu.org/licenses/gpl-3.0.en.html), original source can be found at [](https://github.com/Gael-de-Sailly/valleys_mapgen) and duane-r [BSD license](https://en.wikipedia.org/wiki/Bsd_license).
* Tree schematic creation code by duane-r [BSD license](https://en.wikipedia.org/wiki/Bsd_license).
* noairblocks.lua : Code modified from Duane Robertson's [valleys_c](https://github.com/duane-r/valleys_c) mod. Original code modified from Perttu Ahola's [noairblocks](https://forum.minetest.net/viewtopic.php?id=4627) mod and released as LGPL 2.1.
### Sounds
* [Mangrove mud](http://www.freesound.org/people/dobroide/sounds/16771) copyright (C) 2006 by dobroide, [CC by 3.0](https://creativecommons.org/licenses/by/3.0/legalcode)
### Textures
* Moss textures by Neuromancer, [WTFPL](https://en.wikipedia.org/wiki/WTFPL).
* Fern textures by Mossmanikin, [WTFPL](https://en.wikipedia.org/wiki/WTFPL).
* Giant Kelp textures copyright (C) 2012 by Perttu Ahola, [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/legalcode).
* Coral sand by duane-r [BSD license](https://en.wikipedia.org/wiki/Bsd_license).
* All other textures by demon_boy [github](https://github.com/vlapsley), except those from default game.

View File

@ -20,6 +20,39 @@ minetest.register_biome({
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
-- Uranium from Technic modpack: technic_worldgen mod
if minetest.get_modpath("technic_worldgen") then
minetest.register_ore({
ore_type = "scatter",
ore = "technic:mineral_uranium",
wherein = "default:stone",
clust_scarcity = 24 * 24 * 24,
clust_num_ores = 4,
clust_size = 3,
biomes = {"arnhem_land"},
y_min = -64,
y_max = 35,
noise_params = {
offset = 0,
scale = 1,
spread = {x = 100, y = 100, z = 100},
seed = 420,
octaves = 3,
persist = 0.7
},
noise_threshold = 0.6,
})
end
--
-- Decorations
--

View File

@ -20,6 +20,36 @@ minetest.register_biome({
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
-- Bluestone (Basalt)
minetest.register_ore({
ore_type = "blob",
ore = "australia:bluestone",
wherein = {"default:stone"},
clust_scarcity = 16 * 16 * 16,
clust_size = 8,
biomes = {"australian_alps"},
y_min = 150,
y_max = 31000,
noise_threshold = 0.0,
noise_params = {
offset = 0.5,
scale = 0.2,
spread = {x = 5, y = 5, z = 5},
seed = 677,
octaves = 1,
persist = 0.0
},
})
--
-- Logs
--

View File

@ -20,6 +20,39 @@ minetest.register_biome({
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
-- Uranium from Technic modpack: technic_worldgen mod
if minetest.get_modpath("technic_worldgen") then
minetest.register_ore({
ore_type = "scatter",
ore = "technic:mineral_uranium",
wherein = "default:stone",
clust_scarcity = 20 * 20 * 20,
clust_num_ores = 6,
clust_size = 4,
biomes = {"central_australia"},
y_min = -64,
y_max = 64,
noise_params = {
offset = 0,
scale = 1,
spread = {x = 100, y = 100, z = 100},
seed = 421,
octaves = 3,
persist = 0.7
},
noise_threshold = 0.6,
})
end
--
-- Decorations
--

View File

@ -20,6 +20,60 @@ minetest.register_biome({
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
-- Bluestone (Basalt)
minetest.register_ore({
ore_type = "blob",
ore = "australia:bluestone",
wherein = {"default:stone"},
clust_scarcity = 16 * 16 * 16,
clust_size = 8,
biomes = {"eastern_coasts"},
y_min = 4,
y_max = 35,
noise_threshold = 0.0,
noise_params = {
offset = 0.5,
scale = 0.2,
spread = {x = 5, y = 5, z = 5},
seed = 677,
octaves = 1,
persist = 0.0
},
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_coal",
wherein = "default:stone",
clust_scarcity = 24 * 24 * 24,
clust_num_ores = 24,
clust_size = 5,
biomes = {"eastern_coasts"},
y_min = -64,
y_max = 35,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:coalblock",
wherein = "default:stone",
clust_scarcity = 48 * 48 * 48,
clust_num_ores = 8,
clust_size = 3,
biomes = {"eastern_coasts"},
y_min = -64,
y_max = 35,
})
--
-- Decorations
--

View File

@ -20,6 +20,15 @@ minetest.register_biome({
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
--
-- Ferns
--

View File

@ -20,6 +20,35 @@ minetest.register_biome({
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
-- Copper
minetest.register_ore({
ore_type = "blob",
ore = "default:stone_with_copper",
wherein = {"default:stone"},
clust_scarcity = 48 * 48 * 48,
clust_size = 8,
biomes = {"flinders_lofty"},
y_min = -64,
y_max = 64,
noise_threshold = 1,
noise_params = {
offset = 0,
scale = 3,
spread = {x = 16, y = 16, z = 16},
seed = 892,
octaves = 3,
persist = 0.6
},
})
--
-- Decorations
--

View File

@ -20,6 +20,36 @@ minetest.register_biome({
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
-- Gold
minetest.register_ore({
ore_type = "blob",
ore = "default:stone_with_gold",
wherein = {"default:stone"},
clust_scarcity = 36 * 36 * 36,
clust_size = 8,
biomes = {"goldfields_esperence"},
y_min = -64,
y_max = 0,
noise_threshold = 0.8,
noise_params = {
offset = 0,
scale = 3,
spread = {x = 16, y = 16, z = 16},
seed = 891,
octaves = 3,
persist = 0.6
},
})
--
-- Decorations
--

View File

@ -18,3 +18,51 @@ minetest.register_biome({
humidity_point = 50,
})
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
minetest.register_ore({
ore_type = "scatter",
ore = "australia:stone_kelp_brown",
wherein = "default:sandstone",
clust_scarcity = 9*9*9,
clust_num_ores = 25,
clust_size = 6,
biomes = {"great_australian_bight"},
y_min = -10,
y_max = -3,
})
--
-- Decorations
--
--
-- ABM'S
--
minetest.register_abm({
nodenames = {"australia:stone_kelp_brown"},
interval = 15,
chance = 5,
action = function(pos, node, active_object_count, active_object_count_wider)
local yp = {x = pos.x, y = pos.y + 1, z = pos.z}
if (minetest.get_node(yp).name == "default:water_source" or
minetest.get_node(yp).name == "australia:water_source") then
pos.y = pos.y + 1
minetest.add_node(pos, {name = "australia:kelp_brown"}) else
return
end
end
})

View File

@ -20,94 +20,244 @@ minetest.register_biome({
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
minetest.register_ore({
ore_type = "scatter",
ore = "australia:coral_stone_cauliflower_brown",
wherein = "default:sand",
clust_scarcity = 11*11*11,
clust_num_ores = 25,
clust_size = 8,
biomes = {"great_barrier_reef"},
y_min = -12,
y_max = -4,
})
minetest.register_ore({
ore_type = "scatter",
ore = "australia:coral_stone_cauliflower_green",
wherein = "default:sand",
clust_scarcity = 11*11*11,
clust_num_ores = 25,
clust_size = 8,
biomes = {"great_barrier_reef"},
y_min = -12,
y_max = -4,
})
minetest.register_ore({
ore_type = "scatter",
ore = "australia:coral_stone_cauliflower_pink",
wherein = "default:sand",
clust_scarcity = 11*11*11,
clust_num_ores = 25,
clust_size = 8,
biomes = {"great_barrier_reef"},
y_min = -12,
y_max = -4,
})
minetest.register_ore({
ore_type = "scatter",
ore = "australia:coral_sand_staghorn_blue",
wherein = "default:sand",
clust_scarcity = 10*10*10,
clust_num_ores = 24,
clust_size = 4,
biomes = {"great_barrier_reef"},
y_min = -6,
y_max = -2,
})
minetest.register_ore({
ore_type = "scatter",
ore = "australia:coral_sand_staghorn_pink",
wherein = "default:sand",
clust_scarcity = 9*9*9,
clust_num_ores = 25,
clust_size = 5,
biomes = {"great_barrier_reef"},
y_min = -6,
y_max = -2,
})
minetest.register_ore({
ore_type = "scatter",
ore = "australia:coral_sand_staghorn_purple",
wherein = "default:sand",
clust_scarcity = 13*13*13,
clust_num_ores = 20,
clust_size = 4,
biomes = {"great_barrier_reef"},
y_min = -6,
y_max = -2,
})
minetest.register_ore({
ore_type = "scatter",
ore = "australia:coral_sand_staghorn_yellow",
wherein = "default:sand",
clust_scarcity = 12*12*12,
clust_num_ores = 22,
clust_size = 4,
biomes = {"great_barrier_reef"},
y_min = -6,
y_max = -2,
})
--
-- Decorations
--
-- Staghorn Coral
local function register_staghorn_coral_decoration(color)
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:sand"},
sidelen = 80,
fill_ratio = 0.01,
biomes = {"great_barrier_reef"},
y_min = -12,
y_max = -3,
decoration = "australia:staghorn_coral_"..color,
flags = "force_placement",
})
end
register_staghorn_coral_decoration("yellow")
register_staghorn_coral_decoration("purple")
register_staghorn_coral_decoration("pink")
register_staghorn_coral_decoration("blue")
-- Brain Coral
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:sand"},
sidelen = 80,
fill_ratio = 0.005,
biomes = {"great_barrier_reef"},
y_min = -12,
y_max = -3,
decoration = "australia:brain_coral",
flags = "force_placement",
})
--
-- noairblocks
-- ABM'S
--
-- Code modified from Duane Robertson's (github duane-r) valleys_c mod.
-- Original code modified from Perttu Ahola's <celeron55@gmail.com>
-- "noairblocks" mod and released as LGPL 2.1, as the original.
local water_nodes = {"default:water_source", "default:water_flowing", "default:river_water_source", "default:river_water_flowing"}
local aus_nodes = {"australia:water_source", "australia:water_flowing", "australia:river_water_source", "australia:river_water_flowing"}
for _, name in pairs(water_nodes) do
local water = table.copy(minetest.registered_nodes[name])
local new_name = string.gsub(name, 'default', 'australia')
local new_source = string.gsub(water.liquid_alternative_source, 'default', 'australia')
local new_flowing = string.gsub(water.liquid_alternative_flowing, 'default', 'australia')
water.alpha = 0
water.liquid_alternative_source = new_source
water.liquid_alternative_flowing = new_flowing
water.groups.not_in_creative_inventory = 1
minetest.register_node(new_name, water)
minetest.register_abm({
nodenames = {"australia:coral_sand_staghorn_blue"},
interval = 15,
chance = 5,
action = function(pos, node, active_object_count, active_object_count_wider)
local yp = {x = pos.x, y = pos.y + 1, z = pos.z}
if (minetest.get_node(yp).name == "default:water_source" or
minetest.get_node(yp).name == "australia:water_source") then
pos.y = pos.y + 1
minetest.add_node(pos, {name = "australia:staghorn_coral_blue"}) else
return
end
end
local check_pos = {
{x=-1, y=0, z=0},
{x=1, y=0, z=0},
{x=0, y=0, z=-1},
{x=0, y=0, z=1},
{x=0, y=1, z=0},
}
minetest.register_abm({
nodenames = {"group:sea"},
neighbors = {"group:water"},
interval = 10,
chance = 1,
action = function(pos)
for _,offset in pairs(check_pos) do
local check = vector.add(pos, offset)
local check_above = vector.add(check, {x=0,y=1,z=0})
if offset == {0,-1,0} or minetest.get_node(check_above).name ~= "air" then
local name = minetest.get_node(check).name
for node_num=1,#water_nodes do
if name == water_nodes[node_num] then
minetest.add_node(check, {name = aus_nodes[node_num]})
end
end
end
end
end,
})
minetest.register_abm({
nodenames = aus_nodes,
neighbors = {"air"},
interval = 20,
chance = 1,
action = function(pos)
if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == "air" then
minetest.remove_node(pos)
end
end,
nodenames = {"australia:coral_sand_staghorn_pink"},
interval = 15,
chance = 5,
action = function(pos, node, active_object_count, active_object_count_wider)
local yp = {x = pos.x, y = pos.y + 1, z = pos.z}
if (minetest.get_node(yp).name == "default:water_source" or
minetest.get_node(yp).name == "australia:water_source") then
pos.y = pos.y + 1
minetest.add_node(pos, {name = "australia:staghorn_coral_pink"}) else
return
end
end
})
minetest.register_abm({
nodenames = {"australia:coral_sand_staghorn_purple"},
interval = 15,
chance = 5,
action = function(pos, node, active_object_count, active_object_count_wider)
local yp = {x = pos.x, y = pos.y + 1, z = pos.z}
if (minetest.get_node(yp).name == "default:water_source" or
minetest.get_node(yp).name == "australia:water_source") then
pos.y = pos.y + 1
minetest.add_node(pos, {name = "australia:staghorn_coral_purple"}) else
return
end
end
})
minetest.register_abm({
nodenames = {"australia:coral_sand_staghorn_yellow"},
interval = 15,
chance = 5,
action = function(pos, node, active_object_count, active_object_count_wider)
local yp = {x = pos.x, y = pos.y + 1, z = pos.z}
if (minetest.get_node(yp).name == "default:water_source" or
minetest.get_node(yp).name == "australia:water_source") then
pos.y = pos.y + 1
minetest.add_node(pos, {name = "australia:staghorn_coral_yellow"}) else
return
end
end
})
minetest.register_abm({
nodenames = {"australia:coral_stone_cauliflower_brown"},
interval = 15,
chance = 5,
action = function(pos, node, active_object_count, active_object_count_wider)
local yp = {x = pos.x, y = pos.y + 1, z = pos.z}
if (minetest.get_node(yp).name == "default:water_source" or
minetest.get_node(yp).name == "australia:water_source") then
pos.y = pos.y + 1
minetest.add_node(pos, {name = "australia:cauliflower_coral_brown"}) else
return
end
end
})
minetest.register_abm({
nodenames = {"australia:coral_stone_cauliflower_green"},
interval = 15,
chance = 5,
action = function(pos, node, active_object_count, active_object_count_wider)
local yp = {x = pos.x, y = pos.y + 1, z = pos.z}
if (minetest.get_node(yp).name == "default:water_source" or
minetest.get_node(yp).name == "australia:water_source") then
pos.y = pos.y + 1
minetest.add_node(pos, {name = "australia:cauliflower_coral_green"}) else
return
end
end
})
minetest.register_abm({
nodenames = {"australia:coral_stone_cauliflower_pink"},
interval = 15,
chance = 5,
action = function(pos, node, active_object_count, active_object_count_wider)
local yp = {x = pos.x, y = pos.y + 1, z = pos.z}
if (minetest.get_node(yp).name == "default:water_source" or
minetest.get_node(yp).name == "australia:water_source") then
pos.y = pos.y + 1
minetest.add_node(pos, {name = "australia:cauliflower_coral_pink"}) else
return
end
end
})
minetest.register_abm({
nodenames = {"group:coral"},
interval = 3,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
local yp = {x = pos.x, y = pos.y + 1, z = pos.z}
local yyp = {x = pos.x, y = pos.y + 2, z = pos.z}
if ((minetest.get_node(yp).name == "default:water_source" or
minetest.get_node(yp).name == "australia:water_source") and
(minetest.get_node(yyp).name == "default:water_source" or
minetest.get_node(yyp).name == "australia:water_source")) then
local objs = minetest.get_objects_inside_radius(pos, 2)
for k, obj in pairs(objs) do
obj:set_hp(obj:get_hp()+ 1)
end
else
return
end
end
})

View File

@ -20,6 +20,60 @@ minetest.register_biome({
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
-- Bluestone (Basalt)
minetest.register_ore({
ore_type = "blob",
ore = "australia:bluestone",
wherein = {"default:stone"},
clust_scarcity = 16 * 16 * 16,
clust_size = 8,
biomes = {"great_dividing_range"},
y_min = 36,
y_max = 31000,
noise_threshold = 0.0,
noise_params = {
offset = 0.5,
scale = 0.2,
spread = {x = 5, y = 5, z = 5},
seed = 677,
octaves = 1,
persist = 0.0
},
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_coal",
wherein = "default:stone",
clust_scarcity = 24 * 24 * 24,
clust_num_ores = 24,
clust_size = 5,
biomes = {"great_dividing_range"},
y_min = -64,
y_max = 64,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:coalblock",
wherein = "default:stone",
clust_scarcity = 48 * 48 * 48,
clust_num_ores = 8,
clust_size = 3,
biomes = {"great_dividing_range"},
y_min = -64,
y_max = 64,
})
--
-- Ferns
--

View File

@ -20,6 +20,36 @@ minetest.register_biome({
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
-- Copper
minetest.register_ore({
ore_type = "blob",
ore = "default:stone_with_copper",
wherein = {"default:stone"},
clust_scarcity = 44 * 44 * 44,
clust_size = 8,
biomes = {"gulf_of_carpentaria"},
y_min = -64,
y_max = 0,
noise_threshold = 1,
noise_params = {
offset = 0,
scale = 3,
spread = {x = 16, y = 16, z = 16},
seed = 890,
octaves = 3,
persist = 0.6
},
})
--
-- Decorations
--

View File

@ -20,6 +20,27 @@ minetest.register_biome({
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
minetest.register_ore({
ore_type = "scatter",
ore = "australia:stone_kelp_brown",
wherein = "default:sand",
clust_scarcity = 9*9*9,
clust_num_ores = 25,
clust_size = 6,
biomes = {"indian_ocean"},
y_min = -10,
y_max = -3,
})
--
-- Decorations
--
@ -72,3 +93,25 @@ register_grass_decoration(0.03, 0.03, 1)
register_dry_grass_decoration(0.01, 0.05, 5)
register_dry_grass_decoration(0.03, 0.03, 4)
register_dry_grass_decoration(0.05, 0.01, 3)
--
-- ABM'S
--
minetest.register_abm({
nodenames = {"australia:stone_kelp_brown"},
interval = 15,
chance = 5,
action = function(pos, node, active_object_count, active_object_count_wider)
local yp = {x = pos.x, y = pos.y + 1, z = pos.z}
if (minetest.get_node(yp).name == "default:water_source" or
minetest.get_node(yp).name == "australia:water_source") then
pos.y = pos.y + 1
minetest.add_node(pos, {name = "australia:kelp_brown"}) else
return
end
end
})

View File

@ -20,6 +20,36 @@ minetest.register_biome({
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
-- Bluestone (Basalt)
minetest.register_ore({
ore_type = "blob",
ore = "australia:bluestone",
wherein = {"default:stone", "default:sandstone"},
clust_scarcity = 16 * 16 * 16,
clust_size = 8,
biomes = {"jarrah_karri_forests"},
y_min = 4,
y_max = 35,
noise_threshold = 0.0,
noise_params = {
offset = 0.5,
scale = 0.2,
spread = {x = 5, y = 5, z = 5},
seed = 677,
octaves = 1,
persist = 0.0
},
})
--
-- Decorations
--

View File

@ -20,6 +20,27 @@ minetest.register_biome({
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_diamond",
wherein = "default:stone",
clust_scarcity = 40 * 40 * 40,
clust_num_ores = 12,
clust_size = 4,
biomes = {"kimberley"},
y_min = -64,
y_max = 35,
})
--
-- Decorations
--

View File

@ -4,9 +4,9 @@ minetest.register_biome({
name = "mangroves",
--node_dust = "",
node_top = "australia:mangrove_mud",
depth_top = 2,
node_filler = "default:dirt",
depth_filler = 2,
depth_top = 3,
node_filler = "default:clay",
depth_filler = 1,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
@ -20,6 +20,19 @@ minetest.register_biome({
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
--
-- Decorations
--
-- Mangrove Fern
minetest.register_decoration({
deco_type = "simple",

View File

@ -20,6 +20,15 @@ minetest.register_biome({
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
--
-- Decorations
--

View File

@ -20,6 +20,15 @@ minetest.register_biome({
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
--
-- Decorations
--

View File

@ -20,6 +20,36 @@ minetest.register_biome({
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
-- Iron
minetest.register_ore({
ore_type = "blob",
ore = "air",
wherein = {"default:stone"},
clust_scarcity = 24 * 24 * 24,
clust_size = 8,
biomes = {"pilbara"},
y_min = -64,
y_max = 35,
noise_threshold = 1,
noise_params = {
offset = 0,
scale = 3,
spread = {x = 16, y = 16, z = 16},
seed = 895,
octaves = 3,
persist = 0.6
},
})
--
-- Decorations
--

View File

@ -20,6 +20,15 @@ minetest.register_biome({
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
--
-- Trees
--

View File

@ -20,6 +20,39 @@ minetest.register_biome({
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
minetest.register_ore({
ore_type = "scatter",
ore = "australia:stone_kelp_brown",
wherein = "default:sand",
clust_scarcity = 9*9*9,
clust_num_ores = 25,
clust_size = 6,
biomes = {"tasman_sea"},
y_min = -10,
y_max = -3,
})
minetest.register_ore({
ore_type = "scatter",
ore = "australia:stone_kelp_giant_brown",
wherein = "default:sand",
clust_scarcity = 10*10*10,
clust_num_ores = 24,
clust_size = 8,
biomes = {"tasman_sea"},
y_min = -64,
y_max = -8,
})
--
-- Decorations
--
@ -72,3 +105,65 @@ register_grass_decoration(0.03, 0.03, 1)
register_dry_grass_decoration(0.01, 0.05, 5)
register_dry_grass_decoration(0.03, 0.03, 4)
register_dry_grass_decoration(0.05, 0.01, 3)
--
-- ABM'S
--
minetest.register_abm({
nodenames = {"australia:stone_kelp_brown"},
interval = 15,
chance = 5,
action = function(pos, node, active_object_count, active_object_count_wider)
local yp = {x = pos.x, y = pos.y + 1, z = pos.z}
if (minetest.get_node(yp).name == "default:water_source" or
minetest.get_node(yp).name == "australia:water_source") then
pos.y = pos.y + 1
minetest.add_node(pos, {name = "australia:kelp_brown"}) else
return
end
end
})
minetest.register_abm({
nodenames = {"australia:stone_kelp_giant_brown"},
interval = 12,
chance = 10,
action = function(pos, node, active_object_count, active_object_count_wider)
local yp = {x = pos.x, y = pos.y + 1, z = pos.z}
if (minetest.get_node(yp).name == "default:water_source" or
minetest.get_node(yp).name == "australia:water_source") then
pos.y = pos.y + 1
minetest.add_node(pos, {name = "australia:kelp_giant_brown"}) else
return
end
end
})
minetest.register_abm({
nodenames = {"australia:kelp_giant_brown"},
interval = 6,
chance = 3,
action = function(pos, node, active_object_count, active_object_count_wider)
local yp = {x = pos.x, y = pos.y + 1, z = pos.z}
local yyp = {x = pos.x, y = pos.y + 2, z = pos.z}
local yyyp = {x = pos.x, y = pos.y + 3, z = pos.z}
if minetest.get_node(pos).name == "australia:kelp_giant_brown" and
(minetest.get_node(yp).name == "default:water_source" or
minetest.get_node(yp).name == "australia:water_source") then
if (minetest.get_node(yyp).name == "default:water_source" or
minetest.get_node(yyp).name == "australia:water_source") then
if (minetest.get_node(yyyp).name == "default:water_source" or
minetest.get_node(yyyp).name == "australia:water_source") then
minetest.add_node(pos, {name = "australia:kelp_giant_brown_middle"})
pos.y = pos.y + 1
minetest.add_node(pos, {name = "australia:kelp_giant_brown"})
else
return
end
end
end
end
})

View File

@ -19,6 +19,15 @@ minetest.register_biome({
})
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
--
-- Ferns
--

View File

@ -20,6 +20,15 @@ minetest.register_biome({
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
--
-- Decorations
--

View File

@ -18,3 +18,39 @@ minetest.register_biome({
humidity_point = 50,
})
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
-- Bluestone (Basalt)
minetest.register_ore({
ore_type = "blob",
ore = "australia:bluestone",
wherein = {"default:stone"},
clust_scarcity = 16 * 16 * 16,
clust_size = 8,
biomes = {"underground"},
y_min = -31000,
y_max = -65,
noise_threshold = 0.0,
noise_params = {
offset = 0.5,
scale = 0.2,
spread = {x = 5, y = 5, z = 5},
seed = 677,
octaves = 1,
persist = 0.0
},
})
--
-- Decorations
--

View File

@ -20,6 +20,80 @@ minetest.register_biome({
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
-- Bluestone (Basalt)
minetest.register_ore({
ore_type = "blob",
ore = "australia:bluestone",
wherein = {"default:stone"},
clust_scarcity = 16 * 16 * 16,
clust_size = 8,
biomes = {"victorian_forests"},
y_min = 36,
y_max = 31000,
noise_threshold = 0.0,
noise_params = {
offset = 0.5,
scale = 0.2,
spread = {x = 5, y = 5, z = 5},
seed = 677,
octaves = 1,
persist = 0.0
},
})
-- Gold
minetest.register_ore({
ore_type = "blob",
ore = "default:stone_with_gold",
wherein = {"default:stone"},
clust_scarcity = 50 * 50 * 50,
clust_size = 8,
biomes = {"victorian_forests"},
y_min = -64,
y_max = 64,
noise_threshold = 1,
noise_params = {
offset = 0,
scale = 3,
spread = {x = 16, y = 16, z = 16},
seed = 890,
octaves = 3,
persist = 0.6
},
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_coal",
wherein = "default:stone",
clust_scarcity = 24 * 24 * 24,
clust_num_ores = 24,
clust_size = 5,
biomes = {"victorian_forests"},
y_min = -64,
y_max = 64,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:coalblock",
wherein = "default:stone",
clust_scarcity = 48 * 48 * 48,
clust_num_ores = 8,
clust_size = 3,
biomes = {"victorian_forests"},
y_min = -64,
y_max = 64,
})
--
-- Ferns
--

View File

@ -3,25 +3,25 @@
-- Fiddlehead
minetest.register_craftitem("australia:fiddlehead", {
description = "Fiddlehead",
inventory_image = "australia_fiddlehead.png",
inventory_image = "aus_fiddlehead.png",
on_use = minetest.item_eat(-1), -- slightly poisonous when raw
})
minetest.register_craftitem("australia:fiddlehead_roasted", {
description = "Roasted Fiddlehead",
inventory_image = "australia_fiddlehead_roasted.png",
inventory_image = "aus_fiddlehead_roasted.png",
on_use = minetest.item_eat(1), -- edible when cooked
})
-- Fern tuber
minetest.register_craftitem("australia:ferntuber", {
description = "Fern Tuber",
inventory_image = "australia_ferntuber.png",
inventory_image = "aus_ferntuber.png",
})
minetest.register_craftitem("australia:ferntuber_roasted", {
description = "Roasted Fern Tuber",
inventory_image = "australia_ferntuber_roasted.png",
inventory_image = "aus_ferntuber_roasted.png",
on_use = minetest.item_eat(3),
})

View File

@ -1,14 +0,0 @@
-- Mangrove mud sounds from: http://www.freesound.org/people/dobroide/sounds/16771/ (CC by 3.0)
-- Moss textures by Neuromancer.
-- All tree textures by vlapsley.
-- All plant/flower textures by vlapsley, except grass/dry_grass from default game.
-- Bluestone textures by vlapsley.
-- Original tree code adapted from Gael-de-Sailly and duane-r.
-- Tree schematic creation code by duane-r.
-- Ore placement code adapted from duane-r.
-- noairblocks
-- Code modified from Duane Robertson's (github duane-r) valleys_c mod.
-- Original code modified from Perttu Ahola's <celeron55@gmail.com>
-- "noairblocks" mod and released as LGPL 2.1, as the original.

View File

@ -49,11 +49,12 @@ aus.biome_australian_alps = 1
-- Load files
dofile(aus.path .. "/functions.lua")
dofile(aus.path .. "/nodes.lua")
dofile(aus.path .. "/noairblocks.lua")
dofile(aus.path .. "/craftitems.lua")
dofile(aus.path .. "/crafting.lua")
dofile(aus.path .. "/trees.lua")
dofile(aus.path .. "/mapgen.lua")
dofile(aus.path .. "/saplings.lua")
dofile(aus.path .. "/voxel.lua")
--dofile(aus.path .. "/voxel.lua")
minetest.log("MOD: Australia loaded")

View File

@ -2,7 +2,7 @@
minetest.clear_registered_biomes()
minetest.clear_registered_decorations()
minetest.clear_registered_ores()
--
@ -12,15 +12,74 @@ minetest.clear_registered_decorations()
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
-- Bluestone (Basalt)
-- Clay
minetest.register_ore({
ore_type = "blob",
ore = "default:clay",
wherein = {"default:sand"},
clust_scarcity = 16 * 16 * 16,
clust_size = 5,
y_min = -15,
y_max = 0,
noise_threshold = 0.0,
noise_params = {
offset = 0.5,
scale = 0.2,
spread = {x = 5, y = 5, z = 5},
seed = -316,
octaves = 1,
persist = 0.0
},
})
-- Sand
minetest.register_ore({
ore_type = "blob",
ore = "default:sand",
wherein = {"default:stone", "default:sandstone"},
clust_scarcity = 16 * 16 * 16,
clust_size = 5,
y_min = -31,
y_max = 4,
noise_threshold = 0.0,
noise_params = {
offset = 0.5,
scale = 0.2,
spread = {x = 5, y = 5, z = 5},
seed = 2316,
octaves = 1,
persist = 0.0
},
})
-- Dirt
minetest.register_ore({
ore_type = "blob",
ore = "australia:bluestone",
wherein = {"default:stone",
"default:sandstone",
"australia:red_stone"},
ore = "default:dirt",
wherein = {"default:stone", "default:sandstone"},
clust_scarcity = 16 * 16 * 16,
clust_size = 8,
clust_size = 5,
y_min = -31,
y_max = 31000,
noise_threshold = 0.0,
noise_params = {
offset = 0.5,
scale = 0.2,
spread = {x = 5, y = 5, z = 5},
seed = 17676,
octaves = 1,
persist = 0.0
},
})
-- Gravel
minetest.register_ore({
ore_type = "blob",
ore = "default:gravel",
wherein = {"default:stone"},
clust_scarcity = 16 * 16 * 16,
clust_size = 5,
y_min = -31000,
y_max = 31000,
noise_threshold = 0.0,
@ -28,12 +87,183 @@ minetest.register_ore({
offset = 0.5,
scale = 0.2,
spread = {x = 5, y = 5, z = 5},
seed = 677,
seed = 766,
octaves = 1,
persist = 0.0
},
})
-- Coal
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_coal",
wherein = "default:stone",
clust_scarcity = 8 * 8 * 8,
clust_num_ores = 8,
clust_size = 3,
y_min = -31000,
y_max = 64,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_coal",
wherein = "default:stone",
clust_scarcity = 24 * 24 * 24,
clust_num_ores = 27,
clust_size = 6,
y_min = -31000,
y_max = 0,
})
-- Iron
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_iron",
wherein = "default:stone",
clust_scarcity = 12 * 12 * 12,
clust_num_ores = 3,
clust_size = 2,
y_min = -15,
y_max = 2,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_iron",
wherein = "default:stone",
clust_scarcity = 9 * 9 * 9,
clust_num_ores = 5,
clust_size = 3,
y_min = -63,
y_max = -16,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_iron",
wherein = "default:stone",
clust_scarcity = 7 * 7 * 7,
clust_num_ores = 5,
clust_size = 3,
y_min = -31000,
y_max = -64,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_iron",
wherein = "default:stone",
clust_scarcity = 24 * 24 * 24,
clust_num_ores = 27,
clust_size = 6,
y_min = -31000,
y_max = -64,
})
--Mese
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_mese",
wherein = "default:stone",
clust_scarcity = 18 * 18 * 18,
clust_num_ores = 3,
clust_size = 2,
y_min = -255,
y_max = -64,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_mese",
wherein = "default:stone",
clust_scarcity = 14 * 14 * 14,
clust_num_ores = 5,
clust_size = 3,
y_min = -31000,
y_max = -256,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:mese",
wherein = "default:stone",
clust_scarcity = 36 * 36 * 36,
clust_num_ores = 3,
clust_size = 2,
y_min = -31000,
y_max = -1024,
})
-- Gold
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_gold",
wherein = "default:stone",
clust_scarcity = 15 * 15 * 15,
clust_num_ores = 3,
clust_size = 2,
y_min = -255,
y_max = -64,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_gold",
wherein = "default:stone",
clust_scarcity = 13 * 13 * 13,
clust_num_ores = 5,
clust_size = 3,
y_min = -31000,
y_max = -256,
})
-- Diamond
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_diamond",
wherein = "default:stone",
clust_scarcity = 17 * 17 * 17,
clust_num_ores = 4,
clust_size = 3,
y_min = -255,
y_max = -128,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_diamond",
wherein = "default:stone",
clust_scarcity = 15 * 15 * 15,
clust_num_ores = 4,
clust_size = 3,
y_min = -31000,
y_max = -256,
})
-- Copper
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_copper",
wherein = "default:stone",
clust_scarcity = 12 * 12 * 12,
clust_num_ores = 4,
clust_size = 3,
y_min = -63,
y_max = -16,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_copper",
wherein = "default:stone",
clust_scarcity = 9 * 9 * 9,
clust_num_ores = 5,
clust_size = 3,
y_min = -31000,
y_max = -64,
})
--

80
noairblocks.lua Normal file
View File

@ -0,0 +1,80 @@
--
-- noairblocks
--
-- Code modified from Duane Robertson's valleys_c mod
-- (https://github.com/duane-r/valleys_c).
--
-- Original code Copyright (C) 2012 Perttu Ahola <celeron55@gmail.com>
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License as published by the Free
-- Software Foundation; either version 2.1 of the License, or (at your option)
-- any later version.
--
-- This library is distributed in the hope that it will be useful, but WITHOUT
-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-- FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
-- details.
--
-- You should have received a copy of the GNU Lesser General Public License
-- along with this library; if not, write to the Free Software Foundation, Inc.,
-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
local water_nodes = {"default:water_source", "default:water_flowing", "default:river_water_source", "default:river_water_flowing"}
local aus_nodes = {"australia:water_source", "australia:water_flowing", "australia:river_water_source", "australia:river_water_flowing"}
for _, name in pairs(water_nodes) do
local water = table.copy(minetest.registered_nodes[name])
local new_name = string.gsub(name, 'default', 'australia')
local new_source = string.gsub(water.liquid_alternative_source, 'default', 'australia')
local new_flowing = string.gsub(water.liquid_alternative_flowing, 'default', 'australia')
water.alpha = 0
water.liquid_alternative_source = new_source
water.liquid_alternative_flowing = new_flowing
water.groups.not_in_creative_inventory = 1
minetest.register_node(new_name, water)
end
local check_pos = {
{x=-1, y=0, z=0},
{x=1, y=0, z=0},
{x=0, y=0, z=-1},
{x=0, y=0, z=1},
{x=0, y=1, z=0},
}
minetest.register_abm({
nodenames = {"group:sea"},
neighbors = {"group:water"},
interval = 10,
chance = 1,
action = function(pos)
for _,offset in pairs(check_pos) do
local check = vector.add(pos, offset)
local check_above = vector.add(check, {x=0,y=1,z=0})
if offset == {0,-1,0} or minetest.get_node(check_above).name ~= "air" then
local name = minetest.get_node(check).name
for node_num=1,#water_nodes do
if name == water_nodes[node_num] then
minetest.add_node(check, {name = aus_nodes[node_num]})
end
end
end
end
end,
})
minetest.register_abm({
nodenames = aus_nodes,
neighbors = {"air"},
interval = 20,
chance = 1,
action = function(pos)
if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == "air" then
minetest.remove_node(pos)
end
end,
})

323
nodes.lua
View File

@ -53,6 +53,52 @@ minetest.register_node("australia:bluestone_brick", {
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("australia:coral_stone_cauliflower_brown", {
description = "Sea coral stone",
tiles = {"aus_coral_stone.png"},
is_ground_content = true,
groups = {cracky=3, stone=1, not_in_creative_inventory=1},
drop = 'default:stone',
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("australia:coral_stone_cauliflower_green", {
description = "Sea coral stone",
tiles = {"aus_coral_stone.png"},
is_ground_content = true,
groups = {cracky=3, stone=1, not_in_creative_inventory=1},
drop = 'default:stone',
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("australia:coral_stone_cauliflower_pink", {
description = "Sea coral stone",
tiles = {"aus_coral_stone.png"},
is_ground_content = true,
groups = {cracky=3, stone=1, not_in_creative_inventory=1},
drop = 'default:stone',
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("australia:stone_kelp_brown", {
description = "Sea stone",
tiles = {"aus_coral_stone.png"},
is_ground_content = true,
groups = {cracky=3, stone=1, not_in_creative_inventory=1},
drop = 'default:stone',
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("australia:stone_kelp_giant_brown", {
description = "Sea stone",
tiles = {"aus_coral_stone.png"},
is_ground_content = true,
groups = {cracky=3, stone=1, not_in_creative_inventory=1},
drop = 'default:stone',
sounds = default.node_sound_stone_defaults(),
})
--
-- Soft / Non-Stone
@ -92,6 +138,42 @@ minetest.register_node("australia:mangrove_mud", {
}),
})
minetest.register_node("australia:coral_sand_staghorn_blue", {
description = "Sea coral sand",
tiles = {"aus_coral_sand.png"},
is_ground_content = true,
groups = {crumbly=3, falling_node=1, sand=1, soil=1, not_in_creative_inventory=1},
drop = 'default:sand',
sounds = default.node_sound_sand_defaults(),
})
minetest.register_node("australia:coral_sand_staghorn_pink", {
description = "Sea coral sand",
tiles = {"aus_coral_sand.png"},
is_ground_content = true,
groups = {crumbly=3, falling_node=1, sand=1, soil=1, not_in_creative_inventory=1},
drop = 'default:sand',
sounds = default.node_sound_sand_defaults(),
})
minetest.register_node("australia:coral_sand_staghorn_purple", {
description = "Sea coral sand",
tiles = {"aus_coral_sand.png"},
is_ground_content = true,
groups = {crumbly=3, falling_node=1, sand=1, soil=1, not_in_creative_inventory=1},
drop = 'default:sand',
sounds = default.node_sound_sand_defaults(),
})
minetest.register_node("australia:coral_sand_staghorn_yellow", {
description = "Sea coral sand",
tiles = {"aus_coral_sand.png"},
is_ground_content = true,
groups = {crumbly=3, falling_node=1, sand=1, soil=1, not_in_creative_inventory=1},
drop = 'default:sand',
sounds = default.node_sound_sand_defaults(),
})
--
@ -843,41 +925,179 @@ minetest.register_node("australia:waratah", {
sounds = default.node_sound_leaves_defaults(),
})
-- Acropora cervicornis: Staghorn Coral (yellow)
minetest.register_node("australia:staghorn_coral_yellow", {
description = "Acropora cervicornis: Staghorn Coral",
-- Ecklonia radiata: Common Kelp
minetest.register_node("australia:kelp_brown", {
description = "Ecklonia radiata: Common Kelp",
drawtype = "plantlike",
waving = 0,
visual_scale = 1.0,
tiles = {"aus_staghorn_coral_yellow.png"},
inventory_image = "aus_staghorn_coral_yellow.png",
wield_image = "aus_staghorn_coral_yellow.png",
waving = 1,
tiles = {"aus_kelp_brown.png"},
inventory_image = "aus_kelp_brown.png",
wield_image = "aus_kelp_brown.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = false,
groups = {cracky = 3, stone=1, attached_node=1, sea=1},
sounds = default.node_sound_stone_defaults(),
climable = true,
drowning = 1,
is_ground_content = true,
groups = {snappy=3, seaplants=1, sea=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5},
},
})
-- Acropora cervicornis: Staghorn Coral (purple)
minetest.register_node("australia:staghorn_coral_purple", {
-- Macrocystis pyrifera: Giant Kelp
minetest.register_node("australia:kelp_giant_brown", {
description = "Giant Kelp ",
drawtype = "plantlike",
tiles = {"aus_kelp_giant_brown.png"},
inventory_image = "aus_kelp_giant_brown.png",
wield_image = "aus_kelp_giant_brown.png",
paramtype = "light",
walkable = false,
climbable = true,
drowning = 1,
is_ground_content = true,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.3, 0.3}
},
post_effect_color = {a=64, r=100, g=100, b=200},
groups = {snappy=3, seaplants=1, sea=1},
sounds = default.node_sound_leaves_defaults(),
on_use = minetest.item_eat(1)
})
minetest.register_node("australia:kelp_giant_brown_middle", {
description = "Giant Kelp middle",
drawtype = "plantlike",
tiles = {"aus_kelp_giant_brown_middle.png"},
inventory_image = "aus_kelp_giant_brown_middle.png",
wield_image = "aus_kelp_giant_brown_middle.png",
paramtype = "light",
walkable = false,
climbable = true,
drowning = 1,
is_ground_content = true,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
},
post_effect_color = {a=64, r=100, g=100, b=200},
groups = {snappy=3, seaplants=1, sea=1},
drop = "australia:kelp_giant_brown",
sounds = default.node_sound_leaves_defaults(),
})
-- Dipsastraea speciosa: Brain Coral
minetest.register_node("australia:brain_coral", {
description = "Dipsastraea speciosa: Brain Coral",
drawtype = "nodebox",
paramtype = "light",
tiles = {
"aus_brain_coral.png",
"aus_brain_coral.png",
"aus_brain_coral.png",
"aus_brain_coral.png",
"aus_brain_coral.png",
"aus_brain_coral.png"
},
inventory_image = { "aus_brain_coral.png"},
wield_image = { "aus_brain_coral.png"},
is_ground_content = true,
groups = {cracky = 3, coral = 1, stone = 1, attached_node = 1, sea = 1},
sounds = default.node_sound_leaves_defaults(),
node_box = {
type = "fixed",
fixed = {
{-0.125, -0.5, -0.125, 0.125, 0.5, 0.125},
{-0.1875, -0.5, -0.1875, 0.1875, 0.4375, 0.1875},
{-0.25, -0.5, -0.25, 0.25, 0.375, 0.25},
{-0.3125, -0.5, -0.3125, 0.3125, 0.3125, 0.3125},
{-0.375, -0.5, -0.375, 0.375, 0.25, 0.375},
{-0.4375, -0.4375, -0.4375, 0.4375, 0.1875, 0.4375},
{-0.5, -0.375, -0.5, 0.5, 0.125, 0.5},
}
},
})
-- Pocillopora damicornis: Cauliflower Coral (brown)
minetest.register_node("australia:cauliflower_coral_brown", {
description = "Pocillopora damicornis: Cauliflower Coral",
drawtype = "plantlike",
visual_scale = 0.75,
tiles = { "aus_cauliflower_coral_brown.png"},
inventory_image = { "aus_cauliflower_coral_brown.png"},
wield_image = { "aus_cauliflower_coral_brown.png"},
paramtype = "light",
walkable = false,
climable = true,
drowning = 1,
is_ground_content = true,
groups = {cracky = 3, coral = 1, stone = 1, attached_node = 1, sea = 1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5},
},
})
-- Pocillopora damicornis: Cauliflower Coral (green)
minetest.register_node("australia:cauliflower_coral_green", {
description = "Pocillopora damicornis: Cauliflower Coral",
drawtype = "plantlike",
visual_scale = 0.75,
tiles = { "aus_cauliflower_coral_green.png"},
inventory_image = { "aus_cauliflower_coral_green.png"},
wield_image = { "aus_cauliflower_coral_green.png"},
paramtype = "light",
walkable = false,
climable = true,
drowning = 1,
is_ground_content = true,
groups = {cracky = 3, coral = 1, stone = 1, attached_node = 1, sea = 1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5},
},
})
-- Pocillopora damicornis: Cauliflower Coral (pink)
minetest.register_node("australia:cauliflower_coral_pink", {
description = "Pocillopora damicornis: Cauliflower Coral",
drawtype = "plantlike",
visual_scale = 0.75,
tiles = { "aus_cauliflower_coral_pink.png"},
inventory_image = { "aus_cauliflower_coral_pink.png"},
wield_image = { "aus_cauliflower_coral_pink.png"},
paramtype = "light",
walkable = false,
climable = true,
drowning = 1,
is_ground_content = true,
groups = {cracky = 3, coral = 1, stone = 1, attached_node = 1, sea = 1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5},
},
})
-- Acropora cervicornis: Staghorn Coral (blue)
minetest.register_node("australia:staghorn_coral_blue", {
description = "Acropora cervicornis: Staghorn Coral",
drawtype = "plantlike",
waving = 0,
visual_scale = 1.0,
tiles = {"aus_staghorn_coral_purple.png"},
inventory_image = "aus_staghorn_coral_purple.png",
wield_image = "aus_staghorn_coral_purple.png",
tiles = {"aus_staghorn_coral_blue.png"},
inventory_image = "aus_staghorn_coral_blue.png",
wield_image = "aus_staghorn_coral_blue.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = false,
groups = {cracky = 3, stone=1, attached_node=1, sea=1},
climable = true,
drowning = 1,
is_ground_content = true,
groups = {cracky = 3, coral = 1, stone = 1, attached_node = 1, sea = 1},
sounds = default.node_sound_stone_defaults(),
selection_box = {
type = "fixed",
@ -897,8 +1117,11 @@ minetest.register_node("australia:staghorn_coral_pink", {
paramtype = "light",
sunlight_propagates = true,
walkable = false,
climable = true,
buildable_to = false,
groups = {cracky = 3, stone=1, attached_node=1, sea=1},
drowning = 1,
is_ground_content = true,
groups = {cracky = 3, coral = 1, stone = 1, attached_node = 1, sea = 1},
sounds = default.node_sound_stone_defaults(),
selection_box = {
type = "fixed",
@ -906,20 +1129,23 @@ minetest.register_node("australia:staghorn_coral_pink", {
},
})
-- Acropora cervicornis: Staghorn Coral (blue)
minetest.register_node("australia:staghorn_coral_blue", {
-- Acropora cervicornis: Staghorn Coral (purple)
minetest.register_node("australia:staghorn_coral_purple", {
description = "Acropora cervicornis: Staghorn Coral",
drawtype = "plantlike",
waving = 0,
visual_scale = 1.0,
tiles = {"aus_staghorn_coral_blue.png"},
inventory_image = "aus_staghorn_coral_blue.png",
wield_image = "aus_staghorn_coral_blue.png",
tiles = {"aus_staghorn_coral_purple.png"},
inventory_image = "aus_staghorn_coral_purple.png",
wield_image = "aus_staghorn_coral_purple.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
climable = true,
buildable_to = false,
groups = {cracky = 3, stone=1, attached_node=1, sea=1},
drowning = 1,
is_ground_content = true,
groups = {cracky = 3, coral = 1, stone = 1, attached_node = 1, sea = 1},
sounds = default.node_sound_stone_defaults(),
selection_box = {
type = "fixed",
@ -927,6 +1153,31 @@ minetest.register_node("australia:staghorn_coral_blue", {
},
})
-- Acropora cervicornis: Staghorn Coral (yellow)
minetest.register_node("australia:staghorn_coral_yellow", {
description = "Acropora cervicornis: Staghorn Coral",
drawtype = "plantlike",
waving = 0,
visual_scale = 1.0,
tiles = {"aus_staghorn_coral_yellow.png"},
inventory_image = "aus_staghorn_coral_yellow.png",
wield_image = "aus_staghorn_coral_yellow.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
climable = true,
buildable_to = false,
drowning = 1,
is_ground_content = true,
groups = {cracky = 3, coral = 1, stone = 1, attached_node = 1, sea = 1},
sounds = default.node_sound_stone_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5},
},
})
--
-- Liquids
@ -958,7 +1209,7 @@ minetest.register_node("australia:muddy_river_water_source", {
backface_culling = false,
},
},
alpha = 160,
alpha = 224,
paramtype = "light",
walkable = false,
pointable = false,
@ -971,9 +1222,9 @@ minetest.register_node("australia:muddy_river_water_source", {
liquid_alternative_flowing = "australia:muddy_river_water_flowing",
liquid_alternative_source = "australia:muddy_river_water_source",
liquid_viscosity = 1,
liquid_renewable = false,
liquid_range = 2,
post_effect_color = {a = 64, r = 200, g = 150, b = 100},
liquid_renewable = true,
liquid_range = 3,
post_effect_color = {a = 232, r = 92, g = 80, b = 48},
groups = {water = 3, liquid = 3, puts_out_fire = 1},
})
@ -1003,7 +1254,7 @@ minetest.register_node("australia:muddy_river_water_flowing", {
},
},
},
alpha = 160,
alpha = 224,
paramtype = "light",
paramtype2 = "flowingliquid",
walkable = false,
@ -1017,9 +1268,9 @@ minetest.register_node("australia:muddy_river_water_flowing", {
liquid_alternative_flowing = "australia:muddy_river_water_flowing",
liquid_alternative_source = "australia:muddy_river_water_source",
liquid_viscosity = 1,
liquid_renewable = false,
liquid_range = 2,
post_effect_color = {a = 64, r = 200, g = 150, b = 100},
liquid_renewable = true,
liquid_range = 3,
post_effect_color = {a = 232, r = 92, g = 80, b = 48},
groups = {water = 3, liquid = 3, puts_out_fire = 1,
not_in_creative_inventory = 1},
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

BIN
textures/aus_coral_sand.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 B

BIN
textures/aus_kelp_brown.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -48,7 +48,7 @@ local nodes = {
-- Liquids
{"river_water_source", "default:river_water_source"},
{"dirty_river_water_source", "australia:dirty_river_water_source"},
{"muddy_river_water_source", "australia:muddy_river_water_source"},
{"water_source", "default:water_source"},
-- Air and Ignore
@ -61,18 +61,13 @@ local nodes = {
{"diamond", "default:stone_with_diamond"},
{"gold", "default:stone_with_gold"},
{"iron", "default:stone_with_iron"},
}
for _, i in pairs(nodes) do
node[i[1]] = minetest.get_content_id(i[2])
end
local coal_biomes = {"victorian_forests", "great_dividing_range", "eastern_coasts"}
local copper_biomes = {"flinders_lofty", "gulf_of_carpentaria"}
local diamond_biomes = {"kimberley"}
local gold_biomes = {"goldfields_esperence", "victorian_forests"}
local iron_biomes = {"pilbara"}
-- Create a table of biome ids, so I can use the biomemap.
if not aus.biome_ids then
aus.biome_ids = {}
@ -91,9 +86,6 @@ function aus.generate(minp, maxp, seed)
-- The VoxelManipulator, a complicated but speedy method to set many nodes at the same time
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
local heightmap = minetest.get_mapgen_object("heightmap")
-- local heatmap = minetest.get_mapgen_object("heatmap")
local gennotify = minetest.get_mapgen_object("gennotify")
--print(dump(gennotify))
local water_level = 1
local data = vm:get_data() -- data is the original array of content IDs (solely or mostly air)
@ -123,10 +115,13 @@ function aus.generate(minp, maxp, seed)
-- the mapgen algorithm
local index_2d = 0
local write = false
local relight = false
local index_3d, air_count, ground
local index_3d_below, index_3d_above, surround
local biome, sr
local stone_type, stone_depth, n23_val
for x = minp.x, maxp.x do -- for each YZ plane
for z = minp.z, maxp.z do -- for each vertical line in this plane
for z = minp.z, maxp.z do -- for each YZ plane
for x = minp.x, maxp.x do -- for each vertical line in this plane
index_2d = index_2d + 1
local index_3d = area:index(x, maxp.y, z) -- index of the data array, matching the position {x, y, z}
@ -136,52 +131,34 @@ function aus.generate(minp, maxp, seed)
for y = maxp.y, minp.y, -1 do -- for each node in vertical line
local index_3d_below = index_3d - ystride
local index_3d_above = index_3d + ystride
local surround = true
-- Determine if a plant/dirt block can be placed without showing.
-- Avoid the edges of the chunk, just to make things easier.
if y < maxp.y and x > minp.x and x < maxp.x and z > minp.z and z < maxp.z and (data[index_3d] == node["sand"] or data[index_3d] == node["dirt"]) then
if data[index_3d_above] == node["river_water_source"] or data[index_3d_above] == node["water_source"] then
if data[index_3d_above] == node["river_water_source"] or data[index_3d_above] == node["muddy_river_water_source"] or data[index_3d_above] == node["water_source"] then
-- Check to make sure that a plant root is fully surrounded.
-- This is due to the kludgy way you have to make water plants
-- in minetest, to avoid bubbles.
for x1 = -1,1,2 do
local n = data[index_3d+x1]
if n == node["river_water_source"] or n == node["water_source"] or n == node["air"] then
if n == node["river_water_source"] or n == node["muddy_river_water_source"] or n == node["water_source"] or n == node["air"] then
surround = false
end
end
for z1 = -zstride,zstride,2*zstride do
local n = data[index_3d+z1]
if n == node["river_water_source"] or n == node["water_source"] or n == node["air"] then
if n == node["river_water_source"] or n == node["muddy_river_water_source"] or n == node["water_source"] or n == node["air"] then
surround = false
end
end
end
end
-- Extra resources in ground per biome.
if y < ground and (data[index_3d] == node["air"] or data[index_3d] == node["river_water_source"] or data[index_3d] == node["dirty_river_water_source"] or data[index_3d] == node["water_source"]) then
relight = true
if y < ground and (data[index_3d] == node["air"] or data[index_3d] == node["river_water_source"] or data[index_3d] == node["muddy_river_water_source"] or data[index_3d] == node["water_source"]) then
local biome = aus.biome_ids[biomemap[index_2d]]
local stone_type = node["stone"]
local stone_depth = 1
local n23_val = n23[index_2d] + n22[index_2d]
if table.contains(coal_biomes, biome) and n23_val < 0.1 then
stone_type = node["coalblock"]
stone_depth = 2
elseif table.contains(copper_biomes, biome) and n23_val < 0.4 then
stone_type = node["copper"]
elseif table.contains(diamond_biomes, biome) and n23_val < 0.2 then
stone_type = node["diamond"]
elseif table.contains(gold_biomes, biome) and n23_val < 0.3 then
stone_type = node["gold"]
elseif table.contains(iron_biomes, biome) and n23_val < 0.6 then
stone_type = node["iron"]
else
stone_type = node["stone"]
end
-- Change stone per biome.
if data[index_3d_below] == node["stone"] then
@ -219,16 +196,8 @@ function aus.generate(minp, maxp, seed)
end
if write then
-- probably not necessary
if relight then
--vm:set_lighting({day = 10, night = 10})
end
-- This seems to be necessary to avoid lighting problems.
vm:calc_lighting()
-- probably not necessary
--vm:update_liquids()
end
if write then
@ -245,5 +214,4 @@ end
-- Call the mapgen function aus.generate on mapgen.
-- (located in voxel.lua)
minetest.register_on_generated(aus.generate)