diff options
Diffstat (limited to 'src/compat')
-rw-r--r-- | src/compat/rei/java/moe/nea/firmament/compat/rei/recipes/SBReforgeRecipe.kt | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/compat/rei/java/moe/nea/firmament/compat/rei/recipes/SBReforgeRecipe.kt b/src/compat/rei/java/moe/nea/firmament/compat/rei/recipes/SBReforgeRecipe.kt index b8313a6..7a289b9 100644 --- a/src/compat/rei/java/moe/nea/firmament/compat/rei/recipes/SBReforgeRecipe.kt +++ b/src/compat/rei/java/moe/nea/firmament/compat/rei/recipes/SBReforgeRecipe.kt @@ -17,6 +17,7 @@ import me.shedaniel.rei.api.common.display.Display import me.shedaniel.rei.api.common.display.DisplaySerializer import me.shedaniel.rei.api.common.entry.EntryIngredient import me.shedaniel.rei.api.common.entry.EntryStack +import util.skyblock.stats.StatFormatting import net.minecraft.entity.EntityType import net.minecraft.entity.SpawnReason import net.minecraft.text.Text @@ -31,6 +32,7 @@ import moe.nea.firmament.repo.ReforgeStore import moe.nea.firmament.repo.RepoItemTypeCache import moe.nea.firmament.repo.RepoManager import moe.nea.firmament.repo.SBItemStack +import moe.nea.firmament.util.skyblock.stats.StatBlock import moe.nea.firmament.util.AprilFoolsUtil import moe.nea.firmament.util.FirmFormatters import moe.nea.firmament.util.SkyblockId @@ -39,6 +41,7 @@ import moe.nea.firmament.util.grey import moe.nea.firmament.util.skyblock.ItemType import moe.nea.firmament.util.skyblock.Rarity import moe.nea.firmament.util.skyblock.SkyBlockItems +import moe.nea.firmament.util.skyblock.stats.StatLine import moe.nea.firmament.util.skyblockId import moe.nea.firmament.util.tr @@ -106,7 +109,10 @@ class SBReforgeRecipe( for ((i, statId) in display.reforge.statUniverse.withIndex()) { val label = Widgets.createLabel( Point(bounds.minX + 10 + 24 + 24 + 20, bounds.minY + 8 + i * 11), - SBItemStack.Companion.StatLine(SBItemStack.statIdToName(statId), null).reconstitute(7)) + StatLine( + StatFormatting.findForId(statId), + 0.0 + ).reconstitute(7)) .horizontalAlignment(Label.LEFT_ALIGNED) statToLineMappings.add(statId to label) list.add(label) @@ -116,9 +122,9 @@ class SBReforgeRecipe( val stats = display.reforge.reforgeStats?.get(entry.rarity) ?: mapOf() for ((stat, label) in statToLineMappings) { label.message = - SBItemStack.Companion.StatLine( - SBItemStack.statIdToName(stat), null, - valueNum = stats[stat] + StatLine( + StatFormatting.findForId(stat), + stats[stat] ?: 0.0 ).reconstitute(7) } } |