]> git.localhorst.tv Git - blank.git/blobdiff - src/world/World.hpp
defined and implemented join and part packets
[blank.git] / src / world / World.hpp
index 3981b28e336f9dcf8e28ee84411486d1e23121d2..7d2c2926a1732ee4ea5f663cd112f3de6dd4335a 100644 (file)
@@ -6,6 +6,7 @@
 #include "Generator.hpp"
 
 #include <list>
+#include <string>
 #include <vector>
 #include <glm/glm.hpp>
 
@@ -21,6 +22,7 @@ class World {
 
 public:
        struct Config {
+               std::string name = "default";
                // initial player position
                glm::vec3 spawn = { 0.0f, 0.0f, 0.0f };
                // direction facing towards(!) the light
@@ -37,6 +39,8 @@ public:
 
        World(const BlockTypeRegistry &, const Config &, const WorldSave &);
 
+       const std::string &Name() const noexcept { return config.name; }
+
        /// check if this ray hits a block
        /// depth in the collision is the distance between the ray's
        /// origin and the intersection point