-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Demonstrate prismarine-world entity storage integration #3737
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
base: master
Are you sure you want to change the base?
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 <[email protected]>
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 <[email protected]>
WIP, not good yet |
@@ -919,7 +941,14 @@ function inject (bot) { | |||
} | |||
|
|||
function fetchEntity (id) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think entity handling could be completely refactored, fetchEntity may not be needed if the relevant entity API storage is in p-world
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes agreed
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_destroy
packetsTesting
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.entities
usage continues to work🤖 Generated with Claude Code