How can I prevent fireballs from setting fire?

How can I prevent fireballs from setting fire? - From above of different bottle shadows with bright liquids and caps in row on smooth surface

I was wondering if you are able to summon a fireball that has ExplosionPower, and thus does damage to players/mobs, but does not set fire to blocks.

To summon the fireball I use: /summon Fireball ~1 ~1 ~1 {direction:[0.0,0.0,0.0],ExplosionPower:3}.

I found something like event.setFire(false), but how can I add this to the summon command?



Best Answer

The example you gave at event.setFire(false) is used in Event inside the Spigot API (Plugin programming). This solution is more eligible in terms of Vanilla.


First, create two dummy-type scoreboard objectives. For this example, let's call them "A" and "C":

scoreboard objectives add A dummy
scoreboard objectives add C dummy

On a 20 Hz clock, run these commands in this order:

execute @e[score_A_min=0,type=FireBall] ~ ~ ~ summon ArmorStand ~ ~ ~ {DisplayName:"B", DisplayNameVisible:false}
scoreboard players set @e[type=FireBall,score_A=0] A 1
tp @e[type=ArmorStand,name=B,c=1] @e[score_A_min=1]

execute @e[type=FireBall] ~ ~ ~ scoreboard players set @e[type=ArmorStand,name=B,c=1,r=0] C 1
execute @e[type=ArmorStand,name=B,score_C=0] ~ ~ ~ fill ~-6 ~-6 ~-6 ~6 ~6 ~6 air 0 replace fire
kill @e[type=ArmorStand,name=B,score_C=0]
scoreboard players set @e[type=ArmorStand,name=B] C 0

To track down the FireBall's location, we summon an ArmorStand with no HitBox, and set his name to anything. For this answer, we'll call it "B" (Name will not be shown). After the summon, we set the FireBall's A score to 1, and will teleport the ArmorStand to it every tick.

Execute as the FireBall to set the closest ArmorStand's C score to 1.

Let's make any ArmorStand with 0 score of C to transform nearby fire to air, since that would mean that the FireBall is dead (exploded). Aftward, we kill the ArmorStand. In order to that work, we also will have to set all the ArmorStands to 0 at the end.




Pictures about "How can I prevent fireballs from setting fire?"

How can I prevent fireballs from setting fire? - Set of blood test vials arranged on pink table
How can I prevent fireballs from setting fire? - Top view of pink ribbon representing cancer placed on yellow background among glass test tubes and flasks in light studio
How can I prevent fireballs from setting fire? - Top view set of syringes with purple colored liquid medicine arranged on pink background as background



Quick Answer about "How can I prevent fireballs from setting fire?"

  • I believe if you set MobGriefing to false, it will make ghast fireballs not set fire. ...
  • Setting MobGriefing to false does work, but also cancels out the explosion, so you might as well just set the ExplosionPower to 0, still causing damage to players/mobs.


  • How much damage does a fireball do in Minecraft?

    A fireball, if deflected by the player, deals 1000 damage to a ghast.

    How do fireballs spawn?

    How to Enter the Command
  • Open the Chat Window. The easiest way to run a command in Minecraft is within the chat window.
  • Type the Command. In this example, we are going to summon a fireball in Minecraft Java Edition (PC/Mac) 1.18 with the following command: /summon fireball ~ ~1 ~




  • Pro Tip: How To Keep Fire Balls On The Hook In Fast Water




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: Jill Burrow, Alena Shekhovtcova, Tara Winstead, Alena Shekhovtcova