Repository navigation
Add ItemStack 1.8.8+ cross-version PersistentDataContainer - #4143
Merged
Merged
Conversation
Proximyst
suggested changes
May 9, 2021
mdcfe
requested changes
May 10, 2021
mdcfe
requested changes
May 10, 2021
…l/providers/ReflPersistentDataProvider.java Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
Member
Author
|
Concerns addressed |
mdcfe
approved these changes
May 28, 2021
mdcfe
enabled auto-merge (squash)
May 28, 2021 11:21
ressidell
pushed a commit
to ressidell/Essentials
that referenced
this pull request
Apr 27, 2025
…sX#4143) This PR itself does nothing on its own but creates the underlying backbone I need to make a less hacky solution in EssentialsX#3963 lmfao. This PR creates a provider which uses NBT on 1.8.8-1.13 to mimic the exact structure of a PersistentDataContainer on 1.14+ which will allow us make any possible upgrades (which don't die from the lack of DFU on >1.13) work as expected. Additionally, this does not use reflection on modern Minecraft versions and thus will not need to be maintained/updated on MC version updates. In the future, we will need to find a way to store data on tile entities (signs namely) so that we are able to store UUIDs on signs for future plans, but for now ItemStacks work to fix our spawner issues.
rewsdjad1
pushed a commit
to rewsdjad1/EssentialsXPlus
that referenced
this pull request
Aug 13, 2026
…sX#4143) This PR itself does nothing on its own but creates the underlying backbone I need to make a less hacky solution in EssentialsX#3963 lmfao. This PR creates a provider which uses NBT on 1.8.8-1.13 to mimic the exact structure of a PersistentDataContainer on 1.14+ which will allow us make any possible upgrades (which don't die from the lack of DFU on >1.13) work as expected. Additionally, this does not use reflection on modern Minecraft versions and thus will not need to be maintained/updated on MC version updates. In the future, we will need to find a way to store data on tile entities (signs namely) so that we are able to store UUIDs on signs for future plans, but for now ItemStacks work to fix our spawner issues.
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.
This PR itself does nothing on its own but creates the underlying backbone I need to make a less hacky solution in #3963 lmfao.
This PR creates a provider which uses NBT on 1.8.8-1.13 to mimic the exact structure of a PersistentDataContainer on 1.14+ which will allow us make any possible upgrades (which don't die from the lack of DFU on >1.13) work as expected. Additionally, this does not use reflection on modern minecraft versions and thus will not need to be maintained/updated on MC version updates.
In the future, we will need to find a way to store data on tile entities (signs namely) so that we are able to store UUIDs on signs for future plans but for now ItemStacks work to fix our spawner issues.
Tested on;
Spigot 1.8.8
Paper 1.8.8
Paper 1.12.2
Paper 1.16.4