diff options
author | Mattes D <github@xoft.cz> | 2023-05-26 12:56:07 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2023-05-26 23:00:17 +0200 |
commit | c5412becd1243536807f1f1af4ef4d40bedd438f (patch) | |
tree | 962d9ca6e6206eca71717f569f93fb49c3e01ee4 /src/ChunkDef.h | |
parent | Added a warning if the webadmin is enabled without any users. (#5499) (diff) | |
download | cuberite-c5412becd1243536807f1f1af4ef4d40bedd438f.tar cuberite-c5412becd1243536807f1f1af4ef4d40bedd438f.tar.gz cuberite-c5412becd1243536807f1f1af4ef4d40bedd438f.tar.bz2 cuberite-c5412becd1243536807f1f1af4ef4d40bedd438f.tar.lz cuberite-c5412becd1243536807f1f1af4ef4d40bedd438f.tar.xz cuberite-c5412becd1243536807f1f1af4ef4d40bedd438f.tar.zst cuberite-c5412becd1243536807f1f1af4ef4d40bedd438f.zip |
Diffstat (limited to 'src/ChunkDef.h')
-rw-r--r-- | src/ChunkDef.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ChunkDef.h b/src/ChunkDef.h index ea2a3a06d..7d99ca6e8 100644 --- a/src/ChunkDef.h +++ b/src/ChunkDef.h @@ -52,6 +52,7 @@ typedef unsigned char HEIGHTTYPE; +/** Wraps the chunk coords into a single structure. */ class cChunkCoords { public: @@ -98,6 +99,22 @@ public: +/** Implements custom fmtlib formatting for cChunkCoords. */ +namespace fmt +{ + template <> struct formatter<cChunkCoords>: formatter<int> + { + auto format(cChunkCoords a_Coords, format_context & a_Ctx) + { + return format_to(a_Ctx.out(), "[{}, {}]", a_Coords.m_ChunkX, a_Coords.m_ChunkZ); + } + }; +} + + + + + /** Constants used throughout the code, useful typedefs and utility functions */ class cChunkDef { |