Started by
Trehmor
on
Topic category: Help with Minecraft modding (Java Edition)
I wan to know if there is any way to disable player from sleeping, like when there are monsters nearby, or interrupt the sleeping process.
Edited by Trehmor on Fri, 07/31/2020 - 17:37
You can disable player sleeping in custom dimensions, but Im not sure if changing original vanilla code would be possible.
Global trigger player goes to sleep and cancel it under your conditions.
Check this video to see how to cancel events, it is explained in it: https://www.youtube.com/watch?v=j3hePF6ZaqA
Thank you so much Klemen, love this software :D
Sooo it doesnt let you cancel the "player goes to sleep" Global trigger..
it does. if player goes to bes, then put a cancel global procedure.
if you dont wanna do global procedures, you can just check if the entity is sleeping on tick, if it is, make them unsleep. both options will work.
It isnt wth are u on about
"the selected global trigger is not cancellable"
how do you even make them unsleep
woah woah woah, let’s not get too feisty-
the issue your having is probably with your version of mcreator, or if your using a generator, like fabric, which isn’t able to cancel all global procedures.
to check if an entity is sleeping, it’s under entity dat.
im using the latestversion but it still doesnt let me
I only use forge 1.18.2 2022.3
https://pasteboard.co/wHQMjur0Nr59.jpg
maybe instead of using global procedures, check if the player is sleeping. if it is, maybe set it to a time in which players cant sleep?
well that would be kinda odd and would basically still do the same thing if you were to sleep which is to skip the night
I wanted it so that you couldnt skip the night (and I dont want it so that its perma night)