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

top.hendrixshen.magiclib.impl.compat.minecraft.client.gui.FontCompatImpl Maven / Gradle / Ivy

There is a newer version: 0.6.59
Show newest version
package top.hendrixshen.magiclib.impl.compat.minecraft.client.gui;

import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.class_2561;
import net.minecraft.class_327;
import org.jetbrains.annotations.NotNull;
import top.hendrixshen.magiclib.api.compat.AbstractCompat;
import top.hendrixshen.magiclib.api.compat.minecraft.client.gui.FontCompat;

@Environment(EnvType.CLIENT)
public class FontCompatImpl extends AbstractCompat implements FontCompat {
    public FontCompatImpl(@NotNull class_327 type) {
        super(type);
    }

    @Override
    public int width(@NotNull class_2561 component) {
        return this.get().method_27525(
                //#if MC > 11502
                component
                //#else
                //$$ component.getString()
                //#endif
        );
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy