Skip to content

Commit 41647a7

Browse files
committed
port to 26.3-snapshot-4
1 parent ac4182e commit 41647a7

4 files changed

Lines changed: 23 additions & 9 deletions

File tree

src/main/java/dev/isxander/yacl3/gui/render/BaseRenderState.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
package dev.isxander.yacl3.gui.render;
22

3+
//? if >=26.3 {
4+
/*import com.mojang.renderpearl.api.pipeline.RenderPipeline;
5+
*///?} else {
36
import com.mojang.blaze3d.pipeline.RenderPipeline;
7+
//?}
48
import net.minecraft.client.Minecraft;
59
import net.minecraft.client.gui.GuiGraphicsExtractor;
610
import net.minecraft.client.gui.navigation.ScreenRectangle;

src/main/java/dev/isxander/yacl3/gui/render/YACLGuiElementRenderState.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
package dev.isxander.yacl3.gui.render;
22

3+
//? if >=26.3 {
4+
/*import com.mojang.renderpearl.api.pipeline.RenderPipeline;
5+
*///?} else {
36
import com.mojang.blaze3d.pipeline.RenderPipeline;
7+
//?}
48
import com.mojang.blaze3d.vertex.VertexConsumer;
59
import net.minecraft.client.gui.GuiGraphicsExtractor;
610
import net.minecraft.client.gui.navigation.ScreenRectangle;

src/main/java/dev/isxander/yacl3/gui/utils/KeyUtils.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,21 @@
66
public final class KeyUtils {
77

88
public static boolean hasShiftDown() {
9-
var window = Minecraft.getInstance().getWindow();
10-
return InputConstants.isKeyDown(window, InputConstants.KEY_LSHIFT) ||
11-
InputConstants.isKeyDown(window, InputConstants.KEY_RSHIFT);
9+
return isKeyDown(InputConstants.KEY_LSHIFT) ||
10+
isKeyDown(InputConstants.KEY_RSHIFT);
1211
}
1312

1413
public static boolean hasControlDown() {
15-
var window = Minecraft.getInstance().getWindow();
16-
return InputConstants.isKeyDown(window, InputConstants.KEY_LCONTROL) ||
17-
InputConstants.isKeyDown(window, InputConstants.KEY_RCONTROL);
14+
return isKeyDown(InputConstants.KEY_LCONTROL) ||
15+
isKeyDown(InputConstants.KEY_RCONTROL);
16+
}
17+
18+
public static boolean isKeyDown(int key) {
19+
//? if >=26.3 {
20+
/*return InputConstants.isKeyDown(key);
21+
*///?} else {
22+
return InputConstants.isKeyDown(Minecraft.getInstance().getWindow(), key);
23+
//?}
1824
}
1925

2026
private KeyUtils() {
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
modstitch.platform=fabric-loom
22

3-
mcVersion=26.3-snapshot-1
3+
mcVersion=26.3-snapshot-4
44

5-
deps.fabricApi=0.153.1+26.3
5+
deps.fabricApi=0.155.2+26.3
66

77
meta.mcDep=~26.3-
88

9-
pub.modrinthMC=26.3-snapshot-1
9+
pub.modrinthMC=26.3-snapshot-4
1010
pub.curseMC=26.3-snapshot

0 commit comments

Comments
 (0)