Demonstrate prismarine-world entity storage integration#3737
Open
Demonstrate prismarine-world entity storage integration#3737
Conversation
- Add saveEntityToWorld() and loadEntityFromWorld() methods to bot - Store entities in prismarine-world when created via fetchEntity() - Remove entities from world storage when destroyed - Update dependency to use local prismarine-world with entity storage - All entity tests pass This is a minimal demonstration of using prismarine-world's new entity storage functionality as first step toward consolidating all world state. Related: #334, PrismarineJS/prismarine-world#157 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
- Remove accidentally committed .nyc_output directory - Add .nyc_output/ to .gitignore to prevent future commits
- Update dependency to use GitHub branch reference - Add .nyc_output/ to .gitignore to prevent committing test coverage cache 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Member
Author
|
WIP, not good yet |
extremeheat
reviewed
Sep 8, 2025
| @@ -919,7 +941,14 @@ function inject (bot) { | |||
| } | |||
|
|
|||
| function fetchEntity (id) { | |||
Member
There was a problem hiding this comment.
I think entity handling could be completely refactored, fetchEntity may not be needed if the relevant entity API storage is in p-world
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Demonstrate integration with prismarine-world's new entity storage as first step toward consolidating all world state in prismarine-world.
Changes
saveEntityToWorld()andloadEntityFromWorld()methods to botfetchEntity()entity_destroypacketsTesting
npm run mocha_test -- -g "1\.21\.8.*entity"Context
This is the minimal first step for issue #334 - moving all world state (blocks, entities, inventories) into prismarine-world for better packaging and modularity.
Dependencies: Requires PrismarineJS/prismarine-world#157 to be merged first.
Next steps:
Backwards Compatibility
bot.entitiesusage continues to work🤖 Generated with Claude Code