-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
PotionEffect Retrieval Bug #1276
Comments
I think I accidentally managed to find the core issue. When trying to to get a PotionEffect from a DataContainer with this code:
I get this error:
(Stacktrace shortened and simplified) Not sure what format SpongePotionBuilder expects but it's not |
If so, that's great! Thank you for taking the time to test this :D |
As I said I accidentally stumbled over it. I was trying to bypass the issue that |
Bumping up report. |
Add DataContentUpdater. (Close SpongePowered#1276)
Uses a DataContentUpdater to update the outdated data containers (Closes #1276)
Uses a DataContentUpdater to update the outdated data containers (Closes SpongePowered#1276)
I'd like to point out, that in SF 1.12.2-2586-7.1.0-BETA-2900 the following code still returns
While the container contains all potion data! |
Updated code:
|
Fixed in #1969. |
Sponge API: 6.0.0-20170323.180311-60
Sponge Forge Build: spongeforge-1.11.2-2227-6.0.0-BETA-2244
Forge Build: forge-1.11.2-13.20.0.2227-universal
Java Version: 1.8.0_121-b13
I've seem to have found a bug, which simon816 has confirmed on the forums, with the with
DataSerializable
in regards toPotiotionEffect
s.Here is the original post:
I have the following code, which saves a player's potion effects:
I have no issue with the code above, but when I try to retrieve the data with the code below, I receive a
Could not translate DataSerializable of type: org.spongepowered.api.effect.potion.PotionEffect
error. This might be a programmer end error, but I coudn't get any further after troubleshooting the issue to linePotionEffect potionEffect = node.getNode("Effect "+i).getValue(TypeToken.of(PotionEffect.class));
Any help would be greatly appreciated. Thanks!simon816's bug replication code:
The text was updated successfully, but these errors were encountered: