Skip to content

Type to search across every guide and reference page.

GuidesBoth · 26.x

How to Make It Nighttime in Minecraft With /time set

Type /time set night, or /time set midnight for full dark, with cheats on. How to make it nighttime in Minecraft, freeze the night, and why beds can't.

By minecraft.bd Editorial Team·Updated

With cheats on, type /time set night in chat and the world jumps to nightfall instantly. Use /time set midnight if you want full darkness. Both commands work the same in Java and Bedrock. In plain survival with cheats off, there’s no button: you wait for the sun to go down.

The commands

Command Tick value What you get
/time set night 13000 Early night, sky just dark, mobs start spawning
/time set midnight 18000 Middle of the night, moon overhead
/time set 23000 23000 Just before sunrise
/time add 12000 +12000 Skips half a day from wherever you are

A full day is 24,000 ticks, or 20 minutes of real time. Our time and weather command page covers the rest of the syntax, including /time query.

Keeping it night

To lock the world at night, set the time first, then stop the clock:

/time set midnight
/gamerule advance_time false

The game rule’s name depends on your version. Java 1.21.11 renamed it to advance_time; on older Java versions it’s doDaylightCycle, and Bedrock still uses dodaylightcycle. Run it again with true to restart the cycle. On Java 26.1 and later there’s a shortcut too: /time pause stops the clock and /time resume starts it again.

Turning cheats on

The commands only work if cheats are allowed:

  • Java single player: open the pause menu, choose Open to LAN, turn on Allow Cheats, and start the LAN world. This lasts until you leave.
  • Bedrock: in world settings, turn on Cheats. Bedrock warns you that this disables achievements for that world, permanently.
  • Servers and Realms: you need operator permissions.

If you’re new to this, see our list of beginner cheat codes. Creative mode on its own doesn’t let you use commands; that’s controlled by the cheats setting, not by the game mode.

Waiting it out in survival

A Minecraft day runs about 10 minutes of daylight, then a sunset of around a minute and a half, then roughly 7 minutes of night. If it’s daytime and you need night (for spider eyes, a creeper hunt or a mob farm test), just keep working; it comes around fast.

A bed does the opposite of what you want. Sleeping skips the night and wakes you at dawn. You can only sleep once it’s already dark or during a thunderstorm, so a bed can never bring night forward.

What changes at night

Hostile mobs spawn on the surface in darkness and stay until sunrise, when zombies and skeletons burn. Spiders become hostile. If you haven’t slept for three in-game days, phantoms start diving at you from the sky. Turning the clock to midnight on purpose is a good way to test your base lighting: walk around for a couple of minutes and see where things spawn.

More command and world tricks are collected in the guides hub.

Common questions

What time is night in Minecraft ticks?

/time set night sets the clock to 13000, and /time set midnight to 18000. A full day is 24000 ticks, or 20 real minutes.

Can I make it night without cheats?

Not instantly. You have to wait for the day cycle. In a single-player world you can open it to LAN with cheats allowed in Java, or turn cheats on in Bedrock world settings, but that marks the world.

How do I keep it night forever?

Set the time to night, then stop the clock with a game rule: /gamerule advance_time false in Java 1.21.11 and later, /gamerule doDaylightCycle false in older Java, or /gamerule dodaylightcycle false in Bedrock.

Sources & verification

Facts on this page are checked against these references and in-game behavior for the stated edition(s). how we verify.

Keep reading