

Finally, we kill (effectively delete) the TNT that”s about to explode so that it doesn”t damage the terrain. This is what will actually cause the explosion effect and damage to players/entities, but since mob griefing is turned off it won”t damage the terrain. The next command summons an invisible fireball at the exact location of the TNT, moving directly downwards, and with the same explosive power of a piece of TNT. The first sets the scoreboard value for the TNTGoBoom objective to 1 for every TNT that”s ready to explode on the next tick. In order of closest to the first two command blocks, the commands you want to use are:Į ~ ~ ~ summon Fireball ~ ~ ~ killĮ Okay, let”s go over those three commands. You”re going to put down three more command blocks adjacent to the redstone blocks (preferably above or below). You should see three more redstone blocks out one side. Funny stuff can start happening if part of a fill clock gets unloaded from memory, but if it”s a spawn chunk or you”re always near the clock, you don”t have to worry. Ideally, this won”t be near a chunk boundary, but mine was and it still worked fine. In the bottom, enter the following command:įill ~ ~1 ~ ~3 ~1 ~ airand in the top one, enter this command:įill ~ ~-1 ~ ~3 ~-1 ~ redstone_blockPut a redstone block between the two, and you have your fill clock. You”ll need two command blocks in a column with an air block separating them.

scoreboard objectives add TNTGoBoom dummyNext, we need to set up a fill clock. The first step is to set up a scoreboard objective to track TNT that”s about to explode: It”s also possible to have the effect, but cause 0 damage to players or other entities, and I”ll add the commands for that at the end. For this to work, you”re still going to want to disable mob griefing, as I”m using ghast fireballs to create the actual explosion. This precludes the strategy I used in the linked answer a 20hz fill clock is pretty much a necessity, whereas I could use a slower, simpler clock in that other answer. The biggest difference here is that everything must happen on the same tick, and it must happen every tick. So this is complicated, but not much worse than preventing a player from crafting a diamond sword. Đang xem: How to disable explosions in minecraft I”ve done /gamerule mobGriefing false but there”s still gonna be TNT block damage. I”m making a map and there”s gonna be a lot of blasting going on and I don”t want it to damage blocks.
