summaryrefslogtreecommitdiffstats
path: root/src/World.hpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2019-01-27 07:25:45 +0100
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2019-01-27 07:25:45 +0100
commit5f010b71415a7dc0337c67cac4666eacdf472751 (patch)
tree03b71ee15e3e2a98d94c236f03361846c28d2d9b /src/World.hpp
parentGameState double-buffering (diff)
downloadAltCraft-5f010b71415a7dc0337c67cac4666eacdf472751.tar
AltCraft-5f010b71415a7dc0337c67cac4666eacdf472751.tar.gz
AltCraft-5f010b71415a7dc0337c67cac4666eacdf472751.tar.bz2
AltCraft-5f010b71415a7dc0337c67cac4666eacdf472751.tar.lz
AltCraft-5f010b71415a7dc0337c67cac4666eacdf472751.tar.xz
AltCraft-5f010b71415a7dc0337c67cac4666eacdf472751.tar.zst
AltCraft-5f010b71415a7dc0337c67cac4666eacdf472751.zip
Diffstat (limited to 'src/World.hpp')
-rw-r--r--src/World.hpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/World.hpp b/src/World.hpp
index 591e7a7..6c9a615 100644
--- a/src/World.hpp
+++ b/src/World.hpp
@@ -48,13 +48,13 @@ public:
void ParseChunkData(std::shared_ptr<PacketUnloadChunk> packet);
- bool isPlayerCollides(double X, double Y, double Z);
+ bool isPlayerCollides(double X, double Y, double Z) const;
- std::vector<Vector> GetSectionsList();
+ std::vector<Vector> GetSectionsList() const;
- const Section &GetSection(Vector sectionPos);
+ const Section &GetSection(Vector sectionPos) const;
- RaycastResult Raycast(glm::vec3 position, glm::vec3 direction);
+ RaycastResult Raycast(glm::vec3 position, glm::vec3 direction) const;
void UpdatePhysics(float delta);
@@ -62,13 +62,15 @@ public:
Entity* GetEntityPtr(unsigned int EntityId);
- std::vector<unsigned int> GetEntitiesList();
+ const Entity& GetEntity(unsigned int EntityId) const;
+
+ std::vector<unsigned int> GetEntitiesList() const;
void AddEntity(Entity entity);
void DeleteEntity(unsigned int EntityId);
- BlockId GetBlockId(Vector pos);
+ BlockId GetBlockId(Vector pos) const;
void SetBlockId(Vector pos, BlockId block);
@@ -76,13 +78,13 @@ public:
void SetBlockSkyLight(Vector pos, unsigned char light);
- Section *GetSectionPtr(Vector position);
+ const Section *GetSectionPtr(Vector position) const;
- unsigned char GetBlockLight(Vector pos);
+ unsigned char GetBlockLight(Vector pos) const;
- unsigned char GetBlockLight(const Vector &blockPos, const Section *section, const Section *xp, const Section *xn, const Section *yp, const Section *yn, const Section *zp, const Section *zn);
+ unsigned char GetBlockLight(const Vector &blockPos, const Section *section, const Section *xp, const Section *xn, const Section *yp, const Section *yn, const Section *zp, const Section *zn) const;
- unsigned char GetBlockSkyLight(Vector pos);
+ unsigned char GetBlockSkyLight(Vector pos) const;
- unsigned char GetBlockSkyLight(const Vector &blockPos, const Section *section, const Section *xp, const Section *xn, const Section *yp, const Section *yn, const Section *zp, const Section *zn);
+ unsigned char GetBlockSkyLight(const Vector &blockPos, const Section *section, const Section *xp, const Section *xn, const Section *yp, const Section *yn, const Section *zp, const Section *zn) const;
}; \ No newline at end of file