Coder Social home page Coder Social logo

Comments (8)

TheNullicorn avatar TheNullicorn commented on July 22, 2024

Could you post the base64 that created that output?

from nedit.

TheNullicorn avatar TheNullicorn commented on July 22, 2024

I'm not able to reproduce this with Nedit 2.1.1 and the following base64 string:

H4sIAAAAAAAAAO1cWY/jVnZmu7fqxdvYnjjjmTHdHsf2dLPMnVQNJolKUlWpW6SqJEpqKQnkS/JSosRFI0qlkoIACRDkZZCnAEmQBchDkH7JQx7yC/o5PyJw8juCnHspVZWW6urFGwbT6OqS7s57z/nuOd857NsMc4u54t9mGEZ9jXnNd6+8e4W5novH0ejKbebqCHWuMHdqkT3EqI/sAF+5ytw68F28F6BOAp3+7zZz0/WTQYCmt5hrpXiIt6D0DvODp0+0PApRB++wT5849wWeZ96FsupoiKPOqHtWyjDa0ydqcYRDNmv7gT+a7rDFKBmhaMRaQxQloZ8kfhxBB/z0SVAp7h9YbK5UzD1iPoYBLRzgQTwcQTXSWTuInX4CxSzqYuSyscf8HnybxmMWRS7bQT4ZB91XePjlffVP/8ZWBxi70IT5HfjHi4ekWmIT7MSRSwbaZt55+kQ3UITYXJyMyLolhawaPsDCdavrJ6xPVu+giLUxO8QwSge7HzFvPX2SISvOVgpstVGu5LeYayYKMdmITDYZYGcEC2RHXcwWIpe5zbxZOBkNUXY0Gvr2eISTLeZWPPQ7fmShDvNOrpLds4rmfnu/Usy3qwfFPWuLnBjzdrZ6WMhZ7fJe2zootAsmmWg8hpqfOZ6ruqIrcJouCJwsKDwHH0ROcjyd9xRFExweZhn5IYYdDwfMm+oXIvzlWWlHkNmswTCvMTfSg2TIZyIheysSAgePI6fLkD/PJR43mI/IyZGdM1DHd1DANtAID9ndsdPHI3biBwHzE2gS4WMoHY4jNh7TvZqQZg/YKGZ+CtUhGpFe3XjChiiasvQx4DBYP2HuQD0OByMfu9sw5V04bjiLXNkwyubiHODIvU0L2HgUZKffNbL7xVy21G5krUKlvVvLPSpYm7ZoVYnOb9HLKNSPmA9WFUomIow/uy/ynzP31z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R2jtOL0UYfTuvOq3k7a8n6T8XXyQrmYzGSzwnZzJgqnuex9kyeSHKtl1d0jQkutoqX/T2Gl+UJg7yO6KwgS96edMWvHzJUUSekzxV5STd4zkEYM1pPJQLuuR6kv58+WP25vyxztSwjAmYoLzR25R525k2Z82JGRoC/BaMXsU3Z3252eufNK3ClOSWmb2CWLYc6YL8sbItVcjPsRMGx+5js9xqCMe0rRhEdrhHzedaWD9xG8G01Tjyy1Fl6jZqsJaF+VyfUfM7MEvVmkxzyqBPUuzFPjqo8E4+Pj4zteuzUigMwPzuOeFe6OaUcevx0Vk0uaqLRghP0jPBa67x5fxer7Vfk8xZEczq7ARM80lrv9JrNWonzVlWLDdqgmll+abVnDbF2oQ8ZznvKGCuC02LRJz7omEdiakpfpEhfp3atFmSWeL4gPXkNXZiLRCHmSaSzCluJKkktyoJ5q8HOF1KQXXBgiceMX1njBJTafLJ9sX8yj7xa8lrzgDDA/h5+XfOwZgrpO9AZ3OPDuEH8M+ejwrIBLrG3MwX9rK10hlvhRVe4D1R4FzFszlZVlROlxywjSXHcQXVyygeusm810kX2T4dzkUjBM/08Ye/3ppTVf9jf/nf7pf/9b/2l18eIvYGwzz6RX9LoDTFsu+8SMsSVtXvVdKybEnRZccGex5JNiifzhOiVudkVckImmy7miN+x35l0yqCn9jhW3mS4LkXlBsglCQBUmz1m2FRMEQQ3J4hNcPC1JxVeoZVBMGuSc1eUTas3cBsFHhz9jA087v9ZgPUPJ/lW/6zKaKb9D94WCJs+ZSx/fAsE9APw3FEHb2Y7UdgcZBTJqmO6dvHYWzTO/3VOFdi9lcDkIOXJl1vVUtFo7DEurqKovC8muFc1RbgPhBFTseqS9h6pEuKpIuquurPzd+CFVffgr26iGL/Nm38O0gbvxjVNiWNaxkZ8aItcoLqAmohVeCQ4nocr2hixhElTxaV1befU7J9R1HWXrZh/h8wsN+UcUUAAA==

Code:

String inventoryBase64 = "..."; // The base64 from above.

NBTCompound inventory = NBTReader.readBase64(inventoryBase64);
NBTCompound petSlot = inventory.getList("i").getCompound(8);
NBTCompound petTags = petSlot.getCompound("tag");

System.out.println(petTags);

String petInfo = petTags.getString("ExtraAttributes.petInfo", "{}");
System.out.println(petInfo);

Output:

