All Downloads are FREE. Search and download functionalities are using the official Maven repository.

top.hendrixshen.magiclib.api.compat.modmenu.ModMenuApiCompat Maven / Gradle / Ivy

There is a newer version: 0.6.59
Show newest version
//#if FABRIC
package top.hendrixshen.magiclib.api.compat.modmenu;

import com.terraformersmc.modmenu.api.ModMenuApi;
import net.minecraft.class_437;
//#if MC > 11404
import com.terraformersmc.modmenu.api.ConfigScreenFactory;
//#else
//$$ import java.util.function.Function;
//#endif

public interface ModMenuApiCompat extends ModMenuApi {
    ConfigScreenFactoryCompat getConfigScreenFactoryCompat();

    String getModIdCompat();

    //#if MC < 11500
    //$$ @Override
    //$$ default String getModId() {
    //$$     return this.getModIdCompat();
    //$$ }
    //#endif

    @Override
    default
    //#if MC > 11404
    ConfigScreenFactory getModConfigScreenFactory()
    //#else
    //$$ Function getConfigScreenFactory()
    //#endif
    {
        return (screen) -> this.getConfigScreenFactoryCompat().create(screen);
    }

    @FunctionalInterface
    interface ConfigScreenFactoryCompat {
        S create(class_437 screen);
    }
}
//#endif




© 2015 - 2024 Weber Informatics LLC | Privacy Policy