Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[1.7.10] [1.8] [SOLVED] Using NBTTagEnd to encode null objects.

Featured Replies

Posted

Good day everybody, i have one little question:

Can i use NBTagEnd to encode null objects to nbt? Or should i use something else?

Note: these "ends" may appear in both compound and list tags.

 

Thanks for help!

If you have any questions - just ask!

  • Author

So, i can't use NBTTagEnd. I don't think i either can add new tag with null value.

So if i use compound and put inside string with name "NULL" containing value "NULL" it will be probably differenciated from encoded object that has string field with name "NULL"?

 

And that link to github you gave me, has some usefull things to learn for me. Because i'm working on something similar and it's working pretty nicely: MBT (Json, Gson. Nbt, Mbt. Get it?).

  • Author

So if i use compound and put inside string with name "NULL" containing value "NULL" it will be probably differenciated from encoded object that has string field with name "NULL"?

Which is why I choose the absolutely ridiculous key "_sc$null" (sc for SevenCommons).

Oh yeah, to not be mistaken with object's field, all i have to do is to use characters that cannot be used in field's name. So #NULL will be enough :D ...

 

(Json, Gson. Nbt, Mbt. Get it?).

No, not really :D

The why Gson is named Gson. Because Google's json?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.