summaryrefslogtreecommitdiffstats
path: root/src/Chunk.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-09-22 22:21:47 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-09-25 15:51:16 +0200
commit4519469547c0f8befe74e3e80a94efb0e076ba34 (patch)
treeb2e020631d1fbbfe0225d1c6a6a88dbc6eab124b /src/Chunk.h
parentGrass spread: check chunk & light validity correctly (diff)
downloadcuberite-4519469547c0f8befe74e3e80a94efb0e076ba34.tar
cuberite-4519469547c0f8befe74e3e80a94efb0e076ba34.tar.gz
cuberite-4519469547c0f8befe74e3e80a94efb0e076ba34.tar.bz2
cuberite-4519469547c0f8befe74e3e80a94efb0e076ba34.tar.lz
cuberite-4519469547c0f8befe74e3e80a94efb0e076ba34.tar.xz
cuberite-4519469547c0f8befe74e3e80a94efb0e076ba34.tar.zst
cuberite-4519469547c0f8befe74e3e80a94efb0e076ba34.zip
Diffstat (limited to 'src/Chunk.h')
-rw-r--r--src/Chunk.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Chunk.h b/src/Chunk.h
index 8aa73cde5..04f305f69 100644
--- a/src/Chunk.h
+++ b/src/Chunk.h
@@ -90,6 +90,11 @@ public:
/** Returns true if the chunk could have been unloaded if it weren't dirty */
bool CanUnloadAfterSaving(void) const;
+ /** Called when the chunkmap unloads unused chunks.
+ Notifies contained entities that they are being unloaded and should for example, broadcast a destroy packet.
+ Not called during server shutdown; such cleanup during shutdown is unnecessary. */
+ void OnUnload();
+
bool IsLightValid(void) const {return m_IsLightValid; }
/*