[1.70b] Bug: Certain items not stacking [SMP]

  • I'm having problems with certain items not stacking with each other when items come from IC2 (specificially crops)


    Basically I have 4 ink sacs split into 2 and 2. 2 of them came from crops and the other 2 came from a squid. These will not stack.
    This is happening with lots of items: wheat, pumpkin, red and yellow dye, etc. Also I think it happened with redstone from a miner once.


    I went into NBTedit and discovered that there is an extra empty entry in 1 of the ink sacs (I'm assuming this orginated from the crop)


    I also have Redpower (all of it), Forestry and Buildcraft running, but I think the problem is coming from IC2.


    Anyone else have this problem or is it just me?


    Thanks


    edit: i deleted the tag entries and it fixed the problem, wooden planks had this problem too so i dont think it is IC2 specific. Im thinking it could have been craftguide though as i had that accidently running.

    edit2: Okay so its happening very frequently with all sorts of items... even torches and its kinda annoying.


    edit3: It began when I started doing agriculture, which means i started using the cropanalyzer. I removed it from my hotbar and things seem normal now.

  • I can confirm the bug


    So far it has only occurred while playing with crops, however I/we have not done much since the upgrade to 1.70



    //MG0

  • Okay so I am able to reproduce the bug (Tested with SSP and SMP)
    Steps:
    1. Have the cropanalyzer in hotbar
    2. Have a few of any stackable placeable item BESIDE THE CROPANALYZER IN THE HOTBAR. Also make sure there is a free space in your hotbar
    3. Use cropanalyzer and exit it.
    4. Switch to item (This is the point where it gets the tag) and place the item.
    5. Pick them up and they should pop up as a seperate item (checking NBTedit, the picked up items are normal)
    6. Items are now unstackable


    Thanks for looking into it. Also I would appreciate if anyone else can try reproducing using these steps to confirm it.

  • I can confirm this bug still exists in 1.71. Thanks for reporting it; now I know I don't need to hunt through forge items.


    Observed effected entities:


    Fertilizer (bonemeal + scrap)
    Crop Yeilds
    Stakes (er 4 sticks; forget the name offhand)


    I also noticed inconsistency between client/server stacks (the client would stack but the server would say no).


    From the description and observed behavior: I -think- the issue is opening the crop-analyzer shows the hotbar, and thus this code tags /all/ items with an empty NBT array, irrespective of the item type.


    A test for confirming this with known clean parts (or dirty parts to see if they all become dirty); would be to place test items in the hotbar, open the scanner (might require a scan operation on an unknown seed sack) and see if the problem is reproducible.

  • I've confirmed that items in the hotbar which are clean are tainted when the crop scanner is used; it does not even have to process a crop; merely opening the scanner seems to be sufficient.


    The check for 'bad' crops should probably only trigger when one is dropped in to the input of the scanner, and should require it to match the ID of a seed bag.

  • I can confirm that crafting RE-Batteries in a RP2 Project Table (SMP) can make them unable to stack. Charge a bit and uncharge all the batteries, fixed.

    GENERATION 27: The first time you see this, copy it into your sig on any forum and add 1 to the
    generation. Social experiment.

  • I have found that if you have Equivalent Exchange installed, throwing what you can into the Transmution Table's fire and then making it again form the EMC made also corrects it a bit.

    A Rock Raider trained as an Engineer, among other things.

  • This bug is still present in 1.97 (installed only with forge 3.3.8 or 3.3.7). I added information to wiki's article about cropanalyzer, because it took me 3 hours to track it down.


    Edit: I decompiled HandHeldCropnalyzer.class and I found out, that in "public void onGuiClosed" in a loop for every item in inventory until cropnalyzer is found "StackUtil.getOrCreateNbtData" is used.


    Possible fix would be to replace

    Code
    1. NBTTagCompound nbttagcompound3 = StackUtil.getOrCreateNbtData(itemstack);
    2. if(nbttagcompound.getInt("uid") != nbttagcompound3.getInt("uid")) continue;


    with

    Code
    1. NBTTagCompound nbttagcompound3 = itemstack.getTag();
    2. if(nbttagcompound3 == null || nbttagcompound.getInt("uid") != nbttagcompound3.getInt("uid")) continue;


    Something went wrong with code tags.


    You shouldn't modify non cropanalyzer items in any way, but getOrCreateNbtData is doing it. Also I don't think that "entityhuman.inventory.setItem(k, itemStack)" is necessary, because you operate on references (ignoring this fact seems to be cause of this bug).

    The post was edited 7 times, last by Zjarek ().

  • Yes, the Bug is still there. Fix it Richard!

    I don't say, your "insert whatever" is bad. I'm only showing ways for making it better.
    GregTech Website
    Patreon really helps me out. If you consider funding the development of GT, so I might be able to do it fulltime, why not?
    GregTech 6, the Main Thread, Bug Reports go here too.
    I'm also on #gt-dev on irc.esper.net, if you don't want to make a Forum account just to contact me.
    (I'm there almost every day, when I'm at my own computer. Yes you can drop bugs and suggestions there too)

  • I play on a lot of modded servers and while it seems rare, this has happened to me twice in total with many items such as red dye, or more recently water melons given from crops.

    Is the answer to this question no?


    Quote

    Hey don't take it so hard. Ignorance is part of this generation it seems. -the wise words of XFmax-o-l

  • There isn't anything else I can do. All stray mentions of NBT are removed from the cropnalyzer.


    Also, they broke in 1.3

    Moment. Item-NBT broke in 1.3? Thats new to me, as my handheld Sonictron works fine with its 64 Inventoryslots and 2 Integervariables. And i looked at old IC²-Code to find out how it works.

    I don't say, your "insert whatever" is bad. I'm only showing ways for making it better.
    GregTech Website
    Patreon really helps me out. If you consider funding the development of GT, so I might be able to do it fulltime, why not?
    GregTech 6, the Main Thread, Bug Reports go here too.
    I'm also on #gt-dev on irc.esper.net, if you don't want to make a Forum account just to contact me.
    (I'm there almost every day, when I'm at my own computer. Yes you can drop bugs and suggestions there too)