-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Something something this will let us be more dynamic blah blah blah I just worry about the entire toolchain suddenly freezing in place at the wrong moment
- Loading branch information
Showing
9 changed files
with
45 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 11 additions & 2 deletions
13
fabric/src/main/java/io/github/ennuil/ok_zoomer/wrench_wrapper/quilt/QuiltWrapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
package io.github.ennuil.ok_zoomer.wrench_wrapper.quilt; | ||
|
||
import io.github.ennuil.ok_zoomer.wrench_wrapper.WrenchWrapper; | ||
import org.quiltmc.config.api.ReflectiveConfig; | ||
import org.quiltmc.loader.api.config.v2.QuiltConfig; | ||
|
||
import java.lang.reflect.InvocationTargetException; | ||
|
||
public class QuiltWrapper { | ||
public static <C extends ReflectiveConfig> C create(String family, String id, Class<C> configCreatorClass) { | ||
return QuiltConfig.create(family, id, configCreatorClass); | ||
var clazz = WrenchWrapper.getClass("org.quiltmc.loader.api.config.v2.QuiltConfig"); | ||
if (clazz == null) return null; | ||
|
||
try { | ||
return (C) clazz.getMethod("create", String.class, String.class, Class.class).invoke(null, family, id, configCreatorClass); | ||
} catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) { | ||
return null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters