-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Update docs for capability rework #34
Conversation
Deploying with Cloudflare Pages
|
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.
Bunch of general questions because my lack of understanding of the underlying system. I have avoided commenting on syntax changes as much as possible as per your request. They will be addressed at a later point in time since they don't affect the user experience.
docs/datastorage/attachments.md
Outdated
|
||
To use the system, you need to register an `AttachmentType`. | ||
The attachment type contains: | ||
- a default value supplier to create the instance when the data is first accessed, or to compare stacks that have the data and stacks that don't have it; |
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.
Is this only true for stacks, or does it apply to any attached object?
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.
The default instance is for any attachment holder object (BE, chunk, entity, stack). Only stacks are comparable so that remark only applies to them, but admittedly we could probably omit it.
Providers are asked for a capability in the order that they are registered. | ||
Should you want to run before a provider that NeoForge already registers for one of your objects, | ||
register your `RegisterCapabilitiesEvent` handler with a higher priority. |
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.
When would this matter?
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.
For example if you have a LivingEntity
and you want to register a more specific IItemHandler
than the one NeoForge already registers.
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.
Good enough, any formatting errors can be addressed in a future commit. @XFactHD and @Matyrobbrt, will give you until whenever Thursday to do any additional reviews or comments.
Looks good to me overall, just a few minor points
Other than that: |
Mostly adapted from the blog post, but keeping some of the old content where that made sense.
Beyond the two main changed files, I also fixed references to capabilities elsewhere. Some of the other pages will still need an update, but at least everything related to caps should be clean now.
Preview URL: https://pr-34.neoforged-docs-previews.pages.dev