Tutorial:TNT cannons/accuracy

Very high accuracy can be achieved by rebounding the TNT or shooting straight forward, because this reduces the alignment complexity by one axis. On the other hand direction changes in mid-air usually decrease accuracy.

Higher accuracy by providing more modes can hurt the cannons usability by increasing the amount of setup needed for aiming the cannon as well as the complexity of the cannon itself. So it is often preferable to have just enough modes for the cannon to achieve its purpose while maintaining high usability.


Pixel precision:

Pushing TNT into Blocks with different width/ letting it fall onto blocks with different height aligns the TNT against those Blocks. This technique results in a precision of 1 pixel which is equivalent 116th of a block (or half a pixel/132th of a block for chains and lily pads). If TNT are pushed into the same hit box from the same direction they will usually have the same position in that axis.


Subpixel precision:

TNT with alignment differing in the subpixel precision.

Since TNT is only 0.98 blocks wide it makes a difference from which direction it is pushed into a block. This can be used to achieve 0.02 block differences in alignment. If the TNT is not pushed against a block it is placed into the middle of the pixel which allows for 0.01 block differences in alignment.

Using errors in Java's floating point calculations alignments (for example pushing TNT from different directions) with approximately e-9 differences in alignment are possible.

TNT can be pushed into boats, which can be aligned anywhere to a precision of about e-11 using minecarts. This method is more complicated and less compact, than the other methods (since boats can be damaged multiple times in one tick, which forces them to be at least 8 blocks away from the propellants in reusable cannons). But it allows almost unmatched precision anywhere.

Motion alignment:

Using the motion of TNT any alignment can be achieved. Precise alignments can be hard to figure out properly though since most motion types are either too slow for TNT or to inconsistent and need to be canceled. Some motion types with notable consistency include water streams, bubble columns and TNT falling through powder snow. They are especially useful since changing the delay for which TNT is exposed to them can result in consistent position changes.

Navigation