File tree Expand file tree Collapse file tree
java/vavi/games/input/listener Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66 <groupId >vavi</groupId >
77 <artifactId >vavi-apps-hub</artifactId >
8- <version >0.0.4 </version >
8+ <version >0.0.5 </version >
99
1010 <properties >
1111 <javapackager .name>Hub</javapackager .name>
7171
7272 <additionalResources >
7373 <additionalResource >${project.build.resources[0].directory} /logging.properties</additionalResource >
74+ <additionalResource >${project.build.resources[0].directory} /minecraft.properties</additionalResource >
7475 <additionalResource >${project.build.resources[0].directory} /static</additionalResource >
7576 <additionalResource >local.properties</additionalResource >
7677 </additionalResources >
176177 <dependency >
177178 <groupId >com.github.umjammer</groupId > <!-- vavi / com.github.umjammer -->
178179 <artifactId >vavi-awt-joystick</artifactId >
179- <version >0.0.11 </version >
180+ <version >0.0.12 </version >
180181 </dependency >
181182
182183 <dependency >
189190 <dependency >
190191 <groupId >jakarta.websocket</groupId >
191192 <artifactId >jakarta.websocket-api</artifactId >
192- <version >2.1.1 </version >
193+ <version >2.2.0-M1 </version >
193194 </dependency >
194195 <dependency >
195196 <groupId >org.eclipse.jetty.ee10.websocket</groupId >
253254 <dependency >
254255 <groupId >org.slf4j</groupId >
255256 <artifactId >slf4j-jdk14</artifactId >
256- <version >2.0.11 </version >
257+ <version >2.0.13 </version >
257258 </dependency >
258259 <dependency >
259260 <groupId >com.github.umjammer</groupId >
Original file line number Diff line number Diff line change 1111import java .awt .MouseInfo ;
1212import java .awt .Point ;
1313import java .awt .Rectangle ;
14+ import java .io .IOException ;
1415import java .util .NoSuchElementException ;
16+ import java .util .Properties ;
1517import java .util .concurrent .Executors ;
1618import java .util .concurrent .atomic .AtomicReference ;
1719import java .util .logging .Level ;
@@ -58,11 +60,17 @@ public class MinecraftListener extends GamepadAdapter {
5860 private static final String bundleId = "com.mojang.Minecraft" ;
5961
6062 /** minecraft launchers descriptor#dusplayName */
61- private static final String [] mcLaunchers = {
62- "net.minecraft.client.main.Main" , // mc launcher -> original
63- "net.fabricmc.loader.impl.launch.knot.KnotClient" , // mc launcher -> fabric
64- "org.prismlauncher.EntryPoint" // prism launcher
65- };
63+ private static final String [] mcLaunchers ;
64+
65+ static {
66+ try {
67+ Properties props = new Properties ();
68+ props .load (MinecraftListener .class .getResourceAsStream ("/minecraft.properties" ));
69+ mcLaunchers = props .stringPropertyNames ().toArray (String []::new );
70+ } catch (IOException e ) {
71+ throw new IllegalStateException (e );
72+ }
73+ }
6674
6775 private long prevForBounds ;
6876
Original file line number Diff line number Diff line change 1+ # mc launcher -> original\
2+ net.minecraft.client.main.Main
3+ # mc launcher -> fabric
4+ net.fabricmc.loader.impl.launch.knot.KnotClient
5+ net.fabricmc.devlaunchinjector.Main
6+ # prism launcher
7+ org.prismlauncher.EntryPoint
You can’t perform that action at this time.
0 commit comments