Skip to content

Commit e98645c

Browse files
fix MC-123605
1 parent e4c2c56 commit e98645c

3 files changed

Lines changed: 22 additions & 0 deletions

File tree

PATCHED.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
| Basic | [MC-119754](https://bugs.mojang.com/browse/MC-119754) | Firework boosting on elytra continues in spectator mode |
4747
| Basic | [MC-121706](https://bugs.mojang.com/browse/MC-121706) | Skeletons and illusioners aren't looking up / down at their target while strafing |
4848
| Basic | [MC-121903](https://bugs.mojang.com/browse/MC-121903) | Command block minecarts do not save execution cooldown to NBT |
49+
| Basic | [MC-123605](https://bugs.mojang.com/browse/MC-123605) | Debug world still sets clear weather time instead of deactivating gamerule doWeatherCycle |
4950
| Basic | [MC-129909](https://bugs.mojang.com/browse/MC-129909) | Players in spectator mode continue to consume foods and liquids shortly after switching game modes |
5051
| Basic | [MC-132878](https://bugs.mojang.com/browse/MC-132878) | Armor stands destroyed by explosions/lava/fire don't produce particles |
5152
| Basic | [MC-155509](https://bugs.mojang.com/browse/MC-155509) | Puffed pufferfish can hurt the player while dying |
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package dev.isxander.debugify.mixins.basic.mc123605;
2+
3+
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
4+
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
5+
import dev.isxander.debugify.fixes.BugFix;
6+
import dev.isxander.debugify.fixes.FixCategory;
7+
import net.minecraft.server.MinecraftServer;
8+
import net.minecraft.world.level.GameRules;
9+
import net.minecraft.world.level.storage.ServerLevelData;
10+
import org.spongepowered.asm.mixin.Mixin;
11+
import org.spongepowered.asm.mixin.injection.At;
12+
13+
@BugFix(id = "MC-123605", category = FixCategory.BASIC, env = BugFix.Env.SERVER, description = "Debug world still sets clear weather time instead of deactivating gamerule doWeatherCycle")
14+
@Mixin(MinecraftServer.class)
15+
public class MinecraftServerMixin {
16+
@WrapOperation(method = "setupDebugLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/storage/ServerLevelData;setClearWeatherTime(I)V"))
17+
private void disableDebugWorldWeather(ServerLevelData instance, int i, Operation<Void> original) {
18+
instance.getGameRules().getRule(GameRules.RULE_WEATHER_CYCLE).set(false, (MinecraftServer) (Object) this);
19+
}
20+
}

src/main/resources/debugify.mixins.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"basic.mc119754.FireworkRocketEntityMixin",
1515
"basic.mc121706.RangedBowAttackGoalMixin",
1616
"basic.mc121903.MinecraftCommandBlockMixin",
17+
"basic.mc123605.MinecraftServerMixin",
1718
"basic.mc129909.ServerPlayerMixin",
1819
"basic.mc132878.ArmorStandMixin",
1920
"basic.mc155509.PufferfishMixin",

0 commit comments

Comments
 (0)