Replace NULL with nullptr for chest check

This commit is contained in:
eh-K 2026-03-09 06:15:37 -05:00 committed by GitHub
parent ee3a5e8393
commit 3cf431e195
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -62,7 +62,7 @@ bool BonusChestFeature::place(Level *level, Random *random, int x, int y, int z,
{ {
level->setTileAndData(x2, y2, z2, Tile::chest_Id, 0, Tile::UPDATE_CLIENTS); level->setTileAndData(x2, y2, z2, Tile::chest_Id, 0, Tile::UPDATE_CLIENTS);
shared_ptr<ChestTileEntity> chest = dynamic_pointer_cast<ChestTileEntity>(level->getTileEntity(x2, y2, z2)); shared_ptr<ChestTileEntity> chest = dynamic_pointer_cast<ChestTileEntity>(level->getTileEntity(x2, y2, z2));
if (chest != NULL) if (chest != nullptr)
{ {
WeighedTreasure::addChestItems(random, treasureList, chest, numRolls); WeighedTreasure::addChestItems(random, treasureList, chest, numRolls);
chest->isBonusChest = true; // 4J added chest->isBonusChest = true; // 4J added