Skip to content

Commit

Permalink
Add datagen entrypoints.
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte committed Dec 29, 2024
1 parent 3c91e55 commit 0750e16
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 75 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

15 changes: 15 additions & 0 deletions loader/src/main/java/net/neoforged/fml/startup/DataClient.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package net.neoforged.fml.startup;

public class DataClient extends Entrypoint {
private DataClient() {}

public static void main(String[] args) {
try (var startup = startup(args)) {
var main = createMainMethodCallable(startup.classLoader(), "net.minecraft.client.data.Main");
main.invokeExact(startup.programArgs());
} catch (Throwable t) {
FatalErrorReporting.reportFatalError(t);
System.exit(1);
}
}
}
15 changes: 15 additions & 0 deletions loader/src/main/java/net/neoforged/fml/startup/DataServer.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package net.neoforged.fml.startup;

public class DataServer extends Entrypoint {
private DataServer() {}

public static void main(String[] args) {
try (var startup = startup(args)) {
var main = createMainMethodCallable(startup.classLoader(), "net.minecraft.data.Main");
main.invokeExact(startup.programArgs());
} catch (Throwable t) {
FatalErrorReporting.reportFatalError(t);
System.exit(1);
}
}
}

0 comments on commit 0750e16

Please sign in to comment.