mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-07-17 22:48:21 +00:00
refactor: make Tile::getAABB return optional<AABB>
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "../Headers/net.minecraft.world.h"
|
||||
#include "../Headers/net.minecraft.h"
|
||||
#include "CocoaTile.h"
|
||||
#include "Util/AABB.h"
|
||||
|
||||
const std::wstring CocoaTile::TEXTURE_AGES[] = {L"cocoa_0", L"cocoa_1",
|
||||
L"cocoa_2"};
|
||||
@@ -56,7 +57,7 @@ bool CocoaTile::isCubeShaped() { return false; }
|
||||
|
||||
bool CocoaTile::isSolidRender(bool isServerLevel) { return false; }
|
||||
|
||||
AABB* CocoaTile::getAABB(Level* level, int x, int y, int z) {
|
||||
std::optional<AABB> CocoaTile::getAABB(Level* level, int x, int y, int z) {
|
||||
updateShape(level, x, y, z);
|
||||
return DirectionalTile::getAABB(level, x, y, z);
|
||||
}
|
||||
@@ -157,4 +158,4 @@ void CocoaTile::registerIcons(IconRegister* iconRegister) {
|
||||
for (int i = 0; i < COCOA_TEXTURES_LENGTH; i++) {
|
||||
icons[i] = iconRegister->registerIcon(TEXTURE_AGES[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user