[DEV] Fix Forge Mixins
This commit is contained in:
@@ -31,12 +31,12 @@ public class ConfigScreenHandlerMixin {
|
||||
*/
|
||||
@Inject(at = @At("RETURN"), method = "getScreenFactoryFor", cancellable = true, remap = false)
|
||||
private static void injectConfigScreen(IModInfo selectedMod, CallbackInfoReturnable<Optional<BiFunction<Minecraft, Screen, Screen>>> cir) {
|
||||
ConfigController.getWatchedConfigs().forEach((conf, watcher) -> {
|
||||
ConfigController.getWatchedConfigs().forEach((conf, config) -> {
|
||||
if (config.getClass().isAnnotationPresent(NoConfigScreen.class))
|
||||
return;
|
||||
|
||||
if (config.getModId().equals(selectedMod.getModId())) {
|
||||
if (watcher.getLeft().getClass().isAnnotationPresent(ClothScreen.class) && ModloaderEnvironment.INSTANCE.isModLoaded("cloth_config")) {
|
||||
if (config.getClass().isAnnotationPresent(ClothScreen.class) && ModloaderEnvironment.INSTANCE.isModLoaded("cloth_config")) {
|
||||
cir.setReturnValue(
|
||||
Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
||||
);
|
||||
|
Reference in New Issue
Block a user