summaryrefslogtreecommitdiffstats
path: root/src/Generating/PieceModifier.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2022-01-13 21:51:47 +0100
committerAlexander Harkness <me@bearbin.net>2022-01-14 20:43:29 +0100
commit903bcfc61fd031985e55a604293f85c2597a8320 (patch)
treea03926be8f4ba7aef37a1e349a26e541b95c3c0c /src/Generating/PieceModifier.cpp
parentso much big brain time - it hurts (diff)
downloadcuberite-903bcfc61fd031985e55a604293f85c2597a8320.tar
cuberite-903bcfc61fd031985e55a604293f85c2597a8320.tar.gz
cuberite-903bcfc61fd031985e55a604293f85c2597a8320.tar.bz2
cuberite-903bcfc61fd031985e55a604293f85c2597a8320.tar.lz
cuberite-903bcfc61fd031985e55a604293f85c2597a8320.tar.xz
cuberite-903bcfc61fd031985e55a604293f85c2597a8320.tar.zst
cuberite-903bcfc61fd031985e55a604293f85c2597a8320.zip
Diffstat (limited to '')
-rw-r--r--src/Generating/PieceModifier.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Generating/PieceModifier.cpp b/src/Generating/PieceModifier.cpp
index 922e68e40..d81487bf8 100644
--- a/src/Generating/PieceModifier.cpp
+++ b/src/Generating/PieceModifier.cpp
@@ -250,7 +250,7 @@ public:
// Per block meta params
if (blockToRnd.m_MinMeta < blockToRnd.m_MaxMeta)
{
- char BlockMetaRnd = static_cast<char>(std::clamp<int>(static_cast<int>(PieceNoise.IntNoise2DInRange(a_PieceRot*2, static_cast<int>(i), static_cast<float>(blockToRnd.m_MinNoiseMeta), static_cast<float>(blockToRnd.m_MaxNoiseMeta))), blockToRnd.m_MinMeta, blockToRnd.m_MaxMeta));
+ int BlockMetaRnd = std::clamp(static_cast<int>(PieceNoise.IntNoise2DInRange(a_PieceRot*2, static_cast<int>(i), static_cast<float>(blockToRnd.m_MinNoiseMeta), static_cast<float>(blockToRnd.m_MaxNoiseMeta))), blockToRnd.m_MinMeta, blockToRnd.m_MaxMeta);
BlockMetas[i] = static_cast<NIBBLETYPE>(BlockMetaRnd);
}
else if ((blockToRnd.m_MaxMeta > -1) && (blockToRnd.m_MaxMeta == blockToRnd.m_MinMeta))
@@ -265,7 +265,7 @@ public:
// All blocks meta params
if (m_MaxMeta > m_MinMeta)
{
- char BlockMetaRnd = static_cast<char>(std::clamp<int>(static_cast<int>(PieceNoise.IntNoise2DInRange(a_PieceRot * 2, static_cast<int>(i), static_cast<float>(m_MinNoiseMeta), static_cast<float>(m_MaxNoiseMeta))), m_MinMeta, m_MaxMeta));
+ int BlockMetaRnd = std::clamp(static_cast<int>(PieceNoise.IntNoise2DInRange(a_PieceRot * 2, static_cast<int>(i), static_cast<float>(m_MinNoiseMeta), static_cast<float>(m_MaxNoiseMeta))), m_MinMeta, m_MaxMeta);
BlockMetas[i] = static_cast<NIBBLETYPE>(BlockMetaRnd);
}
else if ((m_MaxMeta > -1) && (m_MaxMeta == m_MinMeta))