[DEV] Fix Forge Mixins
This commit is contained in:
@@ -31,12 +31,12 @@ public class ConfigScreenHandlerMixin {
|
|||||||
*/
|
*/
|
||||||
@Inject(at = @At("RETURN"), method = "getGuiFactoryFor", cancellable = true, remap = false)
|
@Inject(at = @At("RETURN"), method = "getGuiFactoryFor", cancellable = true, remap = false)
|
||||||
private static void injectConfigScreen(IModInfo selectedMod, CallbackInfoReturnable<Optional<BiFunction<Minecraft, Screen, Screen>>> cir) {
|
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))
|
if (config.getClass().isAnnotationPresent(NoConfigScreen.class))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (config.getModId().equals(selectedMod.getModId())) {
|
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(
|
cir.setReturnValue(
|
||||||
Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
||||||
);
|
);
|
||||||
|
@@ -31,12 +31,12 @@ public class ConfigScreenHandlerMixin {
|
|||||||
*/
|
*/
|
||||||
@Inject(at = @At("RETURN"), method = "getScreenFactoryFor", cancellable = true, remap = false)
|
@Inject(at = @At("RETURN"), method = "getScreenFactoryFor", cancellable = true, remap = false)
|
||||||
private static void injectConfigScreen(IModInfo selectedMod, CallbackInfoReturnable<Optional<BiFunction<Minecraft, Screen, Screen>>> cir) {
|
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))
|
if (config.getClass().isAnnotationPresent(NoConfigScreen.class))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (config.getModId().equals(selectedMod.getModId())) {
|
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(
|
cir.setReturnValue(
|
||||||
Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
||||||
);
|
);
|
||||||
|
@@ -31,12 +31,12 @@ public class ConfigScreenHandlerMixin {
|
|||||||
*/
|
*/
|
||||||
@Inject(at = @At("RETURN"), method = "getScreenFactoryFor", cancellable = true, remap = false)
|
@Inject(at = @At("RETURN"), method = "getScreenFactoryFor", cancellable = true, remap = false)
|
||||||
private static void injectConfigScreen(IModInfo selectedMod, CallbackInfoReturnable<Optional<BiFunction<Minecraft, Screen, Screen>>> cir) {
|
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))
|
if (config.getClass().isAnnotationPresent(NoConfigScreen.class))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (config.getModId().equals(selectedMod.getModId())) {
|
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(
|
cir.setReturnValue(
|
||||||
Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
||||||
);
|
);
|
||||||
|
@@ -31,12 +31,12 @@ public class ConfigScreenHandlerMixin {
|
|||||||
*/
|
*/
|
||||||
@Inject(at = @At("RETURN"), method = "getScreenFactoryFor", cancellable = true, remap = false)
|
@Inject(at = @At("RETURN"), method = "getScreenFactoryFor", cancellable = true, remap = false)
|
||||||
private static void injectConfigScreen(IModInfo selectedMod, CallbackInfoReturnable<Optional<BiFunction<Minecraft, Screen, Screen>>> cir) {
|
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))
|
if (config.getClass().isAnnotationPresent(NoConfigScreen.class))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (config.getModId().equals(selectedMod.getModId())) {
|
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(
|
cir.setReturnValue(
|
||||||
Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
||||||
);
|
);
|
||||||
|
@@ -31,12 +31,12 @@ public class ConfigScreenHandlerMixin {
|
|||||||
*/
|
*/
|
||||||
@Inject(at = @At("RETURN"), method = "getScreenFactoryFor", cancellable = true, remap = false)
|
@Inject(at = @At("RETURN"), method = "getScreenFactoryFor", cancellable = true, remap = false)
|
||||||
private static void injectConfigScreen(IModInfo selectedMod, CallbackInfoReturnable<Optional<BiFunction<Minecraft, Screen, Screen>>> cir) {
|
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))
|
if (config.getClass().isAnnotationPresent(NoConfigScreen.class))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (config.getModId().equals(selectedMod.getModId())) {
|
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(
|
cir.setReturnValue(
|
||||||
Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
||||||
);
|
);
|
||||||
|
@@ -31,12 +31,12 @@ public class ConfigScreenHandlerMixin {
|
|||||||
*/
|
*/
|
||||||
@Inject(at = @At("RETURN"), method = "getScreenFactoryFor", cancellable = true, remap = false)
|
@Inject(at = @At("RETURN"), method = "getScreenFactoryFor", cancellable = true, remap = false)
|
||||||
private static void injectConfigScreen(IModInfo selectedMod, CallbackInfoReturnable<Optional<BiFunction<Minecraft, Screen, Screen>>> cir) {
|
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))
|
if (config.getClass().isAnnotationPresent(NoConfigScreen.class))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (config.getModId().equals(selectedMod.getModId())) {
|
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(
|
cir.setReturnValue(
|
||||||
Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
||||||
);
|
);
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
+ @Inject(at = @At("RETURN"), method = "getGuiFactoryFor", cancellable = true, remap = false)
|
+ @Inject(at = @At("RETURN"), method = "getGuiFactoryFor", cancellable = true, remap = false)
|
||||||
private static void injectConfigScreen(IModInfo selectedMod, CallbackInfoReturnable<Optional<BiFunction<Minecraft, Screen, Screen>>> cir) {
|
private static void injectConfigScreen(IModInfo selectedMod, CallbackInfoReturnable<Optional<BiFunction<Minecraft, Screen, Screen>>> cir) {
|
||||||
- ConfigController.getMonitoredConfigs().forEach((conf, config) -> {
|
- ConfigController.getMonitoredConfigs().forEach((conf, config) -> {
|
||||||
+ ConfigController.getWatchedConfigs().forEach((conf, watcher) -> {
|
+ ConfigController.getWatchedConfigs().forEach((conf, config) -> {
|
||||||
if (config.getClass().isAnnotationPresent(NoConfigScreen.class))
|
if (config.getClass().isAnnotationPresent(NoConfigScreen.class))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
- } else {
|
- } else {
|
||||||
- //ModList.get().getModContainerById(config.getModId()).ifPresent(c -> c.registerExtensionPoint(IConfigScreenFactory.class, ((minecraft, screen) -> new CraterConfigScreen(config, screen))));
|
- //ModList.get().getModContainerById(config.getModId()).ifPresent(c -> c.registerExtensionPoint(IConfigScreenFactory.class, ((minecraft, screen) -> new CraterConfigScreen(config, screen))));
|
||||||
+ if (config.getModId().equals(selectedMod.getModId())) {
|
+ 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(
|
+ cir.setReturnValue(
|
||||||
+ Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
+ Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
||||||
+ );
|
+ );
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
@Inject(at = @At("RETURN"), method = "getScreenFactoryFor", cancellable = true, remap = false)
|
@Inject(at = @At("RETURN"), method = "getScreenFactoryFor", cancellable = true, remap = false)
|
||||||
private static void injectConfigScreen(IModInfo selectedMod, CallbackInfoReturnable<Optional<BiFunction<Minecraft, Screen, Screen>>> cir) {
|
private static void injectConfigScreen(IModInfo selectedMod, CallbackInfoReturnable<Optional<BiFunction<Minecraft, Screen, Screen>>> cir) {
|
||||||
- ConfigController.getMonitoredConfigs().forEach((conf, config) -> {
|
- ConfigController.getMonitoredConfigs().forEach((conf, config) -> {
|
||||||
+ ConfigController.getWatchedConfigs().forEach((conf, watcher) -> {
|
+ ConfigController.getWatchedConfigs().forEach((conf, config) -> {
|
||||||
if (config.getClass().isAnnotationPresent(NoConfigScreen.class))
|
if (config.getClass().isAnnotationPresent(NoConfigScreen.class))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
- } else {
|
- } else {
|
||||||
- //ModList.get().getModContainerById(config.getModId()).ifPresent(c -> c.registerExtensionPoint(IConfigScreenFactory.class, ((minecraft, screen) -> new CraterConfigScreen(config, screen))));
|
- //ModList.get().getModContainerById(config.getModId()).ifPresent(c -> c.registerExtensionPoint(IConfigScreenFactory.class, ((minecraft, screen) -> new CraterConfigScreen(config, screen))));
|
||||||
+ if (config.getModId().equals(selectedMod.getModId())) {
|
+ 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(
|
+ cir.setReturnValue(
|
||||||
+ Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
+ Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
||||||
+ );
|
+ );
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
@Inject(at = @At("RETURN"), method = "getScreenFactoryFor", cancellable = true, remap = false)
|
@Inject(at = @At("RETURN"), method = "getScreenFactoryFor", cancellable = true, remap = false)
|
||||||
private static void injectConfigScreen(IModInfo selectedMod, CallbackInfoReturnable<Optional<BiFunction<Minecraft, Screen, Screen>>> cir) {
|
private static void injectConfigScreen(IModInfo selectedMod, CallbackInfoReturnable<Optional<BiFunction<Minecraft, Screen, Screen>>> cir) {
|
||||||
- ConfigController.getMonitoredConfigs().forEach((conf, config) -> {
|
- ConfigController.getMonitoredConfigs().forEach((conf, config) -> {
|
||||||
+ ConfigController.getWatchedConfigs().forEach((conf, watcher) -> {
|
+ ConfigController.getWatchedConfigs().forEach((conf, config) -> {
|
||||||
if (config.getClass().isAnnotationPresent(NoConfigScreen.class))
|
if (config.getClass().isAnnotationPresent(NoConfigScreen.class))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
- } else {
|
- } else {
|
||||||
- //ModList.get().getModContainerById(config.getModId()).ifPresent(c -> c.registerExtensionPoint(IConfigScreenFactory.class, ((minecraft, screen) -> new CraterConfigScreen(config, screen))));
|
- //ModList.get().getModContainerById(config.getModId()).ifPresent(c -> c.registerExtensionPoint(IConfigScreenFactory.class, ((minecraft, screen) -> new CraterConfigScreen(config, screen))));
|
||||||
+ if (config.getModId().equals(selectedMod.getModId())) {
|
+ 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(
|
+ cir.setReturnValue(
|
||||||
+ Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
+ Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
||||||
+ );
|
+ );
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
@Inject(at = @At("RETURN"), method = "getScreenFactoryFor", cancellable = true, remap = false)
|
@Inject(at = @At("RETURN"), method = "getScreenFactoryFor", cancellable = true, remap = false)
|
||||||
private static void injectConfigScreen(IModInfo selectedMod, CallbackInfoReturnable<Optional<BiFunction<Minecraft, Screen, Screen>>> cir) {
|
private static void injectConfigScreen(IModInfo selectedMod, CallbackInfoReturnable<Optional<BiFunction<Minecraft, Screen, Screen>>> cir) {
|
||||||
- ConfigController.getMonitoredConfigs().forEach((conf, config) -> {
|
- ConfigController.getMonitoredConfigs().forEach((conf, config) -> {
|
||||||
+ ConfigController.getWatchedConfigs().forEach((conf, watcher) -> {
|
+ ConfigController.getWatchedConfigs().forEach((conf, config) -> {
|
||||||
if (config.getClass().isAnnotationPresent(NoConfigScreen.class))
|
if (config.getClass().isAnnotationPresent(NoConfigScreen.class))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
- } else {
|
- } else {
|
||||||
- //ModList.get().getModContainerById(config.getModId()).ifPresent(c -> c.registerExtensionPoint(IConfigScreenFactory.class, ((minecraft, screen) -> new CraterConfigScreen(config, screen))));
|
- //ModList.get().getModContainerById(config.getModId()).ifPresent(c -> c.registerExtensionPoint(IConfigScreenFactory.class, ((minecraft, screen) -> new CraterConfigScreen(config, screen))));
|
||||||
+ if (config.getModId().equals(selectedMod.getModId())) {
|
+ 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(
|
+ cir.setReturnValue(
|
||||||
+ Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
+ Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
||||||
+ );
|
+ );
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
@Inject(at = @At("RETURN"), method = "getScreenFactoryFor", cancellable = true, remap = false)
|
@Inject(at = @At("RETURN"), method = "getScreenFactoryFor", cancellable = true, remap = false)
|
||||||
private static void injectConfigScreen(IModInfo selectedMod, CallbackInfoReturnable<Optional<BiFunction<Minecraft, Screen, Screen>>> cir) {
|
private static void injectConfigScreen(IModInfo selectedMod, CallbackInfoReturnable<Optional<BiFunction<Minecraft, Screen, Screen>>> cir) {
|
||||||
- ConfigController.getMonitoredConfigs().forEach((conf, config) -> {
|
- ConfigController.getMonitoredConfigs().forEach((conf, config) -> {
|
||||||
+ ConfigController.getWatchedConfigs().forEach((conf, watcher) -> {
|
+ ConfigController.getWatchedConfigs().forEach((conf, config) -> {
|
||||||
if (config.getClass().isAnnotationPresent(NoConfigScreen.class))
|
if (config.getClass().isAnnotationPresent(NoConfigScreen.class))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
- } else {
|
- } else {
|
||||||
- //ModList.get().getModContainerById(config.getModId()).ifPresent(c -> c.registerExtensionPoint(IConfigScreenFactory.class, ((minecraft, screen) -> new CraterConfigScreen(config, screen))));
|
- //ModList.get().getModContainerById(config.getModId()).ifPresent(c -> c.registerExtensionPoint(IConfigScreenFactory.class, ((minecraft, screen) -> new CraterConfigScreen(config, screen))));
|
||||||
+ if (config.getModId().equals(selectedMod.getModId())) {
|
+ 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(
|
+ cir.setReturnValue(
|
||||||
+ Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
+ Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
||||||
+ );
|
+ );
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
@Inject(at = @At("RETURN"), method = "getScreenFactoryFor", cancellable = true, remap = false)
|
@Inject(at = @At("RETURN"), method = "getScreenFactoryFor", cancellable = true, remap = false)
|
||||||
private static void injectConfigScreen(IModInfo selectedMod, CallbackInfoReturnable<Optional<BiFunction<Minecraft, Screen, Screen>>> cir) {
|
private static void injectConfigScreen(IModInfo selectedMod, CallbackInfoReturnable<Optional<BiFunction<Minecraft, Screen, Screen>>> cir) {
|
||||||
- ConfigController.getMonitoredConfigs().forEach((conf, config) -> {
|
- ConfigController.getMonitoredConfigs().forEach((conf, config) -> {
|
||||||
+ ConfigController.getWatchedConfigs().forEach((conf, watcher) -> {
|
+ ConfigController.getWatchedConfigs().forEach((conf, config) -> {
|
||||||
if (config.getClass().isAnnotationPresent(NoConfigScreen.class))
|
if (config.getClass().isAnnotationPresent(NoConfigScreen.class))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
- } else {
|
- } else {
|
||||||
- //ModList.get().getModContainerById(config.getModId()).ifPresent(c -> c.registerExtensionPoint(IConfigScreenFactory.class, ((minecraft, screen) -> new CraterConfigScreen(config, screen))));
|
- //ModList.get().getModContainerById(config.getModId()).ifPresent(c -> c.registerExtensionPoint(IConfigScreenFactory.class, ((minecraft, screen) -> new CraterConfigScreen(config, screen))));
|
||||||
+ if (config.getModId().equals(selectedMod.getModId())) {
|
+ 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(
|
+ cir.setReturnValue(
|
||||||
+ Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
+ Optional.of((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))
|
||||||
+ );
|
+ );
|
||||||
|
Reference in New Issue
Block a user