-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
[WIP] Syncable Data Attachments #1823
base: 1.21.x
Are you sure you want to change the base?
Conversation
Last commit published: 8842c6223cb6226065c08dbd29acc7dbca016c8f. PR PublishingThe artifacts published by this PR:
Repository DeclarationIn order to use the artifacts published by the PR, add the following repository to your buildscript: repositories {
maven {
name 'Maven for PR #1823' // https://github.com/neoforged/NeoForge/pull/1823
url 'https://prmaven.neoforged.net/NeoForge/pr1823'
content {
includeModule('net.neoforged', 'testframework')
includeModule('net.neoforged', 'neoforge')
}
}
} MDK installationIn order to setup a MDK using the latest PR version, run the following commands in a terminal. mkdir NeoForge-pr1823
cd NeoForge-pr1823
curl -L https://prmaven.neoforged.net/NeoForge/pr1823/net/neoforged/neoforge/21.4.66-beta-pr-1823-attachment-sync/mdk-pr1823.zip -o mdk.zip
jar xf mdk.zip
rm mdk.zip || del mdk.zip To test a production environment, you can download the installer from here. |
src/main/java/net/neoforged/neoforge/registries/NeoForgeRegistries.java
Outdated
Show resolved
Hide resolved
src/main/java/net/neoforged/neoforge/attachment/AttachmentSyncReason.java
Outdated
Show resolved
Hide resolved
src/main/java/net/neoforged/neoforge/attachment/IAttachmentSyncHandler.java
Outdated
Show resolved
Hide resolved
@Technici4n, this PR introduces breaking changes.
|
Allows data attachments to opt into syncing. Still a rough PR, many details need to be figured out. Closes #335.
TODO:
StreamCodec
helper.AttachmentSyncReason
looks kinda pointless. Remove?IAttachmentSyncHandler
maybe?getData
, deserialization, copying), we should probably sync automatically.deserializeAttachments
: needs to attempt to sync?byte[]
for each attachment type.