-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backport playersSleepingPercentage gamerule and implement #162
base: master
Are you sure you want to change the base?
Conversation
This is now disabled by default for the time being, to keep default compatibility with EFR, however we will want to change this to be enabled in the GTNH specific config by default. It will also ignore AFK players in the percentage calculation of players sleeping. |
Warning: 2 uncommitted changes |
I've tested this on my own server now with GTNH 2.7.0. Ignoring AFK players works, and broadly everything seems to work. |
@@ -23,7 +22,10 @@ public enum Mixins { | |||
REPLACE_TAB_NAMES(new Builder("Replace tab menu names").addTargetedMod(VANILLA).setSide(Side.CLIENT) | |||
.setPhase(Phase.EARLY).addMixinClasses("forge.MixinGuiIngameForge")), | |||
VANILLA_TP_BACK_COMPAT(new Builder("/back compat for the vanilla /tp").addTargetedMod(VANILLA).setSide(Side.BOTH) | |||
.setPhase(Phase.EARLY).setApplyIf(() -> commands.back).addMixinClasses("minecraft.MixinCommandTeleport")),; | |||
.setPhase(Phase.EARLY).setApplyIf(() -> commands.back).addMixinClasses("minecraft.MixinCommandTeleport")), | |||
PLAYERS_SLEEPING_PERCENTAGE(new Builder("Player Sleeping Percentage").addTargetedMod(VANILLA).setSide(Side.BOTH) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a scenario where this feature is useful in SP since the mixin is also applied client-side?
I'm not a big fan of it printing two additional chat messages whenever you sleep in SP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe Open to lan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it need to apply on both in order to work with open to lan? I don't particularly care about supporting that feature, but that's the only use case I can think of. Otherwise it could be changed to server only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turning off the chat notifications when there's only one player present could also work to prevent unnecessary messages in SP, but I don't really care much for lan either so changing it to server only is also fine by me.
@Cleptomania any update on this? |
This backports the gamerule
playersSleepingPercentage
from Minecraft 1.17+, and adds an implementation for that with a mixin. It produces chat outputs identical to that of Morpheus.With this merged, assuming we keep it enabled by default like it is in the PR currently, we will want to remove Morpheus from the pack, as this will potentially conflict with it's functionality. (get outta here ARR mods)
This will also conflict with the feature in Et Futurum Requiem, players installing both will need to disable this feature in one of the mods. We could potentially add a check to see if it's installed and enabled in Et Futurum Requiem here(or maybe vice versa in EFR).