File tree Expand file tree Collapse file tree 2 files changed +9
-11
lines changed
src/main/java/com/circulation/random_complement/client/handler Expand file tree Collapse file tree 2 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ show_testing_output = false
1616
1717# Mod Information
1818# HIGHLY RECOMMEND complying with SemVer for mod_version: https://semver.org/
19- mod_version = 1.9.0
19+ mod_version = 1.9.1
2020root_package = com.circulation
2121mod_id = random_complement
2222mod_name = RandomComplement
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ public void onClientTick(TickEvent.ClientTickEvent event) {
6363 public static boolean work (boolean isMouse ) {
6464 if (mc .player == null ) return false ;
6565 int eventKey ;
66- int m = 0 ;
66+ int m ;
6767 if (isMouse ) {
6868 m = Mouse .getEventButton ();
6969 eventKey = m - 100 ;
@@ -92,16 +92,14 @@ public static boolean work(boolean isMouse) {
9292
9393 int idx = gui .getTooltip () + viewStart ;
9494 if (idx < Math .min (viewEnd , gui .getVisual ().size ())) {
95- Minecraft .getMinecraft ().addScheduledTask (() -> {
96- int idx2 = gui .getTooltip () + gui .invokerGetScrollBar ().getCurrentScroll () * 3 ;
97- if (idx2 < gui .getVisual ().size ()) {
98- val item = gui .getVisual ().get (idx2 );
99- if (item != null ) {
100- RandomComplement .NET_CHANNEL .sendToServer (new InterfaceTracing (item ));
101- }
95+ int idx2 = gui .getTooltip () + gui .invokerGetScrollBar ().getCurrentScroll () * 3 ;
96+ if (idx2 >= 0 && idx2 < gui .getVisual ().size ()) {
97+ val item = gui .getVisual ().get (idx2 );
98+ if (item != null ) {
99+ RandomComplement .NET_CHANNEL .sendToServer (new InterfaceTracing (item ));
100+ return true ;
102101 }
103- });
104- return true ;
102+ }
105103 }
106104
107105 return false ;
You can’t perform that action at this time.
0 commit comments