top.hendrixshen.magiclib.compat.modmenu.ModMenuCompatApi Maven / Gradle / Ivy
package top.hendrixshen.magiclib.compat.modmenu;
import io.github.prospector.modmenu.api.ModMenuApi;
import net.minecraft.class_437;
//#if MC > 11404
import io.github.prospector.modmenu.api.ConfigScreenFactory;
//#else
//$$ import java.util.function.Function;
//#endif
public interface ModMenuCompatApi extends ModMenuApi {
ConfigScreenFactoryCompat> getConfigScreenFactoryCompat();
String getModIdCompat();
@Override
//#if MC > 11404
default ConfigScreenFactory> getModConfigScreenFactory() {
//#else
//$$ default Function getConfigScreenFactory() {
//#endif
return (screen) -> this.getConfigScreenFactoryCompat().create(screen);
}
//#if MC <= 11404
//$$ @Override
//$$ default String getModId() {
//$$ return this.getModIdCompat();
//$$ }
//#endif
@FunctionalInterface
interface ConfigScreenFactoryCompat {
S create(class_437 screen);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy