Skip to content

Commit

Permalink
fix: force two-decimal precision on terracotta respawn timers (#440)
Browse files Browse the repository at this point in the history
  • Loading branch information
FluxCapacitor2 authored Jan 15, 2024
1 parent 6ce0a40 commit ce26682
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import gg.skytils.skytilsmod.features.impl.handlers.MayorInfo
import gg.skytils.skytilsmod.listeners.DungeonListener
import gg.skytils.skytilsmod.mixins.transformers.accessors.AccessorEnumDyeColor
import gg.skytils.skytilsmod.utils.*
import gg.skytils.skytilsmod.utils.NumberUtil.roundToPrecision
import gg.skytils.skytilsmod.utils.Utils.equalsOneOf
import gg.skytils.skytilsmod.utils.graphics.ScreenRenderer
import gg.skytils.skytilsmod.utils.graphics.SmartFontRenderer
Expand Down Expand Up @@ -613,7 +612,7 @@ object DungeonFeatures {
val diff = it.value - System.currentTimeMillis()
RenderUtil.drawLabel(
it.key.middleVec(),
"${(diff / 1000.0).roundToPrecision(2)}s",
"${"%.2f".format(diff / 1000.0)}s",
Color.WHITE,
event.partialTicks,
stack
Expand Down

0 comments on commit ce26682

Please sign in to comment.