diff options
author | KingCol13 <48412633+KingCol13@users.noreply.github.com> | 2021-07-09 19:45:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-09 19:45:53 +0200 |
commit | 68776c4d5919638b3cecccd083155cd58ccac573 (patch) | |
tree | 8b1d508953c3f3f260ad1b33c40e7ef9674ff0d0 /src/Generating/Trees.cpp | |
parent | ProtoProxy: encrypt in-place (diff) | |
download | cuberite-68776c4d5919638b3cecccd083155cd58ccac573.tar cuberite-68776c4d5919638b3cecccd083155cd58ccac573.tar.gz cuberite-68776c4d5919638b3cecccd083155cd58ccac573.tar.bz2 cuberite-68776c4d5919638b3cecccd083155cd58ccac573.tar.lz cuberite-68776c4d5919638b3cecccd083155cd58ccac573.tar.xz cuberite-68776c4d5919638b3cecccd083155cd58ccac573.tar.zst cuberite-68776c4d5919638b3cecccd083155cd58ccac573.zip |
Diffstat (limited to 'src/Generating/Trees.cpp')
-rw-r--r-- | src/Generating/Trees.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Generating/Trees.cpp b/src/Generating/Trees.cpp index 28f0da6ce..53017ce06 100644 --- a/src/Generating/Trees.cpp +++ b/src/Generating/Trees.cpp @@ -672,7 +672,7 @@ NIBBLETYPE GetLogMetaFromDirection(NIBBLETYPE a_BlockMeta, Vector3d a_Direction) void GetBirchTreeImage(Vector3i a_BlockPos, cNoise & a_Noise, int a_Seq, sSetBlockVector & a_LogBlocks, sSetBlockVector & a_OtherBlocks) { - HEIGHTTYPE Height = 5 + (a_Noise.IntNoise3DInt(a_BlockPos.addedX(64 * a_Seq)) % 3); + HEIGHTTYPE Height = 5 + static_cast<HEIGHTTYPE>(a_Noise.IntNoise3DInt(a_BlockPos.addedX(64 * a_Seq)) % 3); // Prealloc, so that we don't realloc too often later: a_LogBlocks.reserve(static_cast<size_t>(Height)); @@ -839,7 +839,7 @@ void GetDarkoakTreeImage(Vector3i a_BlockPos, cNoise & a_Noise, int a_Seq, sSetB void GetTallBirchTreeImage(Vector3i a_BlockPos, cNoise & a_Noise, int a_Seq, sSetBlockVector & a_LogBlocks, sSetBlockVector & a_OtherBlocks) { - HEIGHTTYPE Height = 9 + (a_Noise.IntNoise3DInt(a_BlockPos.addedX(64 * a_Seq)) % 3); + HEIGHTTYPE Height = 9 + static_cast<HEIGHTTYPE>(a_Noise.IntNoise3DInt(a_BlockPos.addedX(64 * a_Seq)) % 3); // Prealloc, so that we don't realloc too often later: a_LogBlocks.reserve(static_cast<size_t>(Height)); @@ -1078,7 +1078,7 @@ void GetLargeSpruceTreeImage(Vector3i a_BlockPos, cNoise & a_Noise, int a_Seq, s for (int i = 0; i < LeavesRingCount; i++) { - unsigned int Val = (a_Noise.IntNoise3DInt(a_BlockPos.addedXZ(32 * a_Seq, 32 * i)) / 23) % 8; + unsigned int Val = static_cast<unsigned int>(a_Noise.IntNoise3DInt(a_BlockPos.addedXZ(32 * a_Seq, 32 * i)) / 23) % 8; if ((Val < 4) && RingRadius < 3) { RingRadius++; |