Skip to content
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

Add bidirectional simplify method #39

Open
extremeheat opened this issue Feb 19, 2021 · 2 comments
Open

Add bidirectional simplify method #39

extremeheat opened this issue Feb 19, 2021 · 2 comments

Comments

@extremeheat
Copy link
Member

extremeheat commented Feb 19, 2021

It would be nice to have a simplify method that returns classes/objects that can be accessed like the current simplify method, but also allow for the data to be written back. We can set the object primitive valueOf() to match the nbt value like done in Protodef for BigInts

@extremeheat
Copy link
Member Author

Actually, valueOf won’t be necessary. Just extending Array of Number I think is good enough + some instance of checks when writing to nbt

@rom1504
Copy link
Member

rom1504 commented Feb 19, 2021

yeah good idea
and we could have the same thing for https://github.com/PrismarineJS/node-mojangson (which is now using the same format as pnbt)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants