• check_circle Advancements
  • check_circle Functions
  • check_circle Predicates
  • 10,668 views, 1 today
  • 588 downloads, 0 today
  • 18
  • 19
  • 19
Tetrajak avatar Tetrajak
Level 73 : Legendary Modder
284
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.
CompatibilityMinecraft 1.15
toMinecraft 1.16
Tags

9 Update Logs

Version 10 : 06/29/2020 6:55:23 amJun 29th, 2020

Bugs Fixed
  • Quatro lib fails to load scheduled functions when more than 20 are queued.
LOAD MORE LOGS

Create an account or sign in to comment.

2
03/10/2020 10:33 amhistory
Level 1 : New Miner
Leptrig
Leptrig avatar
Great datapack, we use this along with the long days datapack.

Do you think you could add an optional configuration where if its setup to only have phantoms on full moon, you have a simple broadcast message we can choose to enable that occurs saying "The Full Moon and risen."

So players are alerted to the fact phantoms will spawn?
Thought it would be cool to have a "uh-oh" factor added
1
03/11/2020 3:22 am
Level 73 : Legendary Modder
Tetrajak
Tetrajak avatar
The full moon rising announcement has been added in the most recent version! Let me know if it's the sort of thing you were suggesting.
2
03/10/2020 2:52 pm
Level 73 : Legendary Modder
Tetrajak
Tetrajak avatar
Thanks, I'm glad you like it!

That announcement sounds like a great idea! I'll add it (along with a config option to disable it) to my to-do list!
1
03/04/2020 3:28 pmhistory
Level 21 : Expert Engineer
Loumardes
Loumardes avatar
An other tecnical comment :

You might find even more seamless to use the "doInsomnia" gamerule to desactivate Phantom spawn

Also, I am the kind of people finding anoying to NEED SLEEPING due to phantoms, and what I will likely do, is making a datapack to invert their spawn rates, and making them chasing people sleeping too often
1
03/04/2020 11:36 pm
Level 73 : Legendary Modder
Tetrajak
Tetrajak avatar
I previously used doInsomnia false, but it turns out that doesn't actually govern phantom spawning, it just controls whether players gain insomnia by not sleeping.
1
03/02/2020 11:19 am
Level 40 : Master Spelunker
noatryy
noatryy avatar
For some reason, this brings back memories of not being able to sleep
1
03/02/2020 11:49 pm
Level 73 : Legendary Modder
Tetrajak
Tetrajak avatar
That's what I'm aiming for; a time before beds, when the challenges of building also included protecting yourself.
1
09/23/2019 10:51 pmhistory
Level 1 : New Miner
Tabulish
Tabulish avatar
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 73 : Legendary Modder
Tetrajak
Tetrajak avatar
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
Tabulish avatar
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
Tabulish avatar
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
Tabulish avatar
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 73 : Legendary Modder
Tetrajak
Tetrajak avatar
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 1 : New Crafter
Munky3164
Munky3164 avatar
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 73 : Legendary Modder
Tetrajak
Tetrajak avatar
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 40 : Master Engineer
Cray_On
Cray_On avatar
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 73 : Legendary Modder
Tetrajak
Tetrajak avatar
Thanks for letting me know, I'll have to try that out!
1
08/19/2019 11:22 am
Level 29 : Expert Dragon
Quip Nytherum
Quip Nytherum avatar
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 73 : Legendary Modder
Tetrajak
Tetrajak avatar
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

Website

© 2010 - 2021
www.planetminecraft.com

Welcome