summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2023-05-26 12:56:07 +0200
committerMattes D <github@xoft.cz>2023-05-26 23:00:17 +0200
commitc5412becd1243536807f1f1af4ef4d40bedd438f (patch)
tree962d9ca6e6206eca71717f569f93fb49c3e01ee4 /src
parentAdded a warning if the webadmin is enabled without any users. (#5499) (diff)
downloadcuberite-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')
-rw-r--r--src/ChunkDef.h17
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
{