Specify font implicitly
This commit is contained in:
parent
d81d7885c0
commit
1dab485d29
@ -259,15 +259,15 @@ object AndroidMenuKeyMapping : KeyMapping("key.otm.android_menu", KeyConflictCon
|
||||
val shift = size * 0.6f
|
||||
feature.renderIcon(wrap, -iconSize / 2f + shift * cos, -shift * sin - iconSize / 2f, iconSize, iconSize)
|
||||
|
||||
wrap.draw(minecraft.font, feature.type.displayName, shift * cos + 1f, -shift * sin - iconSize / 1.5f + 1f, color = RGBAColor.BLACK, gravity = RenderGravity.CENTER_CENTER)
|
||||
wrap.draw(minecraft.font, feature.type.displayName, shift * cos, -shift * sin - iconSize / 1.5f, color = if (feature.isActive) RGBAColor.DARK_GREEN else RGBAColor.DARK_RED, gravity = RenderGravity.CENTER_CENTER)
|
||||
wrap.draw(feature.type.displayName, shift * cos + 1f, -shift * sin - iconSize / 1.5f + 1f, color = RGBAColor.BLACK, gravity = RenderGravity.CENTER_CENTER)
|
||||
wrap.draw(feature.type.displayName, shift * cos, -shift * sin - iconSize / 1.5f, color = if (feature.isActive) RGBAColor.DARK_GREEN else RGBAColor.DARK_RED, gravity = RenderGravity.CENTER_CENTER)
|
||||
|
||||
if (feature.isOnCooldown && feature.cooldownPercent > 0.0f) {
|
||||
RenderSystem.setShaderColor(1f, 1f, 1f, 0.5f)
|
||||
drawArc(event.guiGraphics, shift * cos, -shift * sin, iconSize / 2f, 0f, PI / 2.0, PI / 2.0 + PI * 2.0 * feature.cooldownPercent.toDouble())
|
||||
RenderSystem.setShaderColor(1f, 1f, 1f, 1f)
|
||||
|
||||
wrap.draw(minecraft.font, formatTickDuration(feature.cooldown), shift * cos, -shift * sin + iconSize / 1.5f, color = RGBAColor.WHITE, gravity = RenderGravity.CENTER_CENTER)
|
||||
wrap.draw(formatTickDuration(feature.cooldown), shift * cos, -shift * sin + iconSize / 1.5f, color = RGBAColor.WHITE, gravity = RenderGravity.CENTER_CENTER)
|
||||
}
|
||||
}
|
||||
|
||||
@ -305,7 +305,7 @@ object AndroidMenuKeyMapping : KeyMapping("key.otm.android_menu", KeyConflictCon
|
||||
drawArc(event.guiGraphics, x, y, COOLDOWN_ICON_SIZE / 2f, 0f, PI / 2.0, PI / 2.0 + PI * 2.0 * feature.cooldownPercent, alignAtCenter = false)
|
||||
RenderSystem.setShaderColor(1f, 1f, 1f, 1f)
|
||||
|
||||
wrap.draw(font, formatTickDuration(feature.cooldown), x + COOLDOWN_ICON_SIZE / 2f, y + COOLDOWN_ICON_SIZE + 1f, color = RGBAColor.WHITE, gravity = RenderGravity.TOP_CENTER)
|
||||
wrap.draw(formatTickDuration(feature.cooldown), x + COOLDOWN_ICON_SIZE / 2f, y + COOLDOWN_ICON_SIZE + 1f, color = RGBAColor.WHITE, gravity = RenderGravity.TOP_CENTER)
|
||||
|
||||
x += COOLDOWN_ICON_SIZE + COOLDOWN_ICON_MARGIN
|
||||
}
|
||||
|
@ -174,8 +174,8 @@ object MatteryGUI {
|
||||
|
||||
val text = TranslatableComponent("otm.iteration", iteration)
|
||||
|
||||
guiGraphics.draw(minecraft.font, text, x + 1f, y + 1f, color = RGBAColor.BLACK, gravity = RenderGravity.CENTER_CENTER)
|
||||
guiGraphics.draw(minecraft.font, text, x, y, color = RGBAColor.WHITE, gravity = RenderGravity.CENTER_CENTER)
|
||||
guiGraphics.draw(text, x + 1f, y + 1f, color = RGBAColor.BLACK, gravity = RenderGravity.CENTER_CENTER)
|
||||
guiGraphics.draw(text, x, y, color = RGBAColor.WHITE, gravity = RenderGravity.CENTER_CENTER)
|
||||
|
||||
stack.scale(0.35f, 0.35f, 0.35f)
|
||||
|
||||
@ -191,8 +191,8 @@ object MatteryGUI {
|
||||
|
||||
for (i in deathLog.indices.reversed()) {
|
||||
val component = deathLog[i]
|
||||
guiGraphics.draw(minecraft.font, component.second, x + 1f, y + 1f, color = RGBAColor.BLACK, gravity = RenderGravity.CENTER_CENTER)
|
||||
guiGraphics.draw(minecraft.font, component.second, x, y, color = RGBAColor(color, color, color), gravity = RenderGravity.CENTER_CENTER)
|
||||
guiGraphics.draw(component.second, x + 1f, y + 1f, color = RGBAColor.BLACK, gravity = RenderGravity.CENTER_CENTER)
|
||||
guiGraphics.draw(component.second, x, y, color = RGBAColor(color, color, color), gravity = RenderGravity.CENTER_CENTER)
|
||||
|
||||
y += minecraft.font.lineHeight
|
||||
color = (color - 0x20).coerceAtLeast(0x0)
|
||||
@ -266,7 +266,7 @@ object MatteryGUI {
|
||||
val formattedPower = mattery.androidEnergy.batteryLevel.formatPower()
|
||||
|
||||
val scale = ClientConfig.HUD.BAR_TEXT_SCALE.toFloat()
|
||||
guiGraphics.draw(gui.font, formattedPower, left + CHARGE_BG.width + 2f + scale, top + CHARGE_BG.height / 2f + scale, scale = scale, gravity = RenderGravity.CENTER_LEFT, color = RGBAColor.YELLOW, drawOutline = true)
|
||||
guiGraphics.draw(formattedPower, left + CHARGE_BG.width + 2f + scale, top + CHARGE_BG.height / 2f + scale, font = gui.font, scale = scale, gravity = RenderGravity.CENTER_LEFT, color = RGBAColor.YELLOW, drawOutline = true)
|
||||
}
|
||||
}
|
||||
|
||||
@ -345,7 +345,7 @@ object MatteryGUI {
|
||||
formattedHealth = TextComponent("%d+%d/%d".format(ply.health.toInt(), ply.absorptionAmount.toInt(), ply.maxHealth.toInt()))
|
||||
|
||||
val scale = ClientConfig.HUD.BAR_TEXT_SCALE.toFloat()
|
||||
guiGraphics.draw(minecraft.font, formattedHealth, left - 2f, top + HEALTH_BG.height / 2f + 1f * scale, scale = scale, gravity = RenderGravity.CENTER_RIGHT, color = getHealthColorForPlayer(ply), drawOutline = true)
|
||||
guiGraphics.draw(formattedHealth, left - 2f, top + HEALTH_BG.height / 2f + 1f * scale, scale = scale, gravity = RenderGravity.CENTER_RIGHT, color = getHealthColorForPlayer(ply), drawOutline = true)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,6 @@ class MGUIGraphics(val parent: GuiGraphics) {
|
||||
}
|
||||
|
||||
fun draw(
|
||||
font: Font,
|
||||
text: String,
|
||||
x: Float = 0f,
|
||||
y: Float = 0f,
|
||||
@ -105,6 +104,7 @@ class MGUIGraphics(val parent: GuiGraphics) {
|
||||
drawOutline: Boolean = false,
|
||||
outlineColor: RGBAColor = RGBAColor.BLACK,
|
||||
outlineZ: Float = -0.1f,
|
||||
font: Font = this.font,
|
||||
): Float {
|
||||
val width = font.draw(
|
||||
poseStack = pose,
|
||||
@ -135,7 +135,6 @@ class MGUIGraphics(val parent: GuiGraphics) {
|
||||
}
|
||||
|
||||
fun draw(
|
||||
font: Font,
|
||||
text: Component,
|
||||
x: Float = 0f,
|
||||
y: Float = 0f,
|
||||
@ -155,6 +154,7 @@ class MGUIGraphics(val parent: GuiGraphics) {
|
||||
drawOutline: Boolean = false,
|
||||
outlineColor: RGBAColor = RGBAColor.BLACK,
|
||||
outlineZ: Float = -0.1f,
|
||||
font: Font = this.font,
|
||||
): Float {
|
||||
val width = font.draw(
|
||||
poseStack = pose,
|
||||
@ -185,7 +185,6 @@ class MGUIGraphics(val parent: GuiGraphics) {
|
||||
}
|
||||
|
||||
fun draw(
|
||||
font: Font,
|
||||
text: FormattedCharSequence,
|
||||
x: Float = 0f,
|
||||
y: Float = 0f,
|
||||
@ -205,6 +204,7 @@ class MGUIGraphics(val parent: GuiGraphics) {
|
||||
drawOutline: Boolean = false,
|
||||
outlineColor: RGBAColor = RGBAColor.BLACK,
|
||||
outlineZ: Float = -0.1f,
|
||||
font: Font = this.font,
|
||||
): Float {
|
||||
val width = font.draw(
|
||||
poseStack = pose,
|
||||
|
@ -212,7 +212,6 @@ class MatterPanelScreen(
|
||||
menu.patternsFiltered.getOrNull(index)?.let {
|
||||
if (it.researchPercent < 1f) {
|
||||
graphics.draw(
|
||||
font,
|
||||
TextComponent((it.researchPercent * 100.0).toInt().toString() + "%"),
|
||||
width - 1f, height - 1f, scale = 0.5f, gravity = RenderGravity.BOTTOM_RIGHT, drawShadow = true, color = RGBAColor.WHITE)
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ open class EffectListPanel<out S : Screen> @JvmOverloads constructor(
|
||||
minecraft.mobEffectTextures.get(effect.effect).render(graphics, x = 3f, y = 3f, width = width - 6f, height = height - 6f)
|
||||
|
||||
RenderSystem.setShaderColor(1f, 1f, 1f, 1f)
|
||||
graphics.draw(font, formatTickDuration(effect.duration), width / 2f, height / 2f, scale = 0.75f, gravity = RenderGravity.CENTER_CENTER, color = RGBAColor.WHITE)
|
||||
graphics.draw(formatTickDuration(effect.duration), width / 2f, height / 2f, scale = 0.75f, gravity = RenderGravity.CENTER_CENTER, color = RGBAColor.WHITE)
|
||||
}
|
||||
|
||||
override fun innerRenderTooltips(graphics: MGUIGraphics, mouseX: Float, mouseY: Float, partialTick: Float): Boolean {
|
||||
@ -143,8 +143,8 @@ open class EffectListPanel<out S : Screen> @JvmOverloads constructor(
|
||||
name.append(" ${effect.amplifier + 1}")
|
||||
}
|
||||
|
||||
graphics.draw(font, name, x + renderWidth + 12f, y + 7f, gravity = RenderGravity.TOP_LEFT, color = RGBAColor.WHITE)
|
||||
graphics.draw(font, formatTickDuration(effect.duration, true), x + renderWidth + 12f, y + 7f + font.lineHeight + 2f, gravity = RenderGravity.TOP_LEFT, color = RGBAColor.LIGHT_GRAY)
|
||||
graphics.draw(name, x + renderWidth + 12f, y + 7f, gravity = RenderGravity.TOP_LEFT, color = RGBAColor.WHITE)
|
||||
graphics.draw(formatTickDuration(effect.duration, true), x + renderWidth + 12f, y + 7f + font.lineHeight + 2f, gravity = RenderGravity.TOP_LEFT, color = RGBAColor.LIGHT_GRAY)
|
||||
}
|
||||
|
||||
return isHovered
|
||||
|
@ -370,7 +370,7 @@ open class FramePanel<out S : Screen>(
|
||||
// title
|
||||
val title = title ?: return
|
||||
RenderSystem.depthFunc(GL30.GL_ALWAYS)
|
||||
graphics.draw(font, title, 8f, 5f, color = titleColor)
|
||||
graphics.draw(title, 8f, 5f, color = titleColor)
|
||||
RenderSystem.depthFunc(GL30.GL_ALWAYS)
|
||||
}
|
||||
|
||||
|
@ -35,28 +35,28 @@ open class Label<out S : Screen> @JvmOverloads constructor(
|
||||
|
||||
if (shadow) {
|
||||
when (gravity) {
|
||||
RenderGravity.TOP_LEFT -> graphics.draw(font, text, shadowX, shadowY, color = shadowColor, gravity = gravity)
|
||||
RenderGravity.TOP_CENTER -> graphics.draw(font, text, shadowX + width / 2f, shadowY, color = shadowColor, gravity = gravity)
|
||||
RenderGravity.TOP_RIGHT -> graphics.draw(font, text, shadowX + width, shadowY, color = shadowColor, gravity = gravity)
|
||||
RenderGravity.CENTER_LEFT -> graphics.draw(font, text, shadowX, height / 2f + shadowY, color = shadowColor, gravity = gravity)
|
||||
RenderGravity.CENTER_CENTER -> graphics.draw(font, text, shadowX + width / 2f, height / 2f + shadowY, color = shadowColor, gravity = gravity)
|
||||
RenderGravity.CENTER_RIGHT -> graphics.draw(font, text, shadowX + width, height / 2f + shadowY, color = shadowColor, gravity = gravity)
|
||||
RenderGravity.BOTTOM_LEFT -> graphics.draw(font, text, shadowX, height + shadowY, color = shadowColor, gravity = gravity)
|
||||
RenderGravity.BOTTOM_CENTER -> graphics.draw(font, text, shadowX + width / 2f, height + shadowY, color = shadowColor, gravity = gravity)
|
||||
RenderGravity.BOTTOM_RIGHT -> graphics.draw(font, text, shadowX + width, height + shadowY, color = shadowColor, gravity = gravity)
|
||||
RenderGravity.TOP_LEFT -> graphics.draw(text, shadowX, shadowY, color = shadowColor, gravity = gravity)
|
||||
RenderGravity.TOP_CENTER -> graphics.draw(text, shadowX + width / 2f, shadowY, color = shadowColor, gravity = gravity)
|
||||
RenderGravity.TOP_RIGHT -> graphics.draw(text, shadowX + width, shadowY, color = shadowColor, gravity = gravity)
|
||||
RenderGravity.CENTER_LEFT -> graphics.draw(text, shadowX, height / 2f + shadowY, color = shadowColor, gravity = gravity)
|
||||
RenderGravity.CENTER_CENTER -> graphics.draw(text, shadowX + width / 2f, height / 2f + shadowY, color = shadowColor, gravity = gravity)
|
||||
RenderGravity.CENTER_RIGHT -> graphics.draw(text, shadowX + width, height / 2f + shadowY, color = shadowColor, gravity = gravity)
|
||||
RenderGravity.BOTTOM_LEFT -> graphics.draw(text, shadowX, height + shadowY, color = shadowColor, gravity = gravity)
|
||||
RenderGravity.BOTTOM_CENTER -> graphics.draw(text, shadowX + width / 2f, height + shadowY, color = shadowColor, gravity = gravity)
|
||||
RenderGravity.BOTTOM_RIGHT -> graphics.draw(text, shadowX + width, height + shadowY, color = shadowColor, gravity = gravity)
|
||||
}
|
||||
}
|
||||
|
||||
when (gravity) {
|
||||
RenderGravity.TOP_LEFT -> graphics.draw(font, text, 0f, 0f, color = color, gravity = gravity)
|
||||
RenderGravity.TOP_CENTER -> graphics.draw(font, text, width / 2f, 0f, color = color, gravity = gravity)
|
||||
RenderGravity.TOP_RIGHT -> graphics.draw(font, text, width - (if (shadow) shadowX else 0f), 0f, color = color, gravity = gravity)
|
||||
RenderGravity.CENTER_LEFT -> graphics.draw(font, text, 0f, height / 2f, color = color, gravity = gravity)
|
||||
RenderGravity.CENTER_CENTER -> graphics.draw(font, text, width / 2f, height / 2f, color = color, gravity = gravity)
|
||||
RenderGravity.CENTER_RIGHT -> graphics.draw(font, text, width - (if (shadow) shadowX else 0f), height / 2f, color = color, gravity = gravity)
|
||||
RenderGravity.BOTTOM_LEFT -> graphics.draw(font, text, 0f, height, color = color, gravity = gravity)
|
||||
RenderGravity.BOTTOM_CENTER -> graphics.draw(font, text, width / 2f, height, color = color, gravity = gravity)
|
||||
RenderGravity.BOTTOM_RIGHT -> graphics.draw(font, text, width - (if (shadow) shadowX else 0f), height, color = color, gravity = gravity)
|
||||
RenderGravity.TOP_LEFT -> graphics.draw(text, 0f, 0f, color = color, gravity = gravity)
|
||||
RenderGravity.TOP_CENTER -> graphics.draw(text, width / 2f, 0f, color = color, gravity = gravity)
|
||||
RenderGravity.TOP_RIGHT -> graphics.draw(text, width - (if (shadow) shadowX else 0f), 0f, color = color, gravity = gravity)
|
||||
RenderGravity.CENTER_LEFT -> graphics.draw(text, 0f, height / 2f, color = color, gravity = gravity)
|
||||
RenderGravity.CENTER_CENTER -> graphics.draw(text, width / 2f, height / 2f, color = color, gravity = gravity)
|
||||
RenderGravity.CENTER_RIGHT -> graphics.draw(text, width - (if (shadow) shadowX else 0f), height / 2f, color = color, gravity = gravity)
|
||||
RenderGravity.BOTTOM_LEFT -> graphics.draw(text, 0f, height, color = color, gravity = gravity)
|
||||
RenderGravity.BOTTOM_CENTER -> graphics.draw(text, width / 2f, height, color = color, gravity = gravity)
|
||||
RenderGravity.BOTTOM_RIGHT -> graphics.draw(text, width - (if (shadow) shadowX else 0f), height, color = color, gravity = gravity)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ open class NetworkedItemGridPanel<out S : MatteryScreen<*>>(
|
||||
renderRegular(graphics, itemStack.toItemStack(), "")
|
||||
|
||||
if (!itemStack.isEmpty) {
|
||||
graphics.draw(font, itemStack.count.formatSiComponent(decimalPlaces = 1), x = width - 1f, y = height - 1f, gravity = RenderGravity.BOTTOM_RIGHT, scale = 0.75f, drawShadow = true)
|
||||
graphics.draw(itemStack.count.formatSiComponent(decimalPlaces = 1), x = width - 1f, y = height - 1f, gravity = RenderGravity.BOTTOM_RIGHT, scale = 0.75f, drawShadow = true)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ open class ButtonPanel<out S : Screen>(
|
||||
|
||||
override fun innerRender(graphics: MGUIGraphics, mouseX: Float, mouseY: Float, partialTick: Float) {
|
||||
renderStretchableBackground(graphics, mouseX, mouseY, partialTick)
|
||||
graphics.draw(font, label, width / 2f, height / 2f, color = textColor, gravity = RenderGravity.CENTER_CENTER)
|
||||
graphics.draw(label, width / 2f, height / 2f, color = textColor, gravity = RenderGravity.CENTER_CENTER)
|
||||
}
|
||||
|
||||
override fun sizeToContents(performLayout: Boolean) {
|
||||
|
@ -1174,7 +1174,6 @@ open class TextInputPanel<out S : Screen>(
|
||||
val selection = selections[i]
|
||||
|
||||
graphics.draw(
|
||||
font = font,
|
||||
text = line,
|
||||
gravity = RenderGravity.TOP_LEFT,
|
||||
x = dockPadding.left,
|
||||
@ -1228,7 +1227,6 @@ open class TextInputPanel<out S : Screen>(
|
||||
|
||||
if (activeLine == null || cursorRow >= activeLine.length) {
|
||||
graphics.draw(
|
||||
font = font,
|
||||
text = "_",
|
||||
gravity = RenderGravity.TOP_LEFT,
|
||||
x = dockPadding.left + (if (activeLine == null) 0f else font.width(activeLine).toFloat()),
|
||||
@ -1237,7 +1235,6 @@ open class TextInputPanel<out S : Screen>(
|
||||
)
|
||||
} else {
|
||||
graphics.draw(
|
||||
font = font,
|
||||
text = "|",
|
||||
gravity = RenderGravity.TOP_LEFT,
|
||||
x = dockPadding.left + font.width(activeLine.substring(0, cursorRow)).toFloat() - 1f,
|
||||
@ -1251,7 +1248,6 @@ open class TextInputPanel<out S : Screen>(
|
||||
|
||||
if (debugDraw) {
|
||||
graphics.draw(
|
||||
font = font,
|
||||
text = cursorLine.toString(),
|
||||
gravity = RenderGravity.TOP_RIGHT,
|
||||
x = width,
|
||||
@ -1260,7 +1256,6 @@ open class TextInputPanel<out S : Screen>(
|
||||
)
|
||||
|
||||
graphics.draw(
|
||||
font = font,
|
||||
text = cursorRow.toString(),
|
||||
gravity = RenderGravity.TOP_RIGHT,
|
||||
x = width - dockPadding.right,
|
||||
@ -1269,7 +1264,6 @@ open class TextInputPanel<out S : Screen>(
|
||||
)
|
||||
|
||||
graphics.draw(
|
||||
font = font,
|
||||
text = lines.size.toString(),
|
||||
gravity = RenderGravity.TOP_RIGHT,
|
||||
x = width - dockPadding.right,
|
||||
|
@ -331,7 +331,7 @@ private class AndroidResearchButton(
|
||||
val text = node.type.iconText
|
||||
|
||||
if (text != null) {
|
||||
graphics.draw(font, text.visualOrderText, width - font.width(text), height - font.lineHeight, color = RGBAColor.WHITE, drawShadow = true)
|
||||
graphics.draw(text.visualOrderText, width - font.width(text), height - font.lineHeight, color = RGBAColor.WHITE, drawShadow = true)
|
||||
}
|
||||
|
||||
for (line in lines) {
|
||||
|
@ -80,7 +80,7 @@ object MatterEntanglerRecipeCategory : IRecipeCategory<IMatterEntanglerRecipe>,
|
||||
renderMatterGauge(wrap, 13f, 6f, drainSpeed = (recipe.matter / Decimal(300)).toFloat())
|
||||
renderEnergyGauge(wrap, 4f, 6f, drainSpeed = (recipe.ticks / 2000.0).toFloat())
|
||||
|
||||
wrap.draw(wrap.font, x = 85f, y = 45f, text = TranslatableComponent("otm.gui.recipe.ticks", recipe.ticks), drawShadow = true)
|
||||
wrap.draw(x = 85f, y = 45f, text = TranslatableComponent("otm.gui.recipe.ticks", recipe.ticks), drawShadow = true)
|
||||
}
|
||||
|
||||
override fun getTooltipStrings(recipe: IMatterEntanglerRecipe, recipeSlotsView: IRecipeSlotsView, mouseX: Double, mouseY: Double): MutableList<Component> {
|
||||
|
@ -73,12 +73,12 @@ object MicrowaveRecipeCategory : IRecipeCategory<MicrowaveRecipe>, IDrawable {
|
||||
mouseY: Double
|
||||
) {
|
||||
val wrap = MGUIGraphics(graphics)
|
||||
wrap.draw(minecraft.font, TranslatableComponent("otm.gui.recipe.ticks", recipe.workTime), 40f, 30f, gravity = RenderGravity.TOP_CENTER, color = RGBAColor.BLACK)
|
||||
wrap.draw(TranslatableComponent("otm.gui.recipe.ticks", recipe.workTime), 40f, 30f, gravity = RenderGravity.TOP_CENTER, color = RGBAColor.BLACK)
|
||||
|
||||
val average = recipe.experience.toString()
|
||||
|
||||
if (average != "0.0") {
|
||||
wrap.draw(minecraft.font, TranslatableComponent("gui.jei.category.smelting.experience", average), 40f, 1f, gravity = RenderGravity.TOP_CENTER, color = RGBAColor.BLACK)
|
||||
wrap.draw(TranslatableComponent("gui.jei.category.smelting.experience", average), 40f, 1f, gravity = RenderGravity.TOP_CENTER, color = RGBAColor.BLACK)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,12 +74,12 @@ object PlatePressRecipeCategory : IRecipeCategory<PlatePressRecipe>, IDrawable {
|
||||
) {
|
||||
val wrap = MGUIGraphics(graphics)
|
||||
|
||||
wrap.draw(minecraft.font, TranslatableComponent("otm.gui.recipe.ticks", recipe.workTime), 40f, 30f, gravity = RenderGravity.TOP_CENTER, color = RGBAColor.BLACK)
|
||||
wrap.draw(TranslatableComponent("otm.gui.recipe.ticks", recipe.workTime), 40f, 30f, gravity = RenderGravity.TOP_CENTER, color = RGBAColor.BLACK)
|
||||
|
||||
val average = recipe.experience.toString()
|
||||
|
||||
if (average != "0.0") {
|
||||
wrap.draw(minecraft.font, TranslatableComponent("gui.jei.category.smelting.experience", average), 40f, 1f, gravity = RenderGravity.TOP_CENTER, color = RGBAColor.BLACK)
|
||||
wrap.draw(TranslatableComponent("gui.jei.category.smelting.experience", average), 40f, 1f, gravity = RenderGravity.TOP_CENTER, color = RGBAColor.BLACK)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user