forked from Mirrorlandia_minetest/minetest
Ensure ore can fit in OreSheet::generate()
This commit is contained in:
parent
650d706d35
commit
8d13967aa3
@ -142,6 +142,8 @@ void OreSheet::generate(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax) {
|
|||||||
|
|
||||||
int ymin = MYMAX(nmin.Y, height_min);
|
int ymin = MYMAX(nmin.Y, height_min);
|
||||||
int ymax = MYMIN(nmax.Y, height_max);
|
int ymax = MYMIN(nmax.Y, height_max);
|
||||||
|
if (clust_size >= ymax - ymin + 1)
|
||||||
|
return;
|
||||||
|
|
||||||
int x0 = nmin.X;
|
int x0 = nmin.X;
|
||||||
int z0 = nmin.Z;
|
int z0 = nmin.Z;
|
||||||
@ -150,7 +152,6 @@ void OreSheet::generate(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax) {
|
|||||||
int z1 = nmax.Z;
|
int z1 = nmax.Z;
|
||||||
|
|
||||||
int max_height = clust_size;
|
int max_height = clust_size;
|
||||||
|
|
||||||
int y_start = pr.range(ymin, ymax - max_height);
|
int y_start = pr.range(ymin, ymax - max_height);
|
||||||
|
|
||||||
if (!noise) {
|
if (!noise) {
|
||||||
|
Loading…
Reference in New Issue
Block a user