Skip to content

First look at #8#9

Draft
kostamax27 wants to merge 2 commits intoNhanAZ-Libraries:masterfrom
kostamax27:master
Draft

First look at #8#9
kostamax27 wants to merge 2 commits intoNhanAZ-Libraries:masterfrom
kostamax27:master

Conversation

@kostamax27
Copy link
Contributor

@kostamax27 kostamax27 commented Feb 12, 2026

Problems

At the moment, there are several issues that do not yet have a clear solution:

  1. Do we actually need multiple instances of BlockDataChunkListener, one per world?
  2. There is an issue with BlockDataChunkListener: if a developer tries to update a block (for example, set the same block to its current position), the listener removes the associated data.
  3. ...

Tests

This feature has not been tested yet.

@kostamax27 kostamax27 marked this pull request as draft February 12, 2026 14:52
@NhanAZ NhanAZ added the enhancement New feature or request label Feb 12, 2026
@NhanAZ
Copy link
Member

NhanAZ commented Feb 12, 2026

Thanks for taking a first look at a ChunkListener‑based approach, this is very interesting work.

As I mentioned in #8, this library will stay event‑based and focused on being simple and beginner‑friendly, so I’m not planning to adopt a more complex chunk‑tracking system in the main API.

I’d like to keep this PR as an experimental idea for now rather than merge it, and anyone interested in more advanced block tracking can also look at Cosmoverse’s BlockData for a more powerful alternative.

@kostamax27
Copy link
Contributor Author

Thanks for taking a first look at a ChunkListener‑based approach, this is very interesting work.

As I mentioned in #8, this library will stay event‑based and focused on being simple and beginner‑friendly, so I’m not planning to adopt a more complex chunk‑tracking system in the main API.

I’d like to keep this PR as an experimental idea for now rather than merge it, and anyone interested in more advanced block tracking can also look at Cosmoverse’s BlockData for a more powerful alternative.

Yeah, I'll just leave this here - maybe someone will be interested and share their ideas or suggestions.

  - Change BlockDataWorld::get() to only cache non-null values
  - Prevent unbounded growth of null entries when getAt() is called frequently on empty blocks
  - Clarify cache phpdoc to reflect the new behavior
  - Closes NhanAZ-Libraries#10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants