Alternate Current

Alternate Current

29M Downloads

TNT duper relying on block-updates not working

sofianedjerbi opened this issue · 5 comments

commented

Hello,

This TNT duper does not works with alternate-current.
This might be related to MC-11193.

Front

Back

Inside

Usage: Use the noteblock
Region file: https://file.io/TvsCwtlLgiiy

Works fine with eigencraft.

Minecraft version: 1.19.2 with 1.5 alternate-current
TNT don't trigger at all.

commented

https://youtu.be/povFs7-MjLQ a solution to this issue for ianxofour's farm, if anyone needs it

commented

Thanks for the report! The good news is that I can reproduce the issue. The bad news is that I don't see a good way to fix it. You're right that it is related to MC-11193, and you mentioned the duper does work with Eigencraft, which got me curious, so I looked into that as well.

For context, this duper relies on a quirk in the way pistons move blocks. The new 'moving block' is placed before the old stationary block is removed, which means there's a brief window during which both the moving block and the old stationary block exist at the same time. This duper exploits that by updating a redstone wire in this brief window, igniting the old stationary TNT while the moving TNT has already been placed.

Now, notice that the wire that powers the TNT is also redirected by the observer. This is important because we only want to power the TNT in that brief window where the moving TNT is already placed. If the dust weren't redirected it would power the TNT too early. Thus, the observer is used to redirect the wire, and only when the moving TNT is placed, replacing the observer, is the dust directed into the block and able to power the TNT.

Unfortunately, a wire changing connections does not cause any block updates, or this would already be enough to make the duper work. Instead, we must rely on block updates caused by a wire changing its power level. That is where MC-11193 comes in. In Vanilla a wire that is part of a larger network (i.e. more than one wire connected to each other) will update its power level multiple times, each time only decreasing by 2 before it's finally fully depowered.

That is why this bug will be very hard for me to fix. The duper relies on updates caused by a wire changing its power level to update the TNT, which has to then still be powered by that wire, so it can ignite. But Alternate Current depowers the wire in the most efficient way (that is to say, all the way off immediately) and so when the TNT is updated, it is no longer being powered by the wire.

It looks like Eigencraft does something in between. It might update a wire's power level multiple times but it keeps track of it so it's not as chaotic as Vanilla. I haven't looked into how its algorithm works, so I can't give a proper explanation for it, but this is what I gathered from running it through the debugger lol.

Sorry for the lengthy post. I'm giving detailed explanations partially so as to have the issue documented for when I look at it again with fresh ideas to see if I can do anything to fix it.

commented

I ran into this issue trying to follow this Versatile Tree Farm tutorial by ianxofour.

commented

Is there an update to this issue?

commented

Unfortunately, I don't think I'll be able to fix this without a major redesign or a janky hack fix. The duper ultimately relies on something this mod is specifically designed to fix. Any path I see to resolving this issue would lead to worse performance overall. I'm sorry to do it, but I think I'm gonna have to close this issue as "won't fix".