Botania

Botania

137M Downloads

item stacking

StompMC opened this issue ยท 7 comments

commented

I was just using Botania in a single player and I found a small issue. I have a basic mana pool and was dropping items in to charge them. First it was petals and then it happened with iron bars. After dropping the bars/petals in if there was not enough mana the items would be spit back at me and will no longer stack with the original stack of items.
Just to add to this I don't know if it effects anything but I was doing all of this in the Aroma Mining Dimension.
I was using the newest version I downloaded just this morning.

commented

it may be linked somehow I dont know. When it happened with an iron bar it still shows as
"Iron Ingot" with the same item ID and both have Minecraft tag. so upon appearances it looks like the same item but it won't stack in any inventory as being treated as a separate item.

commented

That happens with NBT-tagged items. If the tags are different, they won't stack.

commented

Presumably the same as #815, but I hadn't used mana infusion/alchemy so far, only conjuration.

commented

It is possible that the redstone you put in was NBT-tagged, and the redstone you got out was not tagged. The same with the ingots; the infusion failed so it tried to give back iron ingots, untagged. It could be Aroma Mining Dimension messing with NBT, because Mystcraft causes issues with Botania, and Aroma is similar to Mystcraft.
The matches() function in https://github.com/Vazkii/Botania/blob/master/src/main/java/vazkii/botania/api/recipe/RecipeManaInfusion.java doesn't check NBT, just metadata.

commented

It is possible that the redstone you put in was NBT-tagged, and the redstone you got out was not tagged.

Redstone crafted out of redstone blocks is by definition untagged (without recipes getting messed with) and still returns NBT-tagged redstone. Also, I don't even have Aroma and it was in overworld, and creative tests result in nonstacking redstone.

The same with the ingots; the infusion failed so it tried to give back iron ingots, untagged.

Albeit, you're at least partially correct. Unconverted drops (64 redstone into pool with mana for 13, returns 26 + 51 and not 64 + 13, or just drop too much for pool to convert in time before pickup) return tagged.

commented

I see! I was confusing empty-tagged with untagged :O...
This is the final result: http://imgur.com/BODF9UD
The fresh ingot is straight from creative and will not stack with the other 52 that failed transmutation. Ingots that fail infusion can stack with others that have done the same.
EDIT: Looking at the TilePool code, I can't find anything that would destroy or modify the input ItemStack except for the few lines (143-145) that subtract from the stacksize and kill it when the size reaches 0. In my limited experinence, this looks like it shouldn't modify the NBT.
It is also worth noting that both string and ItemStack defined recipes have this problem (i.e. ingots and blocks)

commented

I think I figured it out. This was caused by the addition of the Petite flowers. When the item is thrown on the pool it goes through the list of recipes to figure out which is the right one. When it gets to the Petite Flower recipes it checks the item's NBT to verify it's the proper flower. Since it doesn't have an NBT tag to compare to, it creates an empty one. It's an easy fix.