Skip to content

Commit

Permalink
Force two-decimal precision on terracotta respawn timers
Browse files Browse the repository at this point in the history
  • Loading branch information
FluxCapacitor2 committed Jan 15, 2024
1 parent 254a8b7 commit e94e8a8
Showing 1 changed file with 1 addition and 3 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 All @@ -42,7 +41,6 @@ import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import net.minecraft.block.BlockStainedGlass
import net.minecraft.block.material.Material
import net.minecraft.client.entity.EntityOtherPlayerMP
import net.minecraft.client.gui.GuiScreen
import net.minecraft.client.renderer.GlStateManager
Expand Down Expand Up @@ -614,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 e94e8a8

Please sign in to comment.