summaryrefslogtreecommitdiffstats
path: root/src/Chunk.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-01-05 03:13:02 +0100
committerTiger Wang <ziwei.tiger@outlook.com>2021-01-11 17:39:56 +0100
commit9328afe65c72b29f5cedbf1897ea8559f6b2c42f (patch)
tree92d9490d062009278ed8d78f8981014e88ba8f05 /src/Chunk.h
parentzlib -> libdeflate (#5085) (diff)
downloadcuberite-9328afe65c72b29f5cedbf1897ea8559f6b2c42f.tar
cuberite-9328afe65c72b29f5cedbf1897ea8559f6b2c42f.tar.gz
cuberite-9328afe65c72b29f5cedbf1897ea8559f6b2c42f.tar.bz2
cuberite-9328afe65c72b29f5cedbf1897ea8559f6b2c42f.tar.lz
cuberite-9328afe65c72b29f5cedbf1897ea8559f6b2c42f.tar.xz
cuberite-9328afe65c72b29f5cedbf1897ea8559f6b2c42f.tar.zst
cuberite-9328afe65c72b29f5cedbf1897ea8559f6b2c42f.zip
Diffstat (limited to 'src/Chunk.h')
-rw-r--r--src/Chunk.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Chunk.h b/src/Chunk.h
index 28f7b0bec..d0283f3e4 100644
--- a/src/Chunk.h
+++ b/src/Chunk.h
@@ -221,7 +221,17 @@ public:
/** Sets the sign text. Returns true if successful. Also sends update packets to all clients in the chunk */
bool SetSignLines(int a_RelX, int a_RelY, int a_RelZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4);
- int GetHeight( int a_X, int a_Z);
+ int GetHeight( int a_X, int a_Z) const;
+
+ /** Returns true if it is sunny at the specified location. This takes into account biomes. */
+ bool IsWeatherSunnyAt(int a_RelX, int a_RelZ) const;
+
+ /** Returns true if it is raining or storming at the specified location, taking into account biomes. */
+ bool IsWeatherWetAt(int a_RelX, int a_RelZ) const;
+
+ /** Returns true if it is raining or storming at the specified location,
+ and the rain reaches (the bottom of) the specified block position. */
+ bool IsWeatherWetAt(Vector3i a_Position) const;
void SendBlockTo(int a_RelX, int a_RelY, int a_RelZ, cClientHandle * a_Client);