Applied Energistics 2

Applied Energistics 2

156M Downloads

Not an actual Issue, just a quick question of what would happen when...

mindforger opened this issue ยท 4 comments

commented

i would build a drive with an storage bus attached + crafting CPU
and now prepare a crafting pattern that uses both, items from a disk in this drive and the disk itself?!
when i request the craft, could this possibly bear an endless loop in some way?

i came up with this terrible idea from #3021 (comment)
where i was thinking if i could possibly make an crafting recipe that would suck all my drives through an IO Port to make an manually triggerable item sifting possible

sure i mean this is a far from real worst case scenario and utterly terrible but could create an funny exploit ... currentl i have no way to test it myself before 8hours later if you understand what i mean :)

commented

My first guess would be that it'd act like it did in 1.7 where you had machines that would duplicate an item for an arbitrary cost. (Thaumcraft comes to mind)
AE wouldn't know what to do with the recipe and not allow you to craft said item.

commented

i would use an ordinary ietm conversion recipe not counting the drive as an output item ... i would use an stone and feed the stone into a crusher while i feed the additional disk into the IO Port and returning it via export bus ... but still if i have a valid crafting recipe and request it, thus trying to remove items from the disk and the disk itself at the same time?

commented

There are exactly 2 things which can happen.

The pretty much guaranteed one is that it will simply not start the crafting at all. Before starting it will actually move every needed item to the crafting cpu inventory. Should it move the cell first, it will fail to extract any other required item and just abort. This also happens, if there is no cell which is an exact copy of the defined cell inside the pattern. It is pretty much impossible to achieve as it means you can neither gain any additional items or even use existing items. Even substitution will not solve anything, because cells are neither damagable items like swords or have an oredict entry.

The other option is it will actually work. But as said it pretty much requires a static inventory, which never changes and everything needs to be moved to the crafting cpu before the cell itself is moved there. Which is an unsorted collection of all required itemstacks, so go figure how likely it is to succeed.

There is a 3rd potential option. But it is unlikely that anyone encounters it. The only mod who ever used it was PneumaticCraft (but was designed for logistic pipes in mind). Here a mod can mark items as requestable itemstacks and deliver them on demand. Should it provide a wrong amount, the crafting cpu will simply wait until the request is fulfilled, which includes waiting infinitely. Level emitters work similar, but a player gives a promise to the system that toggling a redstone signal is enough to create as many items as needed. Literally it can be a redstone lamp with a sign "Craft torches by hand until the lamp goes off" above it. Still in all cases, the crafting cpu will simply wait for the items to arrive and any player can look at the status and see which items are missing.

commented

okay, i just wanted to have this terrible idea and it's possible fatal result be shed on with some light :D thanks for clearing it
since i have such crazy ideas fro time to time i guessed i should share my thought as it might hit a weakspot in the code but i culd simply not test it