Skip to content

Feat/snbt stack serialisation#12363

Merged
MiniDigger merged 12 commits into
update/1.21.5from
feat/snbt-stack-serialisation
Apr 12, 2025
Merged

Feat/snbt stack serialisation#12363
MiniDigger merged 12 commits into
update/1.21.5from
feat/snbt-stack-serialisation

Conversation

@electronicboy
Copy link
Copy Markdown
Member

Opening a PR because I generally forgot to and we might want more discussion on this;

I am planning to add an "sv" tag incase we want to change the format here or something, but, this is how this currently looks:

item:
  ==: org.bukkit.inventory.ItemStack
  components: '{"minecraft:written_book_content":{"title":{"raw":"Jon"},"author":"The
    Destroyer","pages":[{"raw":"hi"}]}}'
  count: 1
  DataVersion: 4325
  id: Minecraft:written_book

It's worth noting that I referenced the vanilla codec for what to serialise, and followed the logic which follows and adds the DV onto that; There was maybe a talk of extracting out the top layer of components;

  ==: org.bukkit.inventory.ItemStack
  components:
    minecraft:written_book_content: '{"title":{"raw":"Jon"},"author":"The Destroyer","pages":[{"raw":"hi"}]}'
    minecraft:max_damage: '20'
  sv: 2
  count: 1
  DataVersion: 4325
  id: minecraft:written_book

I generally want to avoid any stupid amounts of translating this as much as possible, but, may be willing to concede on this given that the top layer will basically always be a tag, note that all component values are strings, because json, this aspect will be non-negotiable

@electronicboy electronicboy requested a review from a team as a code owner March 30, 2025 15:33
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Mar 30, 2025
@mbax
Copy link
Copy Markdown
Contributor

mbax commented Mar 30, 2025

Welcome to paper 🥳

It appears you commit / generate a whole slew of completely unrelated and invalid changes.
Please make sure to remove them so we can review your PR change.

edit: Thank you! I look forward to more contributions from you in the future!

@electronicboy electronicboy changed the base branch from main to update/1.21.5 March 30, 2025 15:38
@lynxplay lynxplay force-pushed the feat/snbt-stack-serialisation branch from 8746259 to 95d1e63 Compare April 1, 2025 11:51
@lynxplay
Copy link
Copy Markdown
Contributor

lynxplay commented Apr 1, 2025

Generally in favour of a schema version, the name sv sounds rather unfun for it, the couple of characters schema or something would take are not gonna break our necks.

@electronicboy
Copy link
Copy Markdown
Member Author

Yea, I just wasn't sure if I go for paper:schema_version or just s..._v... or what, so, figured I'd push before I went to go bed or be productive

@electronicboy electronicboy force-pushed the feat/snbt-stack-serialisation branch from 9540f6f to 9742f95 Compare April 10, 2025 21:32
kennytv and others added 2 commits April 12, 2025 09:48
also cleans up unneeded BundleFeatureTestSuite and fixes the CompositeSerializationTest not being executed at all
@github-project-automation github-project-automation Bot moved this from Awaiting review to Awaiting final testing in Paper PR Queue Apr 12, 2025
@MiniDigger MiniDigger merged commit 298c733 into update/1.21.5 Apr 12, 2025
4 checks passed
@MiniDigger MiniDigger deleted the feat/snbt-stack-serialisation branch April 12, 2025 13:49
@github-project-automation github-project-automation Bot moved this from Awaiting final testing to Merged in Paper PR Queue Apr 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

5 participants