mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-07-15 18:58:12 +00:00
refactor: make Tile::getAABB return optional<AABB>
This commit is contained in:
@@ -91,10 +91,9 @@ AABB* DoorTile::getTileAABB(Level* level, int x, int y, int z) {
|
||||
return retval;
|
||||
}
|
||||
|
||||
AABB* DoorTile::getAABB(Level* level, int x, int y, int z) {
|
||||
std::optional<AABB> DoorTile::getAABB(Level* level, int x, int y, int z) {
|
||||
updateShape(level, x, y, z);
|
||||
AABB* retval = Tile::getAABB(level, x, y, z);
|
||||
return retval;
|
||||
return Tile::getAABB(level, x, y, z);
|
||||
}
|
||||
|
||||
void DoorTile::updateShape(
|
||||
@@ -307,4 +306,4 @@ void DoorTile::playerWillDestroy(Level* level, int x, int y, int z, int data,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user