Potion that hurts all mobs

I want to be able to summon a potion that can hurt all mobs, undead or alive. I currently summon potions of harming to kill mobs, but that only affects creepers, spiders, etc. If there is a way to use command blocks to damage mobs directly, or some other alternative, please feel free to say it.
If I'm going to use potions, do you know how to get rid of the particles without the user doing so?
Best Answer
There is no potion that kill/damage all mobs, there is only damage or heal and some work on one mob and some work on another mob.
Pictures about "Potion that hurts all mobs"



What potions hurt mobs Minecraft?
Potions of Healing and potions of Harming have the opposite effects on undead mobs, such as skeletons or zombies. Potions of Healing hurt them, and Harming heals them. In addition, undead mobs are not affected by Poison or Regeneration.Do potions of harming hurt mobs?
Harming potion hurt undead mobs.What potions work on mobs?
Splash potions of harming will heal undead mobs, such as zombies, skeletons, and zombie pigmen, and splash potions of healing will harm them like their negative counterparts.Which potion does the most damage?
The Potion of poison II deals an extra heart of damage. So the potion that has the glowstone dust will do the most damage. However the potions will not kill players or monsters. The longer duration one (lasting an astounding 2 minutes) deals over 48 hearts of damage.More answers regarding potion that hurts all mobs
Answer 2
You could use this:
/kill @e[type=Entity]
Do note, the above solution will kill all entities, including dropped items. This will also kill you, the player as well. If you don't want that, the below solution works as well:
/kill @e[type=!Player]
Answer 3
If you want to make them take damage progressively, the best option is probably poisoning them selectively. This idea makes use of the fact that undead entities revert not only the result of poisoning/harming effects, but also the ones of healing effects.
Thus, for each "normal" entity type (Creeper
, Spider
etc.), you would do:
/effect @e[type=TheType] minecraft:poison desiredDuration desiredAmplifier
And for undead entity types (Zombie
, Skeleton
etc.), you would do:
/effect @e[type=TheType] minecraft:regeneration desiredDuration desiredAmplifier
Also works with healing. IDs are minecraft:instant_damage
for harming and minecraft:instant_health
for healing (i.e. harming the undead). Not sure right now what you need to put for the duration there, 0 is the only thing that makes sense though.
Note that, while harming heals undead monsters as much as it harms other monsters, healing deals more damage to them than normal monsters are healed. In fact, it deals as much damage to them as harming to other monsters.
For removing the particles, just add {ShowParticles:0b}
at the end of the command. (I think that does work with the effect
command as well, not quite sure though. It definitely works when applying effects via NBT, so if everything else fails, you could make that work by calling the entitydata
command.)
Answer 4
You can use the wither effect to act as a poison that can kill any entity, but there is also the alternate poison effectt called fatal_poison, which is the same as poison but it doesn’t stop at any point, even if it kills the entity
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: RODNAE Productions, murat esibatir, Pixabay, cottonbro