PrismarineJS / node-mojangson

A mojangson parser written in node.js
17 stars 9 forks source link

Types and optional quotes #38

Open Foresteam opened 2 years ago

Foresteam commented 2 years ago

Minecraft may not read SNBT tags with no quotes (string values and names). It seem to always put them by default, also.

rom1504 commented 2 years ago

can you add a test showing how things work better now ?

Foresteam commented 2 years ago

Minecraft simply rejects the file without quotes and loads a backup from somewhere. Or you mean the quotes themselves, like {a:qwe} => {"a":"qwe"} ?

rom1504 commented 2 years ago

Yes adding a test for both would be best

This package code is complex, so it's important all new features are tested so the next PR doesn't break it

Foresteam commented 2 years ago

Correction: Minecraft 1.18.2 doesn't reject the file, it skips the "invalid" SNBT data.

Foresteam commented 1 year ago

I think it's ready to be merged... For quite a long time