Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .bugs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ patched 268420 client basic
patched 280220 client basic
patched 298225 client basic
patched 298558 client basic
patched 256850 client basic
patched 263293 client basic
patched 301281 client basic
previous 259812 26.3-snapshot-2

patched 7569 server basic
patched 8187 server gameplay
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright (C) 2026 The Debugify Contributors
*
* SPDX-License-Identifier: LGPL-3.0-or-later
*/
package dev.isxander.debugify.client.mixins.basic.mc256850;

import com.llamalad7.mixinextras.injector.ModifyReturnValue;
import dev.isxander.debugify.fixes.BugFix;
import dev.isxander.debugify.fixes.FixCategory;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.piston.MovingPistonBlock;
import net.minecraft.world.level.block.state.BlockBehaviour;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;

@BugFix(id = "MC-256850", category = FixCategory.BASIC, env = BugFix.Env.CLIENT, description = "Prevent moving pistons from being treated as full collision blocks")
@Mixin(BlockBehaviour.BlockStateBase.class)
public abstract class BlockStateBaseMixin {
@Shadow
public abstract Block getBlock();

@ModifyReturnValue(method = "isCollisionShapeFullBlock", at = @At("RETURN"))
private boolean debugify$movingPistonsAreNotFullBlocks(boolean original) {
return getBlock() instanceof MovingPistonBlock ? false : original;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright (C) 2026 The Debugify Contributors
*
* SPDX-License-Identifier: LGPL-3.0-or-later
*/
package dev.isxander.debugify.client.mixins.basic.mc263293;

import dev.isxander.debugify.fixes.BugFix;
import dev.isxander.debugify.fixes.FixCategory;
import net.minecraft.client.player.LocalPlayer;
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;

@BugFix(id = "MC-263293", category = FixCategory.BASIC, env = BugFix.Env.CLIENT, description = "Dying causes toggle sprint and toggle sneak to untoggle")
@Mixin(LocalPlayer.class)
public abstract class LocalPlayerMixin {
@Inject(method = "respawn", at = @At("HEAD"))
private void debugify$beginRespawn(CallbackInfo ci) {
MC263293.respawning = true;
}

@Inject(method = "respawn", at = @At("TAIL"))
private void debugify$endRespawn(CallbackInfo ci) {
MC263293.respawning = false;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright (C) 2026 The Debugify Contributors
*
* SPDX-License-Identifier: LGPL-3.0-or-later
*/
package dev.isxander.debugify.client.mixins.basic.mc263293;

public final class MC263293 {
private MC263293() {
}

public static boolean respawning;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright (C) 2026 The Debugify Contributors
*
* SPDX-License-Identifier: LGPL-3.0-or-later
*/
package dev.isxander.debugify.client.mixins.basic.mc263293;

import dev.isxander.debugify.fixes.BugFix;
import dev.isxander.debugify.fixes.FixCategory;
import net.minecraft.client.ToggleKeyMapping;
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;

@BugFix(id = "MC-263293", category = FixCategory.BASIC, env = BugFix.Env.CLIENT, description = "Dying causes toggle sprint and toggle sneak to untoggle")
@Mixin(ToggleKeyMapping.class)
public abstract class ToggleKeyMappingMixin {
@Inject(method = "reset", at = @At("HEAD"), cancellable = true)
private void debugify$preserveToggleStateDuringRespawn(CallbackInfo ci) {
if (MC263293.respawning) {
ci.cancel();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright (C) 2026 The Debugify Contributors
*
* SPDX-License-Identifier: LGPL-3.0-or-later
*/
package dev.isxander.debugify.client.mixins.basic.mc301281;

import com.mojang.blaze3d.platform.InputConstants;
import net.minecraft.client.KeyMapping;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;

@Mixin(KeyMapping.class)
public interface KeyMappingAccessor {
@Accessor("key")
InputConstants.Key debugify$getKey();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright (C) 2026 The Debugify Contributors
*
* SPDX-License-Identifier: LGPL-3.0-or-later
*/
package dev.isxander.debugify.client.mixins.basic.mc301281;

import com.mojang.blaze3d.platform.InputConstants;
import dev.isxander.debugify.fixes.BugFix;
import dev.isxander.debugify.fixes.FixCategory;
import java.util.Map;
import net.minecraft.client.KeyMapping;
import org.lwjgl.sdl.SDLMouse;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@BugFix(id = "MC-301281", category = FixCategory.BASIC, env = BugFix.Env.CLIENT, description = "Restore mouse button states after closing screens")
@Mixin(KeyMapping.class)
public abstract class KeyMappingMixin {
@Shadow
@Final
private static Map<String, KeyMapping> ALL;

@Inject(method = "restoreToggleStatesOnScreenClosed", at = @At("HEAD"))
private static void debugify$restoreMouseButtonStates(CallbackInfo ci) {
int buttons = SDLMouse.SDL_GetMouseState(null, null);
for (KeyMapping mapping : ALL.values()) {
InputConstants.Key key = ((KeyMappingAccessor) mapping).debugify$getKey();
if (key.getType() != InputConstants.Type.MOUSE) continue;

int mask = 1 << (key.getValue() - 1);
mapping.setDown((buttons & mask) != 0);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright (C) 2026 The Debugify Contributors
*
* SPDX-License-Identifier: LGPL-3.0-or-later
*/
package dev.isxander.debugify.client.mixins.basic.mc301281;

import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import com.mojang.blaze3d.platform.InputConstants;
import dev.isxander.debugify.fixes.BugFix;
import dev.isxander.debugify.fixes.FixCategory;
import net.minecraft.client.ToggleKeyMapping;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;

@BugFix(id = "MC-301281", category = FixCategory.BASIC, env = BugFix.Env.CLIENT, description = "Restore mouse-bound toggle keys after closing a screen")
@Mixin(ToggleKeyMapping.class)
public abstract class ToggleKeyMappingMixin {
@WrapOperation(
method = "shouldRestoreStateOnScreenClosed",
at = @At(
value = "INVOKE",
target = "Lcom/mojang/blaze3d/platform/InputConstants$Key;getType()Lcom/mojang/blaze3d/platform/InputConstants$Type;"
)
)
private InputConstants.Type debugify$allowMouseToggleRestore(InputConstants.Key key, Operation<InputConstants.Type> original) {
return InputConstants.Type.KEYBOARD;
}
}
12 changes: 9 additions & 3 deletions src/client/resources/debugify.client.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,18 @@
"basic.mc80859.AbstractContainerScreenMixin",
"basic.mc90683.ClientPacketListenerMixin",
"basic.mc93384.LivingEntityMixin",
"gameplay.mc159163.ClientPacketListenerMixin"
"gameplay.mc159163.ClientPacketListenerMixin",
"basic.mc256850.BlockStateBaseMixin",
"basic.mc263293.LocalPlayerMixin",
"basic.mc263293.ToggleKeyMappingMixin",
"basic.mc301281.ToggleKeyMappingMixin",
"basic.mc301281.KeyMappingMixin"
],
"mixins": [
"basic.mc118740.PlayerMixin",
"basic.mc176559.ItemStackAccessor",
"basic.mc188359.CakeBlockMixin",
"basic.mc188359.ConsumableMixin"
"basic.mc188359.ConsumableMixin",
"basic.mc301281.KeyMappingAccessor"
]
}
}