mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-04 04:06:28 +00:00
refactor: make Tile::getAABB return optional<AABB>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "../Platform/stdafx.h"
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include "PistonBaseTile.h"
|
||||
#include "PistonMovingTileEntity.h"
|
||||
#include "TileEntities/PistonPieceTileEntity.h"
|
||||
@@ -12,6 +13,8 @@
|
||||
#include "../Level/LevelChunk.h"
|
||||
#include "../Level/Dimensions/Dimension.h"
|
||||
|
||||
#include "Util/AABB.h"
|
||||
|
||||
const std::wstring PistonBaseTile::EDGE_TEX = L"piston_side";
|
||||
const std::wstring PistonBaseTile::PLATFORM_TEX = L"piston_top";
|
||||
const std::wstring PistonBaseTile::PLATFORM_STICKY_TEX = L"piston_top_sticky";
|
||||
@@ -398,7 +401,7 @@ void PistonBaseTile::addAABBs(Level* level, int x, int y, int z, AABB* box,
|
||||
Tile::addAABBs(level, x, y, z, box, boxes, source);
|
||||
}
|
||||
|
||||
AABB* PistonBaseTile::getAABB(Level* level, int x, int y, int z) {
|
||||
std::optional<AABB> PistonBaseTile::getAABB(Level* level, int x, int y, int z) {
|
||||
updateShape(level, x, y, z);
|
||||
return Tile::getAABB(level, x, y, z);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user