BuildCraft|Core

BuildCraft|Core

7M Downloads

Emzuli pipes behaviour

Nagapito opened this issue ยท 7 comments

commented

Not sure if its a bug or emzuli pipes changed but I am trying to implement the alternating output behaviour described by Covertjaguar here: https://www.youtube.com/watch?v=RND78mHRsrM and they simple dont do it.

Once I turn on both levers, the pipe only outputs the item associated with the first activated lever...

Thanks

commented

You're right. I don't think it was changed on purpose, but I can't say for sure. It looks like the logic in the pipe is currently taking things stack by stack instead of taking one of each type. This is not how I intended it when I made the pipe.

There have also been similar questions related to the Emerald pipes white and black list options. In that case I don't remember how it worked when I updated the Emerald pipe, but both pipes might have changed after optimization of some kind.

I'm on BuildCraft 7.0.15, which is kind of old now. Maybe the pipes changed in the updates in BC 7.

commented

@Nagapito You would. (You wouldn't if you used an odd number of filters, such as 1 or 3.) Anyhow, fixed.

commented

@SandGrainOne - "Stack by stack instead of taking one of each type". Sadly, your code speaks otherwise:

if (doRemove) {
return inventory.decrStackSize(i, (int) powerHandler.useEnergy(1, stack.stackSize, true));
} else {
return stack;
}
- the extraction stack size is controlled here by the amount of power supplied to the pipe, as it is for every pipe.

If you want it to work this way, please tell me, but that would not be in line with the rest of BuildCraft. (However, BC 8 will be reworking the whole system anyway.)

As for them not toggling, that is a bug and I am looking into it right now.

commented

Found the bug. It was broken in the RF rewrite back in BC 6.1.x as I suddenly started calling checkExtract() with doRemove set to false as well as true, meaning that the filter incremented twice - and constantly repeated the same one.

I also used the occasion to refactor the code a tiny bit.

commented

There we go!

commented

Thank you :)

commented

So, if I had used non-consecutive filters, I would not had noticed this? Like 1st and 3th or 2nd and 4th?

Anyway, thanks for the fix