promotional bannermobile promotional banner

StayNight

Permanently locks your Minecraft world at midnight (tick 18000) with zero configuration, overriding all time mechanics client-side and server-side for eternal darkness.

Stay Night - Permanent Midnight Mod

Overview
Stay Night is a lightweight Minecraft mod that forever locks your world at midnight (tick 18000), creating a permanent night atmosphere perfect for horror maps, vampire roleplays, or players who prefer the mysterious ambiance of darkness. This mod seamlessly overrides time mechanics on both client and server sides to maintain eternal night.


Key Features

🌙 True Permanent Night

  • Forces all worlds to remain at 18000 ticks (midnight) regardless of time commands, sleep attempts, or natural cycles.
  • Works in both singleplayer and multiplayer environments.

🛡️ Comprehensive Time Control

  • Intercepts time-setting logic in:
    • World data (PrimaryLevelData, DerivedLevelData)
    • Client/Server level handlers (ClientLevel, ServerLevel)
    • Network time-sync packets (ClientboundSetTimePacket)
  • Blocks all attempts to modify the time of day

Zero Configuration
Instantly works upon installation - no configs or commands needed!

🧩 Compatibility
Compatible with most mods that don't directly alter time mechanics.


Technical Implementation

The mod uses bytecode manipulation to:

  1. Override time setters
    @ModifyVariable(method = "setDayTime", at = @At("HEAD"), argsOnly = true)
    private long stayNight(long dayTime) {
        return 18000L; // Always force midnight
    }
    
  2. Hijack time getters
    @Inject(method = "getDayTime", at = @At("HEAD"), cancellable = true)
    private void stayNight(CallbackInfoReturnable<Long> cir) {
        cir.setReturnValue(18000L); // Always report midnight
    }
    
  3. Patch network synchronization
    Manipulates ClientboundSetTimePacket to prevent servers from overriding the eternal night.

Use Cases

  • Horror/adventure maps requiring permanent darkness
  • Vampire/fantasy roleplay servers
  • Atmospheric builds showcasing night lighting
  • Gameplay challenges without daylight cycles

Logo generated by https://www.doubao.com/chat/, CC BY 4.0

The StayNight Team

profile avatar
  • 69
    Followers
  • 130
    Projects
  • 156.2M
    Downloads

唯假期与 Naruto 不可辜负。

More from _nArUTo_View all

  • Duplicationless project image

    Duplicationless

    • 1.5M
    • Mods

    A lightweight Minecraft library that simplifies JSON configs, block data storage, and entity tracking across chunks and dimensions.

    • 1.5M
    • May 21, 2026
    • Mods
  • DoesPotatoTick? project image

    DoesPotatoTick?

    • 12.7M
    • Mods

    performance mod that don‘t allow entities to tick when they are far from players.

    • 12.7M
    • April 20, 2026
    • Mods
    • +3
  • AutoChangeFight project image

    AutoChangeFight

    • 11.0K
    • Mods

    Epic Fight addon: Get rid of combat mode once your held item is not weapon.

    • 11.0K
    • April 19, 2026
    • Mods
  • ImmersiveForests project image

    ImmersiveForests

    • 2.3K
    • Mods

    Makes trees bigger, fuller, and more impressive

    • 2.3K
    • April 7, 2026
    • Mods
    • +2
  • Duplicationless project image

    Duplicationless

    • 1.5M
    • Mods

    A lightweight Minecraft library that simplifies JSON configs, block data storage, and entity tracking across chunks and dimensions.

    • 1.5M
    • May 21, 2026
    • Mods
  • DoesPotatoTick? project image

    DoesPotatoTick?

    • 12.7M
    • Mods

    performance mod that don‘t allow entities to tick when they are far from players.

    • 12.7M
    • April 20, 2026
    • Mods
    • +3
  • AutoChangeFight project image

    AutoChangeFight

    • 11.0K
    • Mods

    Epic Fight addon: Get rid of combat mode once your held item is not weapon.

    • 11.0K
    • April 19, 2026
    • Mods
  • ImmersiveForests project image

    ImmersiveForests

    • 2.3K
    • Mods

    Makes trees bigger, fuller, and more impressive

    • 2.3K
    • April 7, 2026
    • Mods
    • +2