summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2017-06-14 17:35:34 +0200
committerLukas Pioch <lukas@zgow.de>2017-06-16 07:07:02 +0200
commitf4de38af80cac5bdf6dc51dbbbbf86451cc2acc3 (patch)
tree4e418ba9a31e4d1d4bcac6c0adb468ac32636569 /src/World.cpp
parentEntity: Replaced a mutexed counter with a std::atomic. (#3773) (diff)
downloadcuberite-f4de38af80cac5bdf6dc51dbbbbf86451cc2acc3.tar
cuberite-f4de38af80cac5bdf6dc51dbbbbf86451cc2acc3.tar.gz
cuberite-f4de38af80cac5bdf6dc51dbbbbf86451cc2acc3.tar.bz2
cuberite-f4de38af80cac5bdf6dc51dbbbbf86451cc2acc3.tar.lz
cuberite-f4de38af80cac5bdf6dc51dbbbbf86451cc2acc3.tar.xz
cuberite-f4de38af80cac5bdf6dc51dbbbbf86451cc2acc3.tar.zst
cuberite-f4de38af80cac5bdf6dc51dbbbbf86451cc2acc3.zip
Diffstat (limited to 'src/World.cpp')
-rw-r--r--src/World.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/World.cpp b/src/World.cpp
index 0fa719670..9351dd0de 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -1733,7 +1733,7 @@ bool cWorld::GrowRipePlant(int a_BlockX, int a_BlockY, int a_BlockZ, bool a_IsBy
}
else
{
- BlockMeta += random.RandInt(2, 5);
+ BlockMeta += random.RandInt<NIBBLETYPE>(2, 5);
BlockMeta = std::min(BlockMeta, static_cast<NIBBLETYPE>(7));
}
FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, BlockType, BlockMeta);
@@ -1768,7 +1768,7 @@ bool cWorld::GrowRipePlant(int a_BlockX, int a_BlockY, int a_BlockZ, bool a_IsBy
}
else
{
- BlockMeta += random.RandInt(2, 5);
+ BlockMeta += random.RandInt<NIBBLETYPE>(2, 5);
BlockMeta = std::min(BlockMeta, static_cast<NIBBLETYPE>(7));
}
FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, BlockType, BlockMeta);
@@ -1791,7 +1791,7 @@ bool cWorld::GrowRipePlant(int a_BlockX, int a_BlockY, int a_BlockZ, bool a_IsBy
}
else
{
- BlockMeta += random.RandInt(2, 5);
+ BlockMeta += random.RandInt<NIBBLETYPE>(2, 5);
BlockMeta = std::min(BlockMeta, static_cast<NIBBLETYPE>(7));
}
FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, BlockType, BlockMeta);
@@ -1823,7 +1823,7 @@ bool cWorld::GrowRipePlant(int a_BlockX, int a_BlockY, int a_BlockZ, bool a_IsBy
}
else
{
- BlockMeta += random.RandInt(2, 5);
+ BlockMeta += random.RandInt<NIBBLETYPE>(2, 5);
BlockMeta = std::min(BlockMeta, static_cast<NIBBLETYPE>(7));
}
FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, BlockType, BlockMeta);
@@ -1846,7 +1846,7 @@ bool cWorld::GrowRipePlant(int a_BlockX, int a_BlockY, int a_BlockZ, bool a_IsBy
}
else
{
- BlockMeta += random.RandInt(2, 5);
+ BlockMeta += random.RandInt<NIBBLETYPE>(2, 5);
BlockMeta = std::min(BlockMeta, static_cast<NIBBLETYPE>(7));
}
FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, BlockType, BlockMeta);