User:Jerbear4328/Ghost TNT Machine

The ghost TNT machine creates client-side TNT.

Ghost TNT Behavior
The clients of any users within render distance of the contraption when it is run will think the TNT is still there, but it is not actually there on the server. This ghost block exhibits strange behaviors, such as:


 * If it is stood on, other users that do not see the TNT and the server will think the user is flying. Depending on the server settings, the player will shortly be kicked for flying.
 * The TNT cannot be activated by redstone or other TNT.
 * Attempting to place something on the TNT will make it disappear and place the block where the TNT was, if possible.
 * This means that if you attempt to place another TNT on the ghost TNT, it will change the ghost TNT into real TNT. If the contraption is still built, it will reactivate, making the TNT back into a ghost TNT.
 * Breaking the TNT in any capacity will not drop an item.

Leaving the render distance of the TNT or leaving and rejoining the server or world will cause the TNT to disappear.

Redstone Explanation

 * 1) The observer detects the placement of the TNT, sending a 1-tick pulse to the first piston.
 * 2) The first piston retracts the redstone block, unpowering the redstone line.
 * 3) The second piston retracts the TNT.
 * 4) The observer detects the removal of the TNT, sending a second 1-tick pulse to the first piston.
 * 5) The first piston spits out the redstone block, powering the redstone line again.
 * 6) The TNT lights and the second piston extends at the same time. The server correctly processes this, converting the TNT block into an entity, but the client thinks the TNT was pushed back to its original location, thus creating a ghost block.