Skip to content

Commit 6ccdd3b

Browse files
authored
Merge pull request #4 from umjammer/0.0.5
0.0.5
2 parents a1761e5 + e299e3f commit 6ccdd3b

File tree

3 files changed

+25
-9
lines changed

3 files changed

+25
-9
lines changed

pom.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
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>
@@ -71,6 +71,7 @@
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>
@@ -176,7 +177,7 @@
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>
@@ -189,7 +190,7 @@
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>
@@ -253,7 +254,7 @@
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>

src/main/java/vavi/games/input/listener/MinecraftListener.java

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
import java.awt.MouseInfo;
1212
import java.awt.Point;
1313
import java.awt.Rectangle;
14+
import java.io.IOException;
1415
import java.util.NoSuchElementException;
16+
import java.util.Properties;
1517
import java.util.concurrent.Executors;
1618
import java.util.concurrent.atomic.AtomicReference;
1719
import 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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
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

0 commit comments

Comments
 (0)