Custom data stripped when serializing an ItemStack

I already posted it above. I haven’t made changes to it since

sigh bump. Kind of need to get this working

Still need a fix for this…

If you write it in Java, I would consider taking a look at helping you resolve the issue.

1 Like

##REKT

Well, come on, Kotlin isn’t hard to read for Java guys. :wink:

The main differences between kotlin are that there aren’t any semicolons, and that variable/parameter declarations go <name> : <type> [ = <value> if it's a variable]. It’s not rocket science

Doesn’t change the fact that for me to test, I would have to set up a kotlin environment, which I’m not going to spend time doing at the moment to test a feature that I know works already. So again, if it is in Java, where I can just dump the code into my existing testing workspace, I would look into helping resolve the issue, but otherwise, I don’t have enough time.

1 Like

Rewrite the code to Java so @gabizou can help you. If everything works in Java, copy and paste it into IntelliJ, IntelliJ asks you if it should convert the Java code to Kotlin.
When a gabizou offers to help you, you should take advantage of it. :wink:

2 Likes

Fine. Here’s Reward.java
Here’s InteractListener.java
SpongyCrates.java
Anything I’m missing?

So it’s this line where the reward is not present, or is there something I’m missing?

Additionally, while it won’t fix your current issue you should really be setting Queries.CONTENT_VERSION in your toContainer so that if the data format ever changes, you can just add a DataContentUpdater and save yourself a lot of pain.

Could you give us a snippet of the serialized Rewards in the config? I want to see if there’s some problem in the serialization process that might cause it to break.

I assume there’s no errors in the console either?

And where is the CrateKeyManipulator and associated DataManipulatorBuilder?

Here

Anything else?