top.hendrixshen.magiclib.util.RenderUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of magiclib-1_14_4 Show documentation
Show all versions of magiclib-1_14_4 Show documentation
To beat magic with magic :(
package top.hendrixshen.magiclib.util;
import net.minecraft.class_2561;
import net.minecraft.class_310;
import net.minecraft.class_327;
public class RenderUtil {
private static final class_327 TEXT_RENDERER = class_310.method_1551().field_1772;
public static final int TEXT_HEIGHT = RenderUtil.TEXT_RENDERER.field_2000;
public static final int TEXT_LINE_HEIGHT = RenderUtil.TEXT_HEIGHT + 1;
public static int getRenderWidth(String text) {
return RenderUtil.TEXT_RENDERER.method_1727(text);
}
public static int getRenderWidth(class_2561 text) {
return RenderUtil.TEXT_RENDERER.widthCompat(text);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy