1

I am creating a railgun using TNT and commands, and I want each firing to be as accurate as possible. I am trying to limit the offset (that little bump and jump of movement after TNT is summoned/ignited) so shots are straightforward. Here is what I have tried:

  • I tried using /tp @e[type=tnt] x y z, but the projectile ends up in the propellant chamber and usually does not come out of the barrel, blowing up the gun, or it falls out of the barrel and lands on the ground a few blocks away.
  • I also used the "four trick," by putting a ring of 4 blocks around the block that the TNT is summoned. If I use a blast-weak block, like wool, I have to replace the ring every time I fire it. If I use a blast-resistant one, the power of the shot is much weaker, due to the ring absorbing most of the blast.

Is there any way to do this?

1 Answer 1

2

I also used the "four trick," by putting a ring of 4 blocks around the block that the TNT is summoned. If I use a blast-weak block, like wool, I have to replace the ring every time I fire it. If I use a blast-resistant one, the power of the shot is much weaker, due to the ring absorbing most of the blast.

Do that, but add a piston underneath the TNT that pushes it upwards out of the four blocks (and presumably into a stream of water).

6
  • Yes, but remember that TNT entities are 0.98 x 0.98, not 1x1, so there still is a chance that when the TNT is pushed up, it ends up on the ring. Are there any other methods?
    – WarpPrime
    Sep 16, 2020 at 12:14
  • @fasterthanlight Why is that a problem? Surely you have water to continue moving the TNT, or it blows up your entire contraption?
    – Corsaka
    Sep 16, 2020 at 16:00
  • I could use water, but for simplicity and less risk for my redstone, I use a dry cannon for the railgun.
    – WarpPrime
    Sep 16, 2020 at 16:36
  • ...how does a dry cannon provide less risk? Your cannon will blow up the redstone that sets it off.
    – Corsaka
    Sep 16, 2020 at 16:42
  • I use a setblock about 30 blocks away from the cannon itself, and that is where the redstone is.
    – WarpPrime
    Sep 16, 2020 at 18:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .