Update deprecated method usage
This commit is contained in:
parent
e53a7f65d8
commit
78896089ec
@ -44,7 +44,7 @@ open class FluidGaugePanel<out S : Screen>(
|
||||
|
||||
protected open fun makeTooltip(): MutableList<Component> {
|
||||
val tooltip = mutableListOf<Component>(
|
||||
if (widget.fluid.isEmpty) TranslatableComponent("otm.gui.empty") else TextComponent(String.format("%s: %.2f%%", widget.fluid.displayName.string, widget.percentage * 100.0)),
|
||||
if (widget.fluid.isEmpty) TranslatableComponent("otm.gui.empty") else TextComponent(String.format("%s: %.2f%%", widget.fluid.hoverName.string, widget.percentage * 100.0)),
|
||||
formatFluidLevel(if (widget.fluid.isEmpty) 0 else widget.fluid.amount, widget.maxCapacity, formatAsReadable = ShiftPressedCond)
|
||||
)
|
||||
|
||||
@ -67,7 +67,7 @@ open class FluidGaugePanel<out S : Screen>(
|
||||
override fun innerRender(graphics: MGUIGraphics, mouseX: Float, mouseY: Float, partialTick: Float) {
|
||||
if (widget.percentage > 0.01f && widget.fluid.isNotEmpty) {
|
||||
val data = IClientFluidTypeExtensions.of(widget.fluid.fluid)
|
||||
val texture = data.stillTexture!!
|
||||
val texture = data.stillTexture
|
||||
val sprite = minecraft.getTextureAtlas(InventoryMenu.BLOCK_ATLAS).apply(texture)!!
|
||||
val tint = RGBAColor.argb(data.getTintColor(widget.fluid))
|
||||
var height = (height * widget.percentage) / 16f
|
||||
|
Loading…
Reference in New Issue
Block a user