Minecraft / Data Packs

Sleepless Nights

  • 9
  • 7
  • comment12
  • playlist_add
  • share
  • more_horiz
avatar Tetrajak
Level 60 : High Grandmaster Modder
100
This data pack prevents any survival player from passing the night using a bed, but will still set the spawn point for a player when they do. Phantoms are only allowed to spawn on nights with a full moon, so you don't always get swarmed when the vanilla insomnia mechanics kick in after 3 nights without sleep.

By default, every night is sleepless, but you can set a minimum and maximum number of safe nights (during which you can sleep) between every sleepless night in the config. You are also able to enable or disable phantoms only being able to spawn on full moons in the config. You can find the configuration file in the data pack's .zip file at "data/sleepless_n/functions/config.mcfunction".

More information about data packs and how to use them can be found on the official Minecraft Wiki.
Progress100% complete
Game VersionMinecraft 1.14

6 Update Logs

Version 7 : 10/11/2019 4:21:13 pmOct 11th

Bugs Fixed
  • Safe night math is incorrect, resulting in less safe nights between sleepless nights than there should be.
  • Sleepless nights can't happen after the first one if min and max safe night numbers are set in the config.
LOAD MORE LOGS

12 replies

1
09/23/2019 10:51 pmhistory
Level 1 : New Miner
Tabulish
Hey, I really want to play on this datapack but I don't know why it isn't working on my Minecraft 1.14.4 world. I did not change anything in config and / or in datapack and I can sleep everynight. I don't know if Phantoms are spawning only at full moon, because I didn't test that out. Also I don't have any other datapack installed and I tested this on three diffrent worlds. I hope I will get answer as soon as possible how to fix it because I want to play. :/ (and sorry for my grammar or anything else, English is not my native language)

Edit: I installed this datapack correctly, I can see this datapack using commands in Minecraft and also I can see this scoreboard objective.
2
09/23/2019 11:03 pm
Level 60 : High Grandmaster Modder
Tetrajak
I'm unable to replicate the issue you're describing. I've created a new 1.14.4 single player world and installed the data pack, and it kicks me out of bed just fine.

Are you running a modded version of Minecraft; like Forge, Bucket, Spigot, Fabric, etc.?
1
09/23/2019 11:07 pm
Level 1 : New Miner
Tabulish
No. I have clear Minecraft 1.14.4, even without OptiFine. Did you test this issue on version that we can download from here? (and also I see that you uploaded new version, so I check that out on this version)
1
09/23/2019 11:13 pm
Level 1 : New Miner
Tabulish
Okay, so everything is working on version from today. Thank you for your answer, keep doing datapacks, good luck!
1
09/23/2019 11:18 pm
Level 1 : New Miner
Tabulish
Also, I noticed one thing. If it's raining or you have thunder in your Minecraft world you can easily reset the weather by trying to sleep. (kicking of the bed makes thunder for one second and then clearing the weather) If you can fix this it will be a lot better.
2
09/23/2019 11:50 pm
Level 60 : High Grandmaster Modder
Tetrajak
That's intentional, thunder for 1 second makes the weather clear for longer, like sleeping normally would. I know it's hacky, but it's better than rain returning later in the day just after you went to bed.

Also, I'm glad the most recent version fixed things for you!
2
09/14/2019 9:06 am
Level 13 : Journeyman Miner
vibe_ch
Do you have a version that only makes it so phantoms spawn on full moons? I like the concept but I also like the ability to sleep. If you don't may it be possible for me to modify your data pack to remove the anti-sleep and publish it myself? I would, of course, give credit
1
09/14/2019 11:41 pm
Level 60 : High Grandmaster Modder
Tetrajak
You're welcome to make and publish a modified version of this data pack, and yes, credit would be appreciated!
3
08/27/2019 12:58 pm
Level 30 : Artisan Lemon
CrayDro
Hey, I dont think I'll play with this datapack by myself, but I realy like the concept :)
And now i want to talk about technical datapack stuff (yeah that's pretty much why I'm commenting here 'cause I'm a nerd)
I saw that you're using the poison effect to get the players out of bed. I played with bed a while ago, and there is something that could be usefull to you i can share.
Instead of poison, that deal damages (and the hurt sound that comes with it), you can teleport the player at the exact place they already were. The player is then out of bed, in a more seamless way :)
I hope it helps you :)
1
08/27/2019 7:12 pm
Level 60 : High Grandmaster Modder
Tetrajak
Thanks for letting me know, I'll have to try that out!
1
08/19/2019 11:22 am
Level 1 : New Miner
Brave_soul
Phantoms spawn because of player insomnia? So phantoms don't actually "exist" in game lore, it is the player going insane from not sleeping? Cool datapack
1
08/19/2019 3:38 pm
Level 60 : High Grandmaster Modder
Tetrajak
In the unmodified game, phantoms only spawn around players who haven't slept for 3 nights. On nights that don't have a full moon, this data pack teleports all unnamed phantoms into the void and kills them, as well as preventing the player from ever passing the night using a bed.

As for the lore behind why phantoms only show up when you've not slept in a while, the wiki quotes a tweet by Jeb that says the phantoms are "attracted to insomnia", so it sounds like they exist naturally in the world, but only come down to attack those who haven't been to bed in a while.

Planet Minecraft

Browse

Site

© 2010 - 2019
www.planetminecraft.com

Welcome