diff options
author | 12xx12 <12xx12100@gmail.com> | 2020-08-09 23:50:24 +0200 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2020-08-10 00:05:13 +0200 |
commit | ec3de19c4e0df620cba1d10036fcd472a4a5dc35 (patch) | |
tree | 9587a34c0076a9ab043bc0e0af89bf3e404e7662 | |
parent | Fix enderchest placement rotation (diff) | |
download | cuberite-ec3de19c4e0df620cba1d10036fcd472a4a5dc35.tar cuberite-ec3de19c4e0df620cba1d10036fcd472a4a5dc35.tar.gz cuberite-ec3de19c4e0df620cba1d10036fcd472a4a5dc35.tar.bz2 cuberite-ec3de19c4e0df620cba1d10036fcd472a4a5dc35.tar.lz cuberite-ec3de19c4e0df620cba1d10036fcd472a4a5dc35.tar.xz cuberite-ec3de19c4e0df620cba1d10036fcd472a4a5dc35.tar.zst cuberite-ec3de19c4e0df620cba1d10036fcd472a4a5dc35.zip |
-rw-r--r-- | Server/Plugins/APIDump/APIDesc.lua | 2 | ||||
-rw-r--r-- | src/BiomeDef.h | 2 | ||||
-rw-r--r-- | src/Generating/FinishGen.cpp | 10 |
3 files changed, 3 insertions, 11 deletions
diff --git a/Server/Plugins/APIDump/APIDesc.lua b/Server/Plugins/APIDump/APIDesc.lua index 2146a8353..dd88eb7c5 100644 --- a/Server/Plugins/APIDump/APIDesc.lua +++ b/Server/Plugins/APIDump/APIDesc.lua @@ -13645,7 +13645,7 @@ end Type = "boolean", }, }, - Notes = "Returns if the biome is a mountain type biome. So mutations of the extreme hills biome" + Notes = "Returns true if the biome is mountainous (mutations of the extreme hills biome)." }, IsValidBlock = { diff --git a/src/BiomeDef.h b/src/BiomeDef.h index 050c641d3..888e3bb19 100644 --- a/src/BiomeDef.h +++ b/src/BiomeDef.h @@ -151,7 +151,7 @@ extern bool IsBiomeVeryCold(EMCSBiome a_Biome); Doesn't report Very Cold biomes, use IsBiomeVeryCold() for those. */ extern bool IsBiomeCold(EMCSBiome a_Biome); -/** Returns true if the biome is a mountain type */ +/** Returns true if the biome is mountainous (mutations of the extreme hills biome) */ extern bool IsBiomeMountain(EMCSBiome a_Biome); /** Returns the height when a biome when a biome starts snowing. */ diff --git a/src/Generating/FinishGen.cpp b/src/Generating/FinishGen.cpp index 71be3e497..25c53e563 100644 --- a/src/Generating/FinishGen.cpp +++ b/src/Generating/FinishGen.cpp @@ -1783,15 +1783,7 @@ void cFinishGenOreNests::GenerateOre( int BaseY = nestRnd % a_MaxHeight; nestRnd /= a_MaxHeight; // if the NestSize is smaller then four this breaks - int NestSize; - if (a_NestSize >= 4) - { - NestSize = a_NestSize + (nestRnd % (a_NestSize / 4)); // The actual nest size may be up to 1 / 4 larger - } - else - { - NestSize = a_NestSize; - } + int NestSize = a_NestSize + (nestRnd % (std::max(a_NestSize, 4) / 4)); // The actual nest size may be up to 1 / 4 larger int Num = 0; while (Num < NestSize) { |