diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-06-13 22:22:21 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-06-13 22:22:21 +0200 |
commit | 9deda23619394fa2be1439ab7912565467955a0a (patch) | |
tree | 6da27eaea397ccc813e9a042bab7bb1713676e71 | |
parent | 529639fdd0683066eadffe93473a300a2177c008 (diff) | |
download | skyhanni-9deda23619394fa2be1439ab7912565467955a0a.tar.gz skyhanni-9deda23619394fa2be1439ab7912565467955a0a.tar.bz2 skyhanni-9deda23619394fa2be1439ab7912565467955a0a.zip |
formatting
4 files changed, 36 insertions, 36 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt b/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt index 5728ce502..834c913cf 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt @@ -20,11 +20,11 @@ object GardenCropUpgrades { private val patternGroup = RepoPattern.group("garden.cropupgrades") private val tierPattern by patternGroup.pattern( "tier", - "§7Current Tier: §.(?<level>\\d)§7/§a9" + "§7Current Tier: §.(?<level>\\d)§7/§a9", ) private val chatUpgradePattern by patternGroup.pattern( "chatupgrade", - "\\s+§r§6§lCROP UPGRADE §e(?<crop>[\\w ]+)§7 #(?<tier>\\d)" + "\\s+§r§6§lCROP UPGRADE §e(?<crop>[\\w ]+)§7 #(?<tier>\\d)", ) private val cropUpgrades: MutableMap<CropType, Int>? get() = GardenAPI.storage?.cropUpgrades diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/CropPage.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/CropPage.kt index e05ac4272..926f83d50 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/CropPage.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/CropPage.kt @@ -12,7 +12,7 @@ import at.hannibal2.skyhanni.utils.renderables.Renderable class CropPage(val crop0: () -> CropType, sizeX: Int, sizeY: Int, paddingX: Int = 15, paddingY: Int = 7) : GuideTablePage( - sizeX, sizeY, paddingX, paddingY + sizeX, sizeY, paddingX, paddingY, ) { val crop get() = crop0() @@ -30,9 +30,9 @@ class CropPage(val crop0: () -> CropType, sizeX: Int, sizeY: Int, paddingX: Int toolLines[0], equipDisplay(), toolLines[1], - ) + ), ), - emptyList() + emptyList(), ) } @@ -46,7 +46,8 @@ class CropPage(val crop0: () -> CropType, sizeX: Int, sizeY: Int, paddingX: Int width: Int = 90, ) = Renderable.clickable( GuiRenderUtils.getFarmingBar(label(crop), tooltip(crop), current, max, width), - { onClick(crop) }) + { onClick(crop) }, + ) private fun toolLines(): List<Renderable> = FortuneStats.entries.filter { it.isActive() && it !in headers }.map { it.getFarmingBar() } @@ -59,19 +60,19 @@ class CropPage(val crop0: () -> CropType, sizeX: Int, sizeY: Int, paddingX: Int Renderable.horizontalContainer( listOf( Renderable.verticalContainer(FarmingItems.getArmorDisplay(), 2), - Renderable.verticalContainer(FarmingItems.getEquipmentDisplay(), 2) + Renderable.verticalContainer(FarmingItems.getEquipmentDisplay(), 2), ), 2, - horizontalAlign = RenderUtils.HorizontalAlignment.CENTER + horizontalAlign = RenderUtils.HorizontalAlignment.CENTER, ), - Renderable.horizontalContainer(FarmingItems.getPetsDisplay(true), 2) + Renderable.horizontalContainer(FarmingItems.getPetsDisplay(true), 2), ), 2, - verticalAlign = RenderUtils.VerticalAlignment.BOTTOM + verticalAlign = RenderUtils.VerticalAlignment.BOTTOM, ), 164, horizontalAlign = RenderUtils.HorizontalAlignment.CENTER, - verticalAlign = RenderUtils.VerticalAlignment.BOTTOM + verticalAlign = RenderUtils.VerticalAlignment.BOTTOM, ) companion object { diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/TrackSoundsCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/TrackSoundsCommand.kt index fdbb7c285..50b0c417d 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/TrackSoundsCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/TrackSoundsCommand.kt @@ -48,7 +48,7 @@ object TrackSoundsCommand { if (isRecording) { ChatUtils.userError( "Still tracking sounds, wait for the other tracking to complete before starting a new one, " + - "or type §e/shtracksounds end §cto end it prematurely" + "or type §e/shtracksounds end §cto end it prematurely", ) return } @@ -70,10 +70,9 @@ object TrackSoundsCommand { val soundsToDisplay = sounds.takeWhile { startTime.passedSince() - it.first < 3.seconds } - display = soundsToDisplay - .take(10).reversed().map { - Renderable.string("§3" + it.second.soundName + " §8p:" + it.second.pitch + " §7v:" + it.second.volume) - } + display = soundsToDisplay.take(10).reversed().map { + Renderable.string("§3" + it.second.soundName + " §8p:" + it.second.pitch + " §7v:" + it.second.volume) + } worldSounds = soundsToDisplay.map { it.second }.groupBy { it.location } // The function must run after cutOffTime has passed to ensure thread safety @@ -125,7 +124,7 @@ object TrackSoundsCommand { event.drawDynamicText( key.up(-0.2), "§7P: §e${sound.pitch.round(2)} §7V: $volumeColor${sound.volume.round(2)}", - scaleMultiplier = 0.8 + scaleMultiplier = 0.8, ) } } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt b/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt index 6079f79d5..f00cba6c5 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt @@ -106,12 +106,12 @@ interface Renderable { hoverable( underlined(renderable), renderable, bypassChecks, condition = condition, - highlightsOnHoverSlots = highlightsOnHoverSlots + highlightsOnHoverSlots = highlightsOnHoverSlots, ), onClick, 0, bypassChecks, - condition + condition, ) } @@ -125,7 +125,7 @@ interface Renderable { return clickable( hoverTips(text, tips, bypassChecks = bypassChecks, onHover = onHover), onClick, - bypassChecks = bypassChecks + bypassChecks = bypassChecks, ) } @@ -139,7 +139,7 @@ interface Renderable { return multiClickable( hoverTips(text, tips, bypassChecks = bypassChecks, onHover = onHover), click, - bypassChecks = bypassChecks + bypassChecks = bypassChecks, ) } @@ -359,10 +359,10 @@ interface Renderable { ySpacing, rescaleSkulls, horizontalAlign = horizontalAlign, - verticalAlign = verticalAlign + verticalAlign = verticalAlign, ), item.getTooltip(Minecraft.getMinecraft().thePlayer, false), - stack = item + stack = item, ) fun itemStack( @@ -438,7 +438,7 @@ interface Renderable { val list by lazy { Minecraft.getMinecraft().fontRendererObj.listFormattedStringToWidth( - text, (width / scale).toInt() + text, (width / scale).toInt(), ) } @@ -509,7 +509,7 @@ interface Renderable { posX + xOffsets[index], posY + yOffsets[rowIndex], xOffsets[index + 1] - xOffsets[index] - emptySpaceX, - yOffsets[rowIndex + 1] - yOffsets[rowIndex] - emptySpaceY + yOffsets[rowIndex + 1] - yOffsets[rowIndex] - emptySpaceY, ) GlStateManager.popMatrix() } @@ -563,12 +563,12 @@ interface Renderable { } } else { val (textureX, textureY) = if (texture == SkillProgressBarConfig.TexturedBar.UsedTexture.MATCH_PACK) Pair( - 0, 64 + 0, 64, ) else Pair(0, 0) Minecraft.getMinecraft().renderEngine.bindTexture(ResourceLocation(texture.path)) Minecraft.getMinecraft().ingameGUI.drawTexturedModalRect( - posX, posY, textureX, textureY, width, height + posX, posY, textureX, textureY, width, height, ) if (useChroma) { @@ -578,7 +578,7 @@ interface Renderable { GlStateManager.color(color.red / 255f, color.green / 255f, color.blue / 255f, 1f) } Minecraft.getMinecraft().ingameGUI.drawTexturedModalRect( - posX, posY, textureX, textureY + height, progress, height + posX, posY, textureX, textureY + height, progress, height, ) if (useChroma) { @@ -734,14 +734,14 @@ interface Renderable { 0, virtualHeight - height, velocity, - button + button, ) private val end get() = scroll.asInt() + height override fun render(posX: Int, posY: Int) { scroll.update( - isHovered(posX, posY) && shouldAllowLink(true, bypassChecks) + isHovered(posX, posY) && shouldAllowLink(true, bypassChecks), ) var renderY = 0 @@ -797,12 +797,12 @@ interface Renderable { if (hasHeader) yOffsets[1] else 0, virtualHeight - height, velocity, - button + button, ) override fun render(posX: Int, posY: Int) { scroll.update( - isHovered(posX, posY) && shouldAllowLink(true, bypassChecks) + isHovered(posX, posY) && shouldAllowLink(true, bypassChecks), ) var renderY = 0 @@ -813,7 +813,7 @@ interface Renderable { posX + xOffsets[index], posY + renderY, xOffsets[index + 1] - xOffsets[index], - yOffsets[1] + yOffsets[1], ) GlStateManager.translate(-xOffsets[index].toFloat(), 0f, 0f) } @@ -840,7 +840,7 @@ interface Renderable { posX + xOffsets[index], posY + renderY, xOffsets[index + 1] - xOffsets[index], - yOffsets[rowIndex + 1] - yOffsets[rowIndex] + yOffsets[rowIndex + 1] - yOffsets[rowIndex], ) GlStateManager.translate(-xOffsets[index].toFloat(), 0f, 0f) } @@ -903,7 +903,7 @@ interface Renderable { bottomOutlineColor, borderOutlineThickness, radius, - blur + blur, ) GlStateManager.translate(padding.toFloat(), padding.toFloat(), 0f) @@ -948,7 +948,7 @@ interface Renderable { entityScale, mouseXRelativeToPlayer, mouseYRelativeToPlayer, - player + player, ) GlStateManager.translate(0f, 0f, -100f) } |