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.

RealNight

Members
  • Joined

  • Last visited

Everything posted by RealNight

  1. RealNight replied to RealNight's topic in Modder Support
    if we do in json file - charge: 30000.0d instead of "charge": "30000.0d" it means that we are trying to ask json library to generate invalid json. In gson part corrects this mistake and add quotes. About a replaceall func: that is not the final version, i know that string can contain tree of nbt, so i need to check and figure all of them. Now, for 1 lvl tree of nbt it is more than enough.
  2. RealNight replied to RealNight's topic in Modder Support
    I read that it is rule of form of json & gson
  3. RealNight replied to RealNight's topic in Modder Support
    Sorry, however i am really stupid... return (json != null) ? JsonToNBT.func_150315_a(json.toString().replaceAll("\"", "")) : null; and it works, wasted so many time and yours...
  4. RealNight replied to RealNight's topic in Modder Support
    maybe you meant NBTDeserializer that implements json deserializer<ObjectName> (in our case NBTBase). In this class it turn to string everything that is found under nbt:{ }
  5. RealNight replied to RealNight's topic in Modder Support
    No, new NBTDeserializer() is the name of the class file where it adapts minecraft NBTBase file (it is option for gson building like a string) example: nbt:{"charge":"30000.0d"} (that is without adapting) , with adapting - nbt: {"charge":"30000.0d",} (comma is added in the end) After that i apply settings that i made for gson for taking data from file.json and place data in the ItemConfig class
  6. RealNight posted a topic in Modder Support
    I have items.json file where are storing data about different itemstack (name, metadata, amount, enchants and nbt) All works nice, but nbt format is not correct: example: items.json "name": "groupofitems", "items": [{ "item": "IC2:itemToolChainsaw", "metadata": 27, "amount": 1, "enchantments": {}, "nbt": { "charge": 30000.0d } }] //next groups and items.... and result is - {"charge":"30000.0d",} - this is wrong and not working, it have to be {charge:30000.0d} How to solve this problem?

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.