Add alt power view with shift pressed in flywheel battery screen

This commit is contained in:
DBotThePony 2025-02-25 12:06:32 +07:00
parent ab68f8d36d
commit 2bcc1965ce
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -5,6 +5,7 @@ import net.minecraft.network.chat.Component
import net.minecraft.world.entity.player.Inventory
import net.minecraft.world.item.ItemStack
import net.minecraft.world.item.Items
import ru.dbotthepony.mc.otm.client.ShiftPressedCond
import ru.dbotthepony.mc.otm.client.render.RenderGravity
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.client.screen.panels.Dock
@ -46,7 +47,7 @@ class FlywheelBatteryScreen(menu: FlywheelBatteryMenu, inventory: Inventory, tit
it.dock = Dock.TOP
}
DynamicLabel(this, frame, textSupplier = Supplier { menu.currentLossPerTick.get().formatPower(decimalPlaces = 6) }).also {
DynamicLabel(this, frame, textSupplier = Supplier { menu.currentLossPerTick.get().formatPower(decimalPlaces = 4, formatAsReadable = ShiftPressedCond) }).also {
it.dock = Dock.TOP
}
@ -54,7 +55,7 @@ class FlywheelBatteryScreen(menu: FlywheelBatteryMenu, inventory: Inventory, tit
it.dock = Dock.TOP
}
DynamicLabel(this, frame, textSupplier = Supplier { (menu.currentLossPerTick.get() * 20).formatPower() }).also {
DynamicLabel(this, frame, textSupplier = Supplier { (menu.currentLossPerTick.get() * 20).formatPower(formatAsReadable = ShiftPressedCond) }).also {
it.dock = Dock.TOP
}