Open Pandapip1 opened 10 months ago
Can you open a PR showing the failing test ? It would make it easier to debug
On Mon, Jan 8, 2024, 7:18 PM Gavin John @.***> wrote:
I'm currently working on 1.17 support for flying-squid. It seems to mostly be working, except that the following error appears whenever the world attempts to save:
TypeError: palette is not iterable at writePalette (/home/gavin/repos/flying-squid/node_modules/prismarine-provider-anvil/src/1.14/chunk.js:200:27) at writeSection (/home/gavin/repos/flying-squid/node_modules/prismarine-provider-anvil/src/1.14/chunk.js:184:18) at writeSections (/home/gavin/repos/flying-squid/node_modules/prismarine-provider-anvil/src/1.14/chunk.js:65:36) at prismarineChunkToNbt (/home/gavin/repos/flying-squid/node_modules/prismarine-provider-anvil/src/1.14/chunk.js:26:25) at Anvil.save (/home/gavin/repos/flying-squid/node_modules/prismarine-provider-anvil/src/anvil.js:44:19) at World.saveNow (/home/gavin/repos/flying-squid/node_modules/prismarine-world/src/world.js:152:30) at Timeout._onTimeout (/home/gavin/repos/flying-squid/node_modules/prismarine-world/src/world.js:167:20) at listOnTimeout (node:internal/timers:573:17) at process.processTimers (node:internal/timers:514:7)
From my debugging, it appears that the chunk palette is sometimes null. I'm relatively sure this is a prismarine-provider-anvil bug, but it could also be a prismarine-chunk bug.
— Reply to this email directly, view it on GitHub https://github.com/PrismarineJS/prismarine-provider-anvil/issues/73, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR437QDXIRADMELDWZW5RLYNQZ5RAVCNFSM6AAAAABBR35I2KVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA3TAOJZGA3DOMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
https://github.com/PrismarineJS/flying-squid/pull/650. No tests fail, because there aren't any tests to make sure that the world is saved, and because the error is handled.
Can you add a test ?
ok so additional issue is sectionMask changing from a number to a BitMask between 1.16 and 1.17
https://github.com/PrismarineJS/prismarine-provider-anvil/issues/75 is the root cause though, setting .sectionMask is not the right way to load. Using the load method is the correct way
1.8 is doing it right but 1.13 - 1.17 are not
1.18 is better
I'm currently working on 1.17 support for flying-squid. It seems to mostly be working, except that the following error appears whenever the world attempts to save:
From my debugging, it appears that the chunk
palette
is sometimes null. I'm relatively sure this is aprismarine-provider-anvil
bug, but it could also be aprismarine-chunk
bug.NOTE: It appears that
palette
is set tonull
here:https://github.com/PrismarineJS/prismarine-chunk/blob/0631db23c79f63d0bd37cb2764a9d6364c95688c/src/pc/common/CommonChunkSection.js#L108C15-L108C15