mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-03-25 14:21:55 +02:00
* Fixed bug where Bonus Chests would spawn again when loading back into it. Fixes #982 Added a check for if the world is new. Meaning no more additional chests if the world is loaded up again. * Replace NULL with nullptr for chest check
This commit is contained in:
@@ -23,6 +23,9 @@ bool BonusChestFeature::place(Level *level, Random *random, int x, int y, int z)
|
||||
// any surrounding torches where appropriate.
|
||||
|
||||
bool BonusChestFeature::place(Level *level, Random *random, int x, int y, int z, bool force)
|
||||
{
|
||||
//Will only spawn a bonus chest if the world is new and has never been saved.
|
||||
if (level->isNew)
|
||||
{
|
||||
if( !force )
|
||||
{
|
||||
@@ -85,4 +88,6 @@ bool BonusChestFeature::place(Level *level, Random *random, int x, int y, int z,
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user