#Sleep - player amount required to sleep >2 = solos cant sleep

1 messages · Page 1 of 1 (latest)

long plover
#

Issue: When the required amount of players is set to >1 then solo players or any amount of players < the amount players set cannot sleep. They lie in bed but nothing will happen.

Suggestion: Either simply ensure that if there is less players than the required amount on the server, that the set amount is ignored, or change the "required amount" = to a percentage, rather than a round number of players.

Say 34% of players would,

  • with 1 player = 1 player required to sleep
  • with 2 players = 1 player
  • 3 players = 1 player
  • 4 players = 2 players required to sleep
    etc

As right now when setting it to say, 3 players-

  • with 1 player on the server, that player can never sleep.
  • with 2 players on the server, regardless of what these 2 do, they cannot sleep.
  • with 3 players on the server, all 3 need to sleep.

Essentially, I believe it'd be easier to simply mimick the game rule's behaviour of using a percentage.
Perhaps the game rule could be used to configure the percentage in the first place?
Otherwise, having a config file to sort this out would also work I suppose.
The scoreboard setup seems to be a bit clunky? I don't really mind it, I suppose, but it's a bit unintuitive. But that might be preference.

cosmic shore
#

Absolutely did not think of that! Thank you!!

cosmic shore
#

Have to find a good way on how to do it, I can't just use the gamerule as my datapacks works in a way where I skip the time based on how long a player is in a bed

long plover
#

That's an interesting way to do it lol

#

well, at least now you know Salute

#

If its set to 1 (default) it works perfectly fine at least

storm thunder
#

The way the pack or let’s say the Gamerule works is that you can only set the percentage of how many players need to sleep. For any value above 100 the night can’t be skipped by sleeping. Any value below 1 and the night can’t be skipped because you need less that 1% of players to sleep and this is impossible…

#

So basically this value is set always to 101 so that we can control how long a player needs to sleep before the night gets skipped. That way we can also control how many players need to sleep simultaneously.

#

I would suggest that we could specify the amount of players that need to sleep as count instead of a percentage.

cosmic shore
#

Yup, im just adding that when theres only one player left, the night can still be skipped