UpgradeableSpawners being turned into default spawners in Backpacks
lukemango opened this issue ยท 4 comments
๐ Description (REQUIRED)
When players attempt to store UpgradeableSpawners (https://www.spigotmc.org/resources/upgradeable-spawners-spawner-plugin-level-spawner-change-entity-type-1-16-support.77717) in their Slimefun Backpack, after Slimefun attempts to save the data, they turn into regular default Pig Spawners. I contacted the developer of UpgradeableSpawners as several plugins that use Spigot's inventory handling also turn them into default spawners, but their response was "USpawners saves the data in the persistent data holder through spigots API. They most likely just don't serialize, de-serialize that correctly when saving, loading backpacks etc.". I just wanted to further verify if this is the case. Tested with 3 plugins: CSCoreLib, Slimefun & UpgradeableSpawners. All configurations were default.
๐ Steps to reproduce the Issue (REQUIRED)
- Place an UpgradeableSpawner (I used a Dolphin Spawner) in a Slimefun Backpack (I used a Large one)
- Wait for Slimefun to attempt to save it
- Open the backpack
๐ก Expected behavior (REQUIRED)
For the spawners to keep their NBT data.
๐ Server Log
Tested with 3 plugins, CSCoreLib, Slimefun & UpgradeableSpawners.
https://pastebin.com/ufdjBMax
๐ /error-reports/ Folder
No error reports
๐งญ Environment (REQUIRED)
- Server Software: Tuinity c3a9e41
- Minecraft Version: 1.16.4
- Slimefun Version: DEV 769
- CS-CoreLib Version: DEV 92
The plugin is not available for free so I cannot verify this. However...
"USpawners saves the data in the persistent data holder through spigots API.
They most likely just don't serialize, de-serialize that correctly when saving, loading backpacks etc."
Slimefun uses Bukkit/Spigot's built-in inventory serialization, so if it would actually use persistent data, then it should work out of the box. If other plugins have the same issues, then I would strongly argue that this is a problem with the data handling itself.
Also, persistent data is serialized by the provider of the adapter, if they use a default adapter, such as STRING
or a primitive data type, then the serialization should be flawless.
If they somehow use a custom adapter, then they perhaps didn't provide a proper serialization for that data type.
It sounds a lot like it's on their end.
You mentioned other plugins have the same issue and again, we are using the built-in serialization; persistent data serialization is up to whoever provides the data adapter.
I did however see the serialization error in your server log.
Can you please upload the following file to pastebin: /data-storage/Slimefun/Players/45fbe595-4240-4990-9ce1-7920fff0d7ab.yml
?
The plugin is not available for free so I cannot verify this. However...
"USpawners saves the data in the persistent data holder through spigots API.
They most likely just don't serialize, de-serialize that correctly when saving, loading backpacks etc."Slimefun uses Bukkit/Spigot's built-in inventory serialization, so if it would actually use persistent data, then it should work out of the box. If other plugins have the same issues, then I would strongly argue that this is a problem with the data handling itself.
Also, persistent data is serialized by the provider of the adapter, if they use a default adapter, such asSTRING
or a primitive data type, then the serialization should be flawless.
If they somehow use a custom adapter, then they perhaps didn't provide a proper serialization for that data type.It sounds a lot like it's on their end.
You mentioned other plugins have the same issue and again, we are using the built-in serialization; persistent data serialization is up to whoever provides the data adapter.I did however see the serialization error in your server log.
Can you please upload the following file to pastebin:/data-storage/Slimefun/Players/45fbe595-4240-4990-9ce1-7920fff0d7ab.yml
?
45fbe595-4240-4990-9ce1-7920fff0d7ab.zip
Sure, there.
Yep there is no data on this spawner
'0':
==: org.bukkit.inventory.ItemStack
v: 2584
type: SPAWNER
Can confirm developer fixed it in their latest update: https://www.spigotmc.org/resources/upgradeable-spawners-spawner-plugin-level-spawner-change-entity-type-1-16-support.77717/update?update=378340