FTBTeam / FTB-Mods-Issues

Any mod issues, be it FTB Teams, Quests or any other of our mods can be reported here!
22 stars 1 forks source link

[Bug]: FTB Quests NBT Parser Broken for list tags #682

Closed baileyholl closed 1 year ago

baileyholl commented 1 year ago

Mod

FTB Quests

Mod version

ftb-quests-forge-1902.4.6-build.176.jar

Forge / Fabric version

1.19.2 43.2.3

Modpack & version

No response

What issue are you having?

List tags are not parsing lists of doubles correctly, or not being serialized correctly. I have a reward with blocks that store an entity tag as part of the block and item tag, but FTB quests detects this as invalid and will not load the chapter.

Failed to read C:\Users\baile\curseforge\minecraft\Instances\skypack\config\ftbquests\quests\chapters\drygmy_jars.snbt: Unexpected tag '-0.08d' in list @ 2254:31 - can't mix two different tag types in a list!

Quest file here: https://pastebin.com/Pfd2wSLp

Crashlogs

No response

Steps to reproduce

  1. Add reward with an item that has a list tag with doubles in it.
  2. Reload the game
  3. Quests will not load

Anything else to note?

No response

desht commented 1 year ago

Looks like the SNBT parser in FTB Library is wrongly interpreting 1.962601141863566E-4d as a string instead of double. Then the next element -0.08d as a double, and types can't be mixed in NBT lists.

Should be an easy fix I think (add support for scientific notation to double values). Update: yeah, negative exponents specifically. FTB Lib really needs to be using standard library methods for testing numeric types :)

desht commented 1 year ago

Fixed in latest FTB Library release.