Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

setCompoundTag doesn't exist


Recommended Posts

setCompoundTag is useless, because it does the exact same thing as setTag. So use that.

And getTagList was changed and is not yet deobfuscated, it is func_150295_c.


tagAt has been divided into multiple sub-methods which return specific types rather than just NBTBase. Look at the code, it's pretty easy to figure out.

Link to comment
Share on other sites

Thanks for your help.

Now i have problems with the "new" getTagList function and tagAt.


My current code looks like this:

private void readFromNBT() {
        reading = true;
        // TODO for backwards compatibility
        if(NBTUtil.getCompoundTag(originalIS, "Inventory").hasKey("title")) {
            setInvName(NBTUtil.getCompoundTag(originalIS, "Inventory").getString("title"));
        } else {
            setInvName(NBTUtil.getCompoundTag(originalIS, "display").getString("Name"));

        NBTTagList itemList = NBTUtil.getCompoundTag(originalIS, "Inventory").func_150295_c("Items") // But i need slotEntry as second Argument?!
        for(int i = 0; i < itemList.tagCount(); i++) {
            NBTTagCompound slotEntry = (NBTTagCompound) itemList.tagAt(i);//what was tagAt replaced for this situation?
            int j = slotEntry.getByte("Slot") & 0xff;

            if(j >= 0 && j < getSizeInventory()) {
                setInventorySlotContents(j, ItemStack.loadItemStackFromNBT(slotEntry));


getTagList needs more arguments than in earlier version. I have trouble rewriting it. Can you or someone else give me some tips?

Link to comment
Share on other sites

I used 10 as second argument for TAG_Compund and used this function instead of tagAt: func_150305_b. Errors are gone. Am I on the right way? I can't test because of some more, about 230 errors, in my mod. So im trying to fix them first :D


Ich danke dir bereits im voraus:

"Manchmal sieht man den Wald vor lauter Bäumen nicht".

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.