Skip to content

Commit

Permalink
make comma option apply to custom splash
Browse files Browse the repository at this point in the history
  • Loading branch information
My-Name-Is-Jeff committed Nov 3, 2021
1 parent f00f22f commit 5669ff0
Showing 1 changed file with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import net.minecraft.client.renderer.GlStateManager
import net.minecraft.client.renderer.RenderGlobal
import net.minecraft.client.renderer.entity.RenderManager
import net.minecraft.entity.item.EntityArmorStand
import skytils.skytilsmod.Skytils
import skytils.skytilsmod.utils.NumberUtil
import skytils.skytilsmod.utils.NumberUtil.format
import skytils.skytilsmod.utils.Utils.random
import skytils.skytilsmod.utils.graphics.ScreenRenderer
Expand Down Expand Up @@ -121,12 +123,18 @@ class DamageSplashEntity(
}
color = Damage.fromSymbol(symbol)?.color
}
displayText = "${format(damage.toLong())}${exportStringIfTrue(love, "")}${
exportStringIfTrue(
extremeFocus,
""
)
}${exportStringIfTrue(octodexterity, "+")}"
displayText =
"${if (Skytils.config.commaDamage) NumberUtil.nf.format(damage.toLong()) else format(damage.toLong())}${
exportStringIfTrue(
love,
""
)
}${
exportStringIfTrue(
extremeFocus,
""
)
}${exportStringIfTrue(octodexterity, "+")}"
val uuid = UUID(random.nextLong(), random.nextLong())
if (added.containsValue(uuid)) remove() else added[displayText] = uuid
}
Expand Down

0 comments on commit 5669ff0

Please sign in to comment.