mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-09-27 05:10:52 +00:00
fix: address PR reviewer feedback regarding random_shuffle and queue.empty()
This commit is contained in:
@@ -530,8 +530,7 @@ void Villager::addOffers(int addCount)
|
||||
}
|
||||
|
||||
// shuffle the list to make it more interesting
|
||||
std::random_device rd;
|
||||
std::mt19937 g(rd());
|
||||
static thread_local std::mt19937 g(std::random_device{}());
|
||||
std::shuffle(newOffers->begin(), newOffers->end(), g);
|
||||
|
||||
if (offers == NULL)
|
||||
|
||||
Reference in New Issue
Block a user