Disable sleeping

Started by Trehmor on

Topic category: Help with modding (Java Edition)

Last seen on 17:39, 15. Jan 2024
Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Disable sleeping
Fri, 07/31/2020 - 17:37 (edited)

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
Last seen on 16:47, 29. Oct 2023
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can disable player…
Fri, 07/31/2020 - 21:19

You can disable player sleeping in custom dimensions, but Im not sure if changing original vanilla code would be possible.

Last seen on 17:39, 15. Jan 2024
Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you so much Klemen,…
Sat, 08/01/2020 - 17:24

Thank you so much Klemen, love this software :D

Last seen on 11:25, 27. Aug 2023
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sooo it doesnt let you…
Mon, 12/05/2022 - 12:16

Sooo it doesnt let you cancel the "player goes to sleep" Global trigger..

Last seen on 03:50, 24. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
it does. if player goes to…
Mon, 12/05/2022 - 14:54

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.

Last seen on 11:25, 27. Aug 2023
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It isnt wth are u on about 
Thu, 12/08/2022 - 11:53

It isnt wth are u on about 

Last seen on 11:25, 27. Aug 2023
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
"the selected global trigger…
Thu, 12/08/2022 - 11:55

"the selected global trigger is not cancellable"

Last seen on 11:25, 27. Aug 2023
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how do you even make them…
Thu, 12/08/2022 - 11:56

how do you even make them unsleep

Last seen on 03:50, 24. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
woah woah woah, let’s not…
Thu, 12/08/2022 - 12:27

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.

Last seen on 11:25, 27. Aug 2023
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
im using the latestversion…
Sat, 12/17/2022 - 09:02

im using the latestversion but it still doesnt let me

 

Last seen on 11:25, 27. Aug 2023
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I only use forge 1.18.2 2022…
Sat, 12/17/2022 - 09:05

I only use forge 1.18.2 2022.3
 

Last seen on 03:50, 24. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
maybe instead of using…
Sat, 12/17/2022 - 15:30

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?

Last seen on 11:25, 27. Aug 2023
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
well that would be kinda odd…
Sat, 12/17/2022 - 23:52

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)