-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: morpheus not properly waking players, not awarding buffs for sle…
…eping (#412) * fix: morpheus not properly waking players * refactor: move from accessor to access transformer * address reviews --------- Co-authored-by: Martin Robertz <[email protected]>
- Loading branch information
1 parent
3e494dc
commit bbec8c1
Showing
6 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/main/java/com/mitchej123/hodgepodge/mixins/late/morpheus/MixinMorpheusWakePlayers.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.mitchej123.hodgepodge.mixins.late.morpheus; | ||
|
||
import net.minecraft.world.World; | ||
import net.minecraft.world.WorldServer; | ||
import net.quetzi.morpheus.SleepChecker; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
@Mixin(value = SleepChecker.class, remap = false) | ||
public class MixinMorpheusWakePlayers { | ||
|
||
@Inject( | ||
method = "advanceToMorning", | ||
at = @At( | ||
value = "INVOKE", | ||
target = "Lnet/minecraft/world/WorldProvider;resetRainAndThunder()V", | ||
shift = At.Shift.BEFORE, | ||
remap = true)) | ||
private void hodgepodge$fixWakePlayers(World world, CallbackInfo c) { | ||
if (!(world instanceof WorldServer worldServer)) return; | ||
worldServer.wakeAllPlayers(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters