Some code updates

This commit is contained in:
GabsPuNs
2026-04-09 00:57:05 -04:00
parent fb12bc0860
commit abd2d848cf
59 changed files with 241 additions and 257 deletions

View File

@@ -24,7 +24,7 @@ bool GameMode::destroyBlock(int x, int y, int z, int face)
{
Level *level = minecraft->level;
Tile *oldTile = Tile::tiles[level->getTile(x, y, z)];
if (oldTile == NULL) return false;
if (oldTile == nullptr) return false;
// 4J - Let the rendering side of thing know we are about to destroy the tile, so we can synchronise collision with async render data upates.
minecraft->levelRenderer->destroyedTileManager->destroyingTileAt(level, x, y, z);
@@ -35,7 +35,7 @@ bool GameMode::destroyBlock(int x, int y, int z, int face)
level->getChunkAt(x,z)->recalcHeightmapOnly();
bool changed = level->setTile(x, y, z, 0);
if (oldTile != NULL && changed)
if (oldTile != nullptr && changed)
{
oldTile->destroy(level, x, y, z, data);
}
@@ -95,7 +95,7 @@ void GameMode::adjustPlayer(shared_ptr<Player> player)
// }
// }
//
// if (item == NULL) return false;
// if (item == nullptr) return false;
// return item->useOn(player, level, x, y, z, face, bTestUseOnOnly);
//}