Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement findBlock here #154

Open
rom1504 opened this issue Jan 6, 2022 · 6 comments
Open

implement findBlock here #154

rom1504 opened this issue Jan 6, 2022 · 6 comments

Comments

@rom1504
Copy link
Member

rom1504 commented Jan 6, 2022

will be possible when PrismarineJS/mineflayer#334 is done

will enable PrismarineJS/prismarine-world#89

rom1504 added a commit that referenced this issue Jan 6, 2022
#153 or even #154 will be a better fix
rom1504 added a commit that referenced this issue Jan 6, 2022
#153 or even #154 will be a better fix
@Karang
Copy link
Contributor

Karang commented Jan 7, 2022

find block would be better implemented at the world level, since the iterators can cross chunks boundaries (and are already packaged in pworld)

@nickelpro
Copy link
Member

We really need both. Chunks need to be allowed to search themselves (as they best know how, based on palette consideration). Then those facilities can be used by pris-world to do general purpose search

@extremeheat
Copy link
Member

Is anything blocking here or just waiting for an implementation?

@rom1504
Copy link
Member Author

rom1504 commented Jan 7, 2022

PrismarineJS/mineflayer#334 (comment) is blocking because mineflayer findBlock relies on mineflayer blockAt which has features (eg block entities) that pchunk getBlock do not

@extremeheat
Copy link
Member

there are some version handling things in https://github.com/PrismarineJS/mineflayer/blob/04665d1c757a9eaf6433cabd3b2fa62d39d88ad5/lib/plugins/blocks.js#L51 with signs, not sure how this could be implemented inside pchunk since it seems like a mineflayer level abstraction, as pchunk needs to be able to load block entities and also dump them back.

So maybe it would make sense to add some form of block entity abstraction on the mineflayer side and keep the block entity data pure on the pchunk side (as in we just .addBlockEntity(pos, nbt) in pworld which proxies to pchunk)? Or maybe prismarine-block could have a role to play in abstracting some of the block entity features.

@rom1504
Copy link
Member Author

rom1504 commented Jan 8, 2022

#134 (comment) we have a plan for block entities there, we want to move them to pchunk to be able to move the state from mineflayer to pworld/pchunk
about the sign abstraction, we can make any choice about it / change it if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants