diff --git a/src/main/java/com/jozufozu/flywheel/FlywheelClient.java b/src/main/java/com/jozufozu/flywheel/FlywheelClient.java index 2c4b342e0..4b74ab5ce 100644 --- a/src/main/java/com/jozufozu/flywheel/FlywheelClient.java +++ b/src/main/java/com/jozufozu/flywheel/FlywheelClient.java @@ -18,7 +18,7 @@ import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; public class FlywheelClient { public static void clientInit() { - CrashReportCallables.registerCrashCallable("Flywheel Backend", () -> Backend.getEngine().getProperName()); + CrashReportCallables.registerCrashCallable("Flywheel Backend", Backend::getBackendDescriptor); OptifineHandler.init(); Backend.init(); diff --git a/src/main/java/com/jozufozu/flywheel/backend/Backend.java b/src/main/java/com/jozufozu/flywheel/backend/Backend.java index 715d3a5ce..6988f3239 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/Backend.java +++ b/src/main/java/com/jozufozu/flywheel/backend/Backend.java @@ -29,6 +29,14 @@ public class Backend { return engine; } + /** + * Get a string describing the Flywheel backend. When there are eventually multiple backends + * (Meshlet, MDI, GL31 Draw Instanced are planned), this will name which one is in use. + */ + public static String getBackendDescriptor() { + return engine == null ? "" : engine.getProperName(); + } + @Nullable public static ProgramSpec getSpec(ResourceLocation name) { return loader.get(name);