Zrips / CMI

117 stars 99 forks source link

The sleeping speedup feature prevents the dropping of cat gifts #5480

Open TheoRetisch1 opened 3 years ago

TheoRetisch1 commented 3 years ago

Description of issue: The sleeping speedup feature prevents cats from dropping gifts on a regular basis. If the night runs normally, cats drop a gift with a 70% chance. If you place enough cats next to your bed, it is guaranteed that a gift will always be dropped. If you go through the night without a speedup, the cats will drop their gifts normally. If the night is skipped completely, the cats also drop their gifts. If the night is speeded up, the gift process of the cats is usually interrupted and no gifts are dropped.

CONFIG SECTION (DELETE IF NOT RELEVANT):

Sleeping:
  Speedup:
    # When set to true, players can speedup night by sleeping in bed
    # This will allow to speed up night in percentage depending how many players are sleeping in beds in that world
    Enabled: true
    # List of worlds where this should be applied.
    # Keep in mind that time speed up only works on a normal type world and by default you will have only one
    # Set this list to [] if you want to include all possible worlds
    Worlds:
    - weltn
    # When this set to true time will be speed up only between 13000 and 24000 ticks of the day
    # When having this set to false players can speed up day durring storms or other events
    OnlyDurringNight: true
    # Type of speedup information, can be: none, title, bossbar
    InfoType: title
    # When set to true, players who are in afk mode will be excluded from speed calculations
    ExcludeAfk: true
    # Defines speed to go throw night, bigger numbers will make it go faster and less players you will need to go throw night
    # 100 will result in 100 times faster time
    BaseSpeed: 20
    # Defines minimal speed to go throw night, this is in case there are more players than base speed and calculation return default speed
    MinSpeed: 5
    # Minimal amount of players sleeping in beds before speeding it up
    # Can be defined in 2 formats. When using clean number like 3, then 3 players will have to be sleeping before speedup kicks in
    # If amount is defined with % like 50% then half of server population will have to be sleeping before speedup kicks in
    MinBeforeSpeeding: 1
    # When set to true online players will be informed about missing sleeping people count
    Inform: true
    # Time in seconds between information messages can be shown when player starts or stops sleeping
    InformDelay: 30

Cmi Version (using/cmi version): 8.8.3.5

Server Type (Spigot/Paperspigot/etc): Paper

Server Version (using /ver): Paper-586

aerulion commented 3 years ago

We gathered some more information to further specify the cause of the issue: It seems to be caused by the time when the speedup ends. When sleeping in a bed in a vanilla world, the night is always skipped to daytime 0 (which corresponds to 6:00 AM). The end-time of the night speedup seems to fluctuate between ~5:30 AM and 6:00 AM, and therefore only provides cat gifts when the speedup ends near 6:00 AM.

Zrips commented 3 years ago

@aerulion Issue is more related to actual end of sleep cycle where some internal calculations are done when day starts with cats around bed. But as you pointed out this inconsistency with start of the day will make some changes to be more in line that it always starts at same time and just before actual natural kick out of the bed.

aerulion commented 3 years ago

Okay, the time of the bed kick out is now much more consistent, but that leads to the problem that the cats now only drop gifts when the night is skipped entirely, and it never works when using the speedup feature, as compared to before, when it sometimes worked.

aerulion commented 3 years ago

Another Update: Since the change to the kick out time, it is sometimes possible to re-enter the bed after the kickout, and then one will sleep until 6:00 AM and get a cat gift. Why isn't it possible to end the speedup at / shortly before 6:00 AM, so the gifts will be triggered? As far as I can tell it worked every time when I was able to sleep until 6 AM.

TheoRetisch1 commented 3 years ago

The problem still exists in version 1.17.1. I would be very happy about a fix :)

CMI version 9.0.2.5 Paper-327 - MC: 1.17.1

IamTheRichie commented 3 years ago

I have the same problem and would be very happy about a fix!

TheoRetisch1 commented 2 years ago

Confirmed for Paper 1.18.1-169 + CMI 9.1.0.6 Can we still expect a fix?

TheoRetisch1 commented 2 years ago

Confirmed for CMI 9.2.0.0 +Paper 1.18.2 #379.

TheoRetisch1 commented 1 year ago

Confirmed for CMI version 9.3.0.5, CMILib version 1.2.4.1 + git-Paper-366 (MC: 1.19.3). Do you need further information to solve the problem?