2
-uncertainskeleton's minigame help (tnt entity problem)-
[DISCLAIMER: This might malfunction on Multiverse servers because if someone drops a lever in any world it'll transform into TNT so disclaimer]
If you want a tnt block to turn to a tnt entity, here's the command to run
repeating command block (always active) [specify an arena, lets say its 20 64 20 -20 74 -20]
fill 20 64 20 -20 74 -20 lever[face:ceiling] replace tnt
face that into a chain command block (needs redstone, conditional)
fill 20 64 20 -20 74 -20 structure_void keep
thats the first circuit and it summons a lever and destroys the tnt block
repeating command block that runs this command (always active)
execute at @e[type=item,nbt={Item:{id:"minecraft:lever"}}] run summon tnt{Fuse:80}
Chain command block with conditional and needs redstone
kill @e[type=item,nbt={Item:{id:"minecraft:lever"}}] (if you're on a server with essentials it has to be execute run kill @e[type=item,nbt={Item:{id:"minecraft:lever"}}])
and one more block to tie up loose ends
repeating always active command block
fill 20 64 20 -20 74 -20 air replace structure_void
BONUS:Anti TNT mechanism (maybe for anticheat)
repeating command block always active
execute at @e[type=tnt] run setblock ~ ~ ~ tnt]
and a chain command block needs redstone and conditional
kill @e[type=tnt] (on essentials server it needs to be execute run kill @e[type=tnt])
OPTIONAL: put the second chain on top and copy another below with the same settings
execute at @e[type=tnt] run summon item ~ ~ ~ {Item:{id:"minecraft:tnt"}}]
let me know if it worked! i spent an hour of brutal coding and looking up outdated tutorials! more to come if anyone needs it!
If you want a tnt block to turn to a tnt entity, here's the command to run
repeating command block (always active) [specify an arena, lets say its 20 64 20 -20 74 -20]
fill 20 64 20 -20 74 -20 lever[face:ceiling] replace tnt
face that into a chain command block (needs redstone, conditional)
fill 20 64 20 -20 74 -20 structure_void keep
thats the first circuit and it summons a lever and destroys the tnt block
repeating command block that runs this command (always active)
execute at @e[type=item,nbt={Item:{id:"minecraft:lever"}}] run summon tnt{Fuse:80}
Chain command block with conditional and needs redstone
kill @e[type=item,nbt={Item:{id:"minecraft:lever"}}] (if you're on a server with essentials it has to be execute run kill @e[type=item,nbt={Item:{id:"minecraft:lever"}}])
and one more block to tie up loose ends
repeating always active command block
fill 20 64 20 -20 74 -20 air replace structure_void
BONUS:Anti TNT mechanism (maybe for anticheat)
repeating command block always active
execute at @e[type=tnt] run setblock ~ ~ ~ tnt]
and a chain command block needs redstone and conditional
kill @e[type=tnt] (on essentials server it needs to be execute run kill @e[type=tnt])
OPTIONAL: put the second chain on top and copy another below with the same settings
execute at @e[type=tnt] run summon item ~ ~ ~ {Item:{id:"minecraft:tnt"}}]
let me know if it worked! i spent an hour of brutal coding and looking up outdated tutorials! more to come if anyone needs it!
