Gate triggers don't work as expected with double chests
buttilda opened this issue ยท 17 comments
Pipes work just fine, but triggers don't.
For example:
The trigger "Inventory is Empty" might be active even though the double chest contain items. That could happen if the items where in the "side" that the gate isn't touching.
Okay, I fail to explain myself... I hope that made any sense whatsoever.
PS.: I know CJ is rewriting the gates so I don't know if this is happening because they are still a work in progress.
PPS.: Gates are also reseting after you log out and back in. My autarchic gate turned into a normal gate, and the triggers set in it were lost. Again, I know they are in the process of being re-written so this might be a known issue.
@AEnterprise It's on my dev environment with forge 953 and the the updated source from BC
source, so you downloaded it here or from the official site? cause the version on the official site if from before the start of the gate rewrite
@AEnterprise I forked it from this repo...
Ok that explained my question. I have the newest version of BC (not source) and i did not have any of these bugs xD
@CovertJaguar yup. That's the one I was testing with because it's the one with the latest commits.
@AEnterprise How's that going to solve the problem....?
I'm not trying to play with a in-dev version (I'm smart like that). I'm just reporting what I think is a potential bug...
cause gates are undergoing a rewrite, i'm not sure about the exact stuff cause i'm not working on it but that might be what is causing the problem cause it worked in the past
Yes I know that.
I said it on the first post.
And I didn't ask for a solution, I was just reporting what I thought was an overlooked bug :)
The only possible bug, is the double chest thing, not sure what's up with that, the rest is just unfinished.
@CovertJaguar I think I found what could be the problem...
The InventoryIterator doesn't take double chests into consideration
There should be a check like this one:
public static Iterable getIterable(IInventory inv, ForgeDirection side) {
if (inv instanceof ISidedInventory) {
return new InventoryIteratorSided((ISidedInventory) inv, side);
} else if(inv instanceof TileEntityChest) {
TileEntityChest tileChest = (TileEntityChest) inv;
return new InventoryIteratorSimple(Block.chest.getInventory(tileChest.worldObj, tileChest.xCoord, tileChest.yCoord, tileChest.zCoord));
}
return new InventoryIteratorSimple(inv);
}
return new InventoryIteratorSimple(inv);
}
I believe that would fix it. If you like it I can make the PR myself.
@CovertJaguar Well it was a quick suggestion :3 But at least it will get fixed XD