File tree Expand file tree Collapse file tree
src/main/java/dev/isxander/yacl3/gui Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package dev .isxander .yacl3 .gui .render ;
22
3+ //? if >=26.3 {
4+ /*import com.mojang.renderpearl.api.pipeline.RenderPipeline;
5+ */ //?} else {
36import com .mojang .blaze3d .pipeline .RenderPipeline ;
7+ //?}
48import net .minecraft .client .Minecraft ;
59import net .minecraft .client .gui .GuiGraphicsExtractor ;
610import net .minecraft .client .gui .navigation .ScreenRectangle ;
Original file line number Diff line number Diff line change 11package dev .isxander .yacl3 .gui .render ;
22
3+ //? if >=26.3 {
4+ /*import com.mojang.renderpearl.api.pipeline.RenderPipeline;
5+ */ //?} else {
36import com .mojang .blaze3d .pipeline .RenderPipeline ;
7+ //?}
48import com .mojang .blaze3d .vertex .VertexConsumer ;
59import net .minecraft .client .gui .GuiGraphicsExtractor ;
610import net .minecraft .client .gui .navigation .ScreenRectangle ;
Original file line number Diff line number Diff line change 66public 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 () {
Original file line number Diff line number Diff line change 11modstitch.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
77meta.mcDep =~26.3-
88
9- pub.modrinthMC =26.3-snapshot-1
9+ pub.modrinthMC =26.3-snapshot-4
1010pub.curseMC =26.3-snapshot
You can’t perform that action at this time.
0 commit comments