Tutorial:TNT cannons/moving TNT
Every cannon needs to move TNT. Inside of the cannon TNT can be moved either as a block or as an entity. When moved as an entity it is useful to compress batches of similar purpose together to reduce complexity but different batches also need to stay separated or be separated again.
Moving TNT blocks
Moving TNT blocks comes with some unique problems. Many of them are caused by it being impossible to power the TNT / direct redstone signals through. But other, way more problematic problems come from the TNT often needing to move, while the player is using the cannon.
To prevent slow down of the loading in block streams, the pusher might use 0 ticks. Those allow continuous loading but come with some problems. If the TNT is pushed using a clock it will be unordered. 0 tick placement detectors on the other hand can get big and might not reset fast enough, especially during lag spikes. Another way to reduce this slow down is by moving the player. Trapped between two flowerpots the player can quickly move left and right, placing TNT into two different pushers. This requires a lot of loading skill and is not applicable in most conventional cannon layouts though. A similar effect is achieved by moving the TNT furthest away from the player first, so that it can already be loaded again - looking through the transparent parts of the piston head - while the TNT closer to the player are still pushed.
To prevent TNT blocks from being pushed into the TNT of previous shots (no matter if the latter is in block or entity, form this might cause problems) either those TNT have to be primed faster or they need to be moved somewhere else. Moving it somewhere else can increase cannon volume dramatically though if it is solved via multiple chambers so instead a better and more complicated solution is to store all the TNT and ignite them in one chamber.
Compression

Middle: Compressor
Bottom: Compressor and separator
Compression is the process of moving TNT to their launching position.
Gravity and pistons and / or flowing water are usually used to achieve the compression. To prevent the inaccuracies that come with the prime motion of TNT, it has to be pushed into a wall, so that the motion gets cancelled.
Separation
As the name suggests, separation refers to the process of separating TNT and keeping it separated.
TNT can be separated by it's position in the update order using pressure plates. If the TNT is moved onto the pressure plate it activates a trapdoor, that prevents other TNT from being moved there. To separate multiple TNT at once, the process might be repeated setups involving iron- or golden pressure plates can be used.
Usually the TNT are initially separated though. To keep the TNT less complicated and more compact methods can be used. Those include flaps (trapdoors or piston setups, that open for a moment to let a bunch of TNT pass, while the next batch lands on them) - which are most commonly used to separate multiple shots from each other - and setups, that push the TNT into multiple horizontally differing positions - often used to separate propellants and projectiles or in very fast Machine guns.
| Related | |
|---|---|
| General Concepts |
|
| Combat | |
| Utility | |