fix: nether crash

This commit is contained in:
Fireblade
2026-06-21 16:18:46 -04:00
parent fbf2e60b18
commit 24730e576d
2 changed files with 13 additions and 0 deletions
+6
View File
@@ -24,6 +24,12 @@ bool BonusChestFeature::place(Level *level, Random *random, int x, int y, int z)
bool BonusChestFeature::place(Level *level, Random *random, int x, int y, int z, bool force)
{
// check if level is corrupted first
if (level == nullptr || random == nullptr)
{
return false;
}
if (!level->isNew) return false;
//Will only spawn a bonus chest if the world is new and has never been saved.
if (level->isNew)
{