X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FBlockLookup.hpp;h=e861b249efd628b8c4dc83b74ef792e2fab97cd3;hb=ee77b8cf96525f0db007b170b6e96f055cba4d33;hp=122b3c76f7e76374eaf50aa264513d54564b43c6;hpb=68f47f2824989b21ff9a480a367a6d0a41804f41;p=blank.git diff --git a/src/world/BlockLookup.hpp b/src/world/BlockLookup.hpp index 122b3c7..e861b24 100644 --- a/src/world/BlockLookup.hpp +++ b/src/world/BlockLookup.hpp @@ -22,6 +22,7 @@ public: // only valid if lookup was successful Chunk &GetChunk() const noexcept { return *chunk; } const Chunk::Pos &GetBlockPos() const noexcept { return pos; } + Block::Pos GetBlockCoords() const noexcept { return Chunk::ToCoords(pos); } const Block &GetBlock() const noexcept { return GetChunk().BlockAt(GetBlockPos()); } const BlockType &GetType() const noexcept { return GetChunk().Type(GetBlock()); } int GetLight() const noexcept { return GetChunk().GetLight(GetBlockPos()); }