mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-17 19:15:32 +00:00
Minecraft is now Unobfuscated and requires Java 25 Lots of changes/code cleanup. See https://github.com/MinecraftForge/MinecraftForge-Experimental/tree/26.1-dev for non-squashed commits. Co-authored-by: Paint_Ninja <[email protected]>
23 lines
643 B
Diff
23 lines
643 B
Diff
--- a/net/minecraft/client/ToggleKeyMapping.java
|
|
+++ b/net/minecraft/client/ToggleKeyMapping.java
|
|
@@ -38,7 +_,7 @@
|
|
@Override
|
|
public void setDown(final boolean down) {
|
|
if (this.needsToggle.getAsBoolean()) {
|
|
- if (down) {
|
|
+ if (down && isConflictContextAndModifierActive()) {
|
|
super.setDown(!this.isDown());
|
|
}
|
|
} else {
|
|
@@ -66,5 +_,10 @@
|
|
|
|
protected void reset() {
|
|
super.setDown(false);
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public boolean isDown() {
|
|
+ return this.isDown && (isConflictContextAndModifierActive() || needsToggle.getAsBoolean());
|
|
}
|
|
}
|