mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-04 12:16:28 +00:00
refactor: make Tile::getAABB return optional<AABB>
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
#include "Material.h"
|
||||
#include "TileEntities/SignTileEntity.h"
|
||||
#include "SignTile.h"
|
||||
#include "Util/AABB.h"
|
||||
|
||||
#include <optional>
|
||||
|
||||
SignTile::SignTile(int id, eINSTANCEOF clas, bool onGround)
|
||||
: BaseEntityTile(id, Material::wood, false) {
|
||||
@@ -22,7 +25,7 @@ void SignTile::updateDefaultShape() {
|
||||
this->setShape(0.5f - r, 0, 0.5f - r, 0.5f + r, h, 0.5f + r);
|
||||
}
|
||||
|
||||
AABB* SignTile::getAABB(Level* level, int x, int y, int z) { return NULL; }
|
||||
std::optional<AABB> SignTile::getAABB(Level* level, int x, int y, int z) { return std::nullopt; }
|
||||
|
||||
AABB* SignTile::getTileAABB(Level* level, int x, int y, int z) {
|
||||
updateShape(level, x, y, z);
|
||||
@@ -109,4 +112,4 @@ int SignTile::cloneTileId(Level* level, int x, int y, int z) {
|
||||
|
||||
void SignTile::registerIcons(IconRegister* iconRegister) {
|
||||
// None
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user