mirror of
https://github.com/chylex/Better-Controls.git
synced 2025-04-21 15:15:46 +02:00
Update Mod Menu API integration
This commit is contained in:
parent
9217852c0b
commit
0aed6282b4
Fabric
build.gradle.kts
src/main/java
chylex/bettercontrols/compatibility
com/terraformersmc/modmenu/api
io/github/prospector/modmenu/api
@ -42,7 +42,7 @@ tasks.processResources {
|
||||
}
|
||||
|
||||
tasks.jar {
|
||||
exclude("io/github/prospector/")
|
||||
exclude("com/terraformersmc/modmenu/")
|
||||
}
|
||||
|
||||
tasks.remapJar {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package chylex.bettercontrols.compatibility;
|
||||
import chylex.bettercontrols.gui.BetterControlsScreen;
|
||||
import io.github.prospector.modmenu.api.ConfigScreenFactory;
|
||||
import io.github.prospector.modmenu.api.ModMenuApi;
|
||||
import com.terraformersmc.modmenu.api.ConfigScreenFactory;
|
||||
import com.terraformersmc.modmenu.api.ModMenuApi;
|
||||
|
||||
public class ModMenuSupport implements ModMenuApi {
|
||||
@Override
|
||||
|
@ -1,8 +1,9 @@
|
||||
package io.github.prospector.modmenu.api;
|
||||
package com.terraformersmc.modmenu.api;
|
||||
|
||||
import net.minecraft.client.gui.screens.Screen;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@FunctionalInterface
|
||||
public interface ConfigScreenFactory<S extends Screen> {
|
||||
S create(Screen var1);
|
||||
S create(Screen parent);
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.terraformersmc.modmenu.api;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public interface ModMenuApi {
|
||||
default ConfigScreenFactory<?> getModConfigScreenFactory() {
|
||||
return screen -> null;
|
||||
}
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
package io.github.prospector.modmenu.api;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import java.util.Map;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public interface ModMenuApi {
|
||||
default ConfigScreenFactory<?> getModConfigScreenFactory() {
|
||||
return ignore -> null;
|
||||
}
|
||||
|
||||
default Map<String, ConfigScreenFactory<?>> getProvidedConfigScreenFactories() {
|
||||
return ImmutableMap.of();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user