The title may be vague (but I did that purposely to not make the question too confusing), but I'll explain more specifics/details here.

First of all, I am looking for a method to not just get rid of phantoms, but effectively cease their spawning. I am aware that repeating command blocks and /gamerule doInsomnia (lets you toggle phantom spawning) exist, but I find repeating command blocks to get slightly laggy sometimes, and they also clog up my logs with messages of "unable to run" (basically spamming the logs with useless outputs), and I am playing on 1.14, meaning I do not have access to the phantom-toggle gamerule (I believe it was added in 1.15 19w36a).

Note that I am playing completely vanilla, and to ensure only working answers I'll mention again that this question is only focusing on Java Edition, not bedrock or console.

To be more specific, I am playing version 1.14.4, if this line is needed.

Either a physical method (such as something like insomnia/bed manipulation or something like that) or actual commands would be fine, but if the only solution is through repeating command blocks that kill phantoms, then I will still take it as an answer.

While I do know that I might be able to make a slow redstone clock that periodically kills phantoms, I would prefer a physical solution.

(Side note: I have marked the question as "minecraft-commands", but if this tag does not fit or if the question is missing tags, then feel free to add them.)

  • Note that I mainly need this for random creative mode building, so don't just tell me to "sleep in a bed" (I usually focus on what I'm working on, and I don't really have the time to sleep in a bed every so often, which hinders the efficiency of my work). This basically should imply that a creative-mode exclusive answer will work fine. – UnderratedGoose Jul 18 '20 at 21:13

Another solution is to set game difficulty to Peaceful, either in Settings or with the command /difficulty peaceful or /difficulty 0. According to the Minecraft Wiki article on Difficulty:

No hostile mobs can spawn naturally [in Peaceful mode], except for evokers ‌[Bedrock Edition only], vindicators ‌[Bedrock Edition only], shulkers, hoglins, zoglins, piglins, piglin brutes ‌[upcoming: BE 1.16.20], and the ender dragon. . . . When the difficulty is switched from any other setting to Peaceful, all mobs that are not allowed to spawn on Peaceful are removed from the world.

Since Phantoms are hostile mobs and not listed here as exceptions, they shouldn't be able to spawn naturally.

Of course, if you want to play in a non-Peaceful difficulty in Creative for some reason, you could always switch to Peaceful whenever a Phantom spawns to force it to be immediately removed from the world. However, this would obviously not achieve your stated goal of preventing Phantoms from spawning entirely.


One solution is to keep it always day. Phantoms only spawn at night, according to the Minecraft Wiki article. Just toggle game rule doDaylightCycle to false while it is daytime. Note that this does come with the usual side effects of getting rid of the night.

And even if they do spawn, they are considered undead and will be set on fire in the sunlight.


Repeating /gamerule doInsomnia false becomes laggy.

Gamerules don't need to be repeated. You just set it once and that's that.

Also, one single repeating /gamerule doInsomnia false won't lag your server, unless you're running on severely underpowered hardware (and in that case, that's a whole different problem)

Basically: Just run /gamerule doInsomnia false ONCE and you're done.

  • 1
    Your answer does not account for this part of the question: "I am playing on 1.14, meaning I do not have access to the phantom-toggle gamerule (I believe it was added in 1.15 19w36a)." – Eliza Wilson Jul 20 '20 at 17:36
  • This is a solution, although I am only playing on 1.14 (but this would be useful on 1.15+) – UnderratedGoose Jul 20 '20 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.