Hbm's Nuclear Tech Mod

Hbm's Nuclear Tech Mod

1M Downloads

Conveyor grabbers miss every 5th item

abel1502 opened this issue ยท 0 comments

commented

I'd built a storage system using conveyor grabbers with specific items whitelisted, conveyors behind them and crates in front of them. However I observed a strange behaviour, where a few of the crates wouldn't get any items. I conducted a test in a creative world (screenshot below) and it confirmed that every 5 blocks along a conveyor line, the grabber's 20-tick delay would align in such a way that the item manages to pass straight by it with no interaction.

On the screenshot below, every grabber was set up with a whitelist allowing only the particular colored concrete variant placed atop it. No upgrades were used. Red scaffolds mark grabbers who didn't manage to grab their corresponding items.

{3FCB8B16-15DB-49B6-83C8-A9E7ED2EE8F8}

One solution could be to count the delay starting from the last tick an item was grabbed, rather than ticking every nth tick, as is the case now:

if(worldObj.getTotalWorldTime() % delay == 0 && !this.worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)) {