{HideFlags:254,SkullOwner:{Id:"48f53ffe-a3f0-3280-aac0-11cc0d6121f4",Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvY2VmZTdkODAzYTQ1YWEyYWYxOTkzZGYyNTQ0YTI4ZGY4NDlhNzYyNjYzNzE5YmZlZmM1OGJmMzg5YWI3ZjUifX19"}]}},display:{Lore:["§8Fishing Pet","","§7Intelligence: §a+1","§7Sea Creature Chance: §a0","","§6Pod Tactics","§7§7Increases your fishing speed","§7by §a0% §7for each player within","§710 blocks up to §a20%","","§7§eRight-click to add this pet to","§eyour pet menu!","","§a§lUNCOMMON"],Name:"§7[Lvl 1] §aDolphin"},ExtraAttributes:{petInfo:"{"type":"DOLPHIN","active":false,"exp":0.0,"tier":"UNCOMMON","hideInfo":false,"candyUsed":0}",originTag:"UNKNOWN",id:"PET",uuid:"a0ad98a6-fcd2-4e1d-8af9-699ea21efa72",timestamp:"6/24/20 7:52 AM"}}
{"type":"DOLPHIN","active":false,"exp":0.0,"tier":"UNCOMMON","hideInfo":false,"candyUsed":0}

The petInfo you're getting might actually have backslashes in it, but I'd still like to confirm that if you don't mind.

from nedit.

Fix3dll avatar Fix3dll commented on July 22, 2024

I found the problem. I am using:

Gson gson = new Gson();
gson.toJson(NBTReader.readBase64(inventoryBase64).getList("i"));

GSON version: 2.8.9
nedit
inventoryBase64.txt

from nedit.

Fix3dll avatar Fix3dll commented on July 22, 2024

@TheNullicorn

System.out.println(result.getCompound("tag.ExtraAttributes").get("petInfo"));
System.out.println(result.getCompound("tag.ExtraAttributes").get("petInfo").getClass());
System.out.println(result.getCompound("tag.ExtraAttributes").get("petInfo.exp"));

Output:

{"type":"SILVERFISH","active":false,"exp":2.1774297623096235E7,"tier":"LEGENDARY","hideInfo":false,"heldItem":"PET_ITEM_MINING_SKILL_BOOST_RARE","candyUsed":0,"uuid":"39b136fd-8b90-4560-b331-2409eac824a4"}
class java.lang.String
null

I cant access to exp. petInfo is not Compound.

from nedit.

TheNullicorn avatar TheNullicorn commented on July 22, 2024

Let's break down what the NBT you're working with actually looks like:

i (List)
│
└── . (Compound)
    │
    └── tag (Compound)
        │
        └── ExtraAttributes (Compound)
            │
            └── petInfo (String)

Notice that petInfo is actually a String whose contents are in JSON format. Right now you're trying to interpret the entire value of i as JSON, when you only need to be doing so on petInfo. The reason you're seeing backslashes \ when you try to stringify it is because petInfo is technically a string, not an object; when you convert it to JSON, the quotes in the string need to be escaped or else the rest of the JSON is invalid.


Be careful not to confuse NBT with JSON. In text form NBT looks very similar to JSON, but has a few key differences that make it incompatible, including...

  • NBT strings don't need to be surrounded by quotes if they are 1 word without special characters. In JSON, every string needs quotes.
    • NBT string can also be surrounded by single quotes ' instead of double quotes ". JSON always requires double quotes ".
  • Numbers can have a 1-character suffix to indicate their type. Numeric types are indistinguishable in JSON.
    • e.g. 2.0f to indicate a "float", or 1b to indicate a "byte".
  • Some numeric arrays have a special prefix to indicate what type of array they are. JSON has no special type for numeric arrays.
    • e.g. [B; 1, 2, 3] for an array of bytes, or [L; 4, 5, 6] for an array of longs.
  • Every element in a list needs to be the same type. In JSON, arrays can have a mix of different types.
  • NBT has no boolean type.
  • NBT has no equivalent to null.

from nedit.

Fix3dll avatar Fix3dll commented on July 22, 2024

Yes you are right and thanks but petInfo is more suitable to be compound. I guess in this situation need to get petInfo's with RegEx. I will report this situation to Hypixel. Do you have any advice?

from nedit.

Fix3dll avatar Fix3dll commented on July 22, 2024

json
Just want to share...

from nedit.

TheNullicorn avatar TheNullicorn commented on July 22, 2024

Yes you are right and thanks but petInfo is more suitable to be compound

As much as I agree, I'm afraid it's out of my control. All the library does is interpret what you put into it, strictly following the NBT format. If the NBT you give it says petInfo is a string, I can't have the library assume it's JSON. If you need to interpret it as so, you'll have to bring in a separate JSON parsing library like gson or jackson to parse that particular string.

I guess in this situation need to get petInfo's with RegEx

I don't think that has anything to do with RegEx. My library handles the NBT side of things, and you'll need a separate library to handle that JSON string. RegEx shouldn't be needed at any point unless you're doing something else with it that you haven't mentioned here.

I will report this situation to Hypixel.

Using JSON in petInfo appears to be an intentional choice on Hypixel's end. It doesn't make sense to me either, but I don't think your report would get very far. They have millions+ items in their database, and changing every petInfo from JSON to NBT is probably way more trouble than its worth at this point for them.

json
Just want to share...

Like I said in my last message, there's a lot of key differences between stringified NBT and JSON which make them incompatible. In your screenshot for example, there's true/false values in the JSON, whereas NBT has no type for representing booleans.

from nedit.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.