Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
illuna-minetest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
illuna-minetest
Commits
26cad481
Commit
26cad481
authored
12 years ago
by
kwolekr
Browse files
Options
Downloads
Patches
Plain Diff
Vary ore sheet y position by noise
parent
8d13967a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/lua_api.txt
+6
-3
6 additions, 3 deletions
doc/lua_api.txt
src/mapgen.cpp
+3
-3
3 additions, 3 deletions
src/mapgen.cpp
with
9 additions
and
6 deletions
doc/lua_api.txt
+
6
−
3
View file @
26cad481
...
@@ -383,9 +383,12 @@ All default ores are of the uniformly-distributed scatter type.
...
@@ -383,9 +383,12 @@ All default ores are of the uniformly-distributed scatter type.
that point is greater than the noise_threshhold, giving the ability to create a non-equal
that point is greater than the noise_threshhold, giving the ability to create a non-equal
distribution of ore.
distribution of ore.
- sheet
- sheet
Creates a sheet of ore in a blob shape according to the 2d perlin noise described by
Creates a sheet of ore in a blob shape according to the 2d perlin noise described by noise_params.
the noise_params structure. The height of the blob is randomly scattered, with a maximum
The relative height of the sheet can be controlled by the same perlin noise as well, by specifying
height of clust_size. Here, clust_scarcity and clust_num_ores are ignored.
a non-zero 'scale' parameter in noise_params. IMPORTANT: The noise is not transformed by offset or
scale when comparing against the noise threshhold, but scale is used to determine relative height.
The height of the blob is randomly scattered, with a maximum height of clust_size.
clust_scarcity and clust_num_ores are ignored.
This is essentially an improved version of the so-called "stratus" ore seen in some unofficial mods.
This is essentially an improved version of the so-called "stratus" ore seen in some unofficial mods.
- claylike - NOT YET IMPLEMENTED
- claylike - NOT YET IMPLEMENTED
Places ore if there are no more than clust_scarcity number of specified nodes within a Von Neumann
Places ore if there are no more than clust_scarcity number of specified nodes within a Von Neumann
...
...
This diff is collapsed.
Click to expand it.
src/mapgen.cpp
+
3
−
3
View file @
26cad481
...
@@ -165,12 +165,12 @@ void OreSheet::generate(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax) {
...
@@ -165,12 +165,12 @@ void OreSheet::generate(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax) {
int
index
=
0
;
int
index
=
0
;
for
(
int
z
=
z0
;
z
!=
z1
;
z
++
)
for
(
int
z
=
z0
;
z
!=
z1
;
z
++
)
for
(
int
x
=
x0
;
x
!=
x1
;
x
++
)
{
for
(
int
x
=
x0
;
x
!=
x1
;
x
++
)
{
float
noiseval
=
noise
->
result
[
index
++
];
if
(
noise
->
result
[
index
++
]
<
nthresh
)
if
(
noise
val
<
nthresh
)
continue
;
continue
;
int
height
=
max_height
*
(
1.
/
pr
.
range
(
1
,
3
));
int
height
=
max_height
*
(
1.
/
pr
.
range
(
1
,
3
));
int
y0
=
y_start
+
pr
.
range
(
1
,
3
)
-
1
;
int
y0
=
y_start
+
np
->
scale
*
noiseval
;
//
pr.range(1, 3) - 1;
int
y1
=
y0
+
height
;
int
y1
=
y0
+
height
;
for
(
int
y
=
y0
;
y
!=
y1
;
y
++
)
{
for
(
int
y
=
y0
;
y
!=
y1
;
y
++
)
{
u32
i
=
vm
->
m_area
.
index
(
x
,
y
,
z
);
u32
i
=
vm
->
m_area
.
index
(
x
,
y
,
z
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment