diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-09-22 22:21:47 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-09-25 15:51:16 +0200 |
commit | 4519469547c0f8befe74e3e80a94efb0e076ba34 (patch) | |
tree | b2e020631d1fbbfe0225d1c6a6a88dbc6eab124b /src/Chunk.h | |
parent | Grass spread: check chunk & light validity correctly (diff) | |
download | cuberite-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.h | 5 |
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; } /* |