diff options
author | Walker Selby <git@walkerselby.com> | 2023-11-22 12:10:51 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-22 13:10:51 +0100 |
commit | 5c9cbdba458638ae962ccf92e750ebdcea718478 (patch) | |
tree | f4ab8c3f6abe71d4e056125f582cfde465fd79d0 /src/main/java/at/hannibal2/skyhanni | |
parent | 7137b0a07ba4c4efe65282a18ebc68f25ffa1796 (diff) | |
download | skyhanni-5c9cbdba458638ae962ccf92e750ebdcea718478.tar.gz skyhanni-5c9cbdba458638ae962ccf92e750ebdcea718478.tar.bz2 skyhanni-5c9cbdba458638ae962ccf92e750ebdcea718478.zip |
Internal Change: More Random Cleanup (#724)
More Random Cleanup #724
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
46 files changed, 91 insertions, 105 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt index 3af97e0f9..29a344b18 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt @@ -24,7 +24,7 @@ import kotlin.time.Duration.Companion.minutes class GuiEditManager { - var lastHotkeyPressed = SimpleTimeMark.farPast() + private var lastHotkeyPressed = SimpleTimeMark.farPast() @SubscribeEvent fun onKeyClick(event: LorenzKeyPressEvent) { diff --git a/src/main/java/at/hannibal2/skyhanni/data/IslandType.kt b/src/main/java/at/hannibal2/skyhanni/data/IslandType.kt index 3ab213025..17755da88 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/IslandType.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/IslandType.kt @@ -31,6 +31,6 @@ enum class IslandType(val displayName: String, val apiName: String = "null") { fun getByNameOrUnknown(name: String) = getByNameOrNull(name) ?: UNKNOWN fun getByName(name: String) = getByNameOrNull(name) ?: error("IslandType not found: '$name'") - fun getByNameOrNull(name: String) = entries.firstOrNull { it.displayName == name } + private fun getByNameOrNull(name: String) = entries.firstOrNull { it.displayName == name } } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilterGui.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilterGui.kt index 3c1586d61..b9a9a6e0b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilterGui.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilterGui.kt @@ -76,7 +76,7 @@ class ChatFilterGui(private val history: List<ChatManager.MessageFilteringResult GlStateManager.color(1f, 1f, 1f, 1f) } - fun splitLine(comp: IChatComponent): List<IChatComponent> { + private fun splitLine(comp: IChatComponent): List<IChatComponent> { return GuiUtilRenderComponents.splitText( comp, w - (ChatManager.ActionKind.maxLength + reasonMaxLength + 10 + 10), @@ -93,11 +93,11 @@ class ChatFilterGui(private val history: List<ChatManager.MessageFilteringResult } } - fun setScroll(newScroll: Double) { + private fun setScroll(newScroll: Double) { this.scroll = newScroll.coerceAtMost(historySize - h + 10.0).coerceAtLeast(0.0) } - fun drawMultiLineText(comp: IChatComponent, xPos: Int): Int { + private fun drawMultiLineText(comp: IChatComponent, xPos: Int): Int { val modifiedSplitText = splitLine(comp) for (line in modifiedSplitText) { drawString( diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt index ff3444bb0..fa2dfaa06 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt @@ -9,18 +9,18 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class CompactBestiaryChatMessage { - var inBestiary = false - var bestiaryDescription = mutableListOf<String>() - var acceptMoreDescription = true + private var inBestiary = false + private var bestiaryDescription = mutableListOf<String>() + private var acceptMoreDescription = true var command = "" private var blockedLines = 0 - var lastBorder: IChatComponent? = null - var lastEmpty: IChatComponent? = null + private var lastBorder: IChatComponent? = null + private var lastEmpty: IChatComponent? = null - var milestoneMessage: String? = null + private var milestoneMessage: String? = null - val milestonePattern = "^.+(§8\\d{1,3}➡§e\\d{1,3})$".toRegex() + private val milestonePattern = "^.+(§8\\d{1,3}➡§e\\d{1,3})$".toRegex() @SubscribeEvent fun onChatMessage(event: LorenzChatEvent) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt index 834cd8fd6..8119535fd 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt @@ -17,8 +17,8 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class DungeonCopilot { - var nextStep = "" - var searchForKey = false + private var nextStep = "" + private var searchForKey = false @SubscribeEvent fun onChatMessage(event: LorenzChatEvent) { @@ -142,4 +142,4 @@ class DungeonCopilot { event.move(3, "dungeon.copilotEnabled", "dungeon.dungeonCopilot.enabled") event.move(3, "dungeon.copilotPos", "dungeon.dungeonCopilot.pos") } -}
\ No newline at end of file +} diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt index da2d35e0d..801b28ab4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt @@ -81,8 +81,7 @@ class DungeonHideItems { event.isCanceled = true } - val itemStack = head - if (itemStack != null && itemStack.cleanName() == "Superboom TNT") { + if (head != null && head.cleanName() == "Superboom TNT") { event.isCanceled = true hideParticles[entity] = System.currentTimeMillis() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt index 48a0a9925..0c5b4fc52 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt @@ -80,7 +80,7 @@ object DungeonLividFinder { RenderLivingEntityHelper.setNoHurtTime(newLivid) { shouldHighlight() } } - fun shouldHighlight() = getLividAlive() != null && config.enabled + private fun shouldHighlight() = getLividAlive() != null && config.enabled private fun getLividAlive() = lividEntity?.let { if (!it.isDead && it.health > 0.5) it else null @@ -132,7 +132,7 @@ object DungeonLividFinder { gotBlinded = false } - fun inDungeon(): Boolean { + private fun inDungeon(): Boolean { if (!LorenzUtils.inDungeons) return false if (!DungeonAPI.inBossRoom) return false if (!DungeonAPI.isOneOf("F5", "M5")) return false diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt index 486a19d80..1b23bb1de 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt @@ -22,7 +22,7 @@ class GriffinBurrowParticleFinder { private val recentlyDugParticleBurrows = mutableListOf<LorenzVec>() private val burrows = mutableMapOf<LorenzVec, Burrow>() - var lastDugParticleBurrow: LorenzVec? = null + private var lastDugParticleBurrow: LorenzVec? = null @SubscribeEvent(priority = EventPriority.LOW, receiveCanceled = true) fun onChatPacket(event: PacketEvent.ReceiveEvent) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt index ec0a1e2ae..a0b34e328 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt @@ -23,23 +23,23 @@ import kotlin.math.sin */ class SoopyGuessBurrow { - var dingIndex = 0 - var lastDing = 0L - var lastDingPitch = 0f - var firstPitch = 0f - var lastParticlePoint: LorenzVec? = null - var lastParticlePoint2: LorenzVec? = null - var firstParticlePoint: LorenzVec? = null - var particlePoint: LorenzVec? = null - var guessPoint: LorenzVec? = null + private var dingIndex = 0 + private var lastDing = 0L + private var lastDingPitch = 0f + private var firstPitch = 0f + private var lastParticlePoint: LorenzVec? = null + private var lastParticlePoint2: LorenzVec? = null + private var firstParticlePoint: LorenzVec? = null + private var particlePoint: LorenzVec? = null + private var guessPoint: LorenzVec? = null - var lastSoundPoint: LorenzVec? = null - var locs = mutableListOf<LorenzVec>() + private var lastSoundPoint: LorenzVec? = null + private var locs = mutableListOf<LorenzVec>() - var dingSlope = mutableListOf<Float>() + private var dingSlope = mutableListOf<Float>() var distance: Double? = null - var distance2: Double? = null + private var distance2: Double? = null @SubscribeEvent fun onWorldChange(event: LorenzWorldChangeEvent) { @@ -280,4 +280,4 @@ class SoopyGuessBurrow { } private fun isEnabled() = DianaAPI.featuresEnabled() && SkyHanniMod.feature.event.diana.burrowsSoopyGuess -}
\ No newline at end of file +} diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/FarmingContestAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/FarmingContestAPI.kt index d2d866f36..2f51e11f3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/FarmingContestAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/FarmingContestAPI.kt @@ -128,7 +128,7 @@ object FarmingContestAPI { fun getContestAtTime(time: Long) = contests[time] - fun getContestsOfType(crop: CropType) = contests.values.filter { it.crop == crop } + private fun getContestsOfType(crop: CropType) = contests.values.filter { it.crop == crop } fun calculateAverages(crop: CropType): Pair<Int, Map<ContestBracket, Int>> { var amount = 0 diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestFFNeededDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestFFNeededDisplay.kt index ec3284ef0..3f03cbe4b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestFFNeededDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestFFNeededDisplay.kt @@ -81,10 +81,6 @@ class JacobContestFFNeededDisplay { add(listOf("§cThis is too low, showing 19.9 Blocks/second instead!")) blocksPerSecond = 19.9 } - if (blocksPerSecond < 1) { - addAsSingletonList("§cLow blocks per second!") - addAsSingletonList("§cFarm this crop for couple more seconds!") - } } addAsSingletonList("") diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobFarmingContestsInventory.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobFarmingContestsInventory.kt index e7af728cc..dfc83e404 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobFarmingContestsInventory.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobFarmingContestsInventory.kt @@ -52,10 +52,7 @@ class JacobFarmingContestsInventory { val name = item.name!! - if (foundEvents.contains(name)) { - } else { - foundEvents.add(name) - } + foundEvents.add(name) val time = FarmingContestAPI.getSbTimeFor(name) ?: continue FarmingContestAPI.addContest(time, item) if (config.realTime) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt index 13125c349..fb9bdfaac 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt @@ -519,7 +519,7 @@ class FarmingWeightDisplay { openWebsite(name, ignoreCooldown = true) } - var lastName = "" + private var lastName = "" private fun openWebsite(name: String, ignoreCooldown: Boolean = false) { if (!ignoreCooldown && lastOpenWebsite.passedSince() < 5.seconds && name == lastName) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WildStrawberryDyeNotification.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WildStrawberryDyeNotification.kt index 29fe278ae..d923efb6d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WildStrawberryDyeNotification.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WildStrawberryDyeNotification.kt @@ -15,7 +15,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.seconds class WildStrawberryDyeNotification { - var lastCloseTime = 0L + private var lastCloseTime = 0L val item by lazy { "DYE_WILD_STRAWBERRY".asInternalName() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt index 9c56927fb..2fe7e2f3a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt @@ -86,7 +86,6 @@ class GardenVisitorFeatures { val pair = ItemUtils.readItemAmount(line) if (pair == null) { - LorenzUtils.error("Could not read item '$line'") continue } val (itemName, amount) = pair @@ -97,7 +96,7 @@ class GardenVisitorFeatures { readToolTip(visitor, offerItem) if (visitor.status == VisitorAPI.VisitorStatus.NEW) { - val alreadyReady = offerItem.getLore().any { it == "§eClick to give!" } == true + val alreadyReady = offerItem.getLore().any { it == "§eClick to give!" } if (alreadyReady) { VisitorAPI.changeStatus(visitor, VisitorAPI.VisitorStatus.READY, "inSacks") visitor.inSacks = true @@ -270,7 +269,6 @@ class GardenVisitorFeatures { if (visitor.lastLore.isEmpty()) { readToolTip(visitor, event.itemStack) - LorenzUtils.error("Reloaded the visitor data of that inventory, this should not happen.") } toolTip.addAll(visitor.lastLore) diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt index 026d263ee..a4d370e62 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt @@ -27,7 +27,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class HighlightVisitorsOutsideOfGarden { private var visitorJson = mapOf<String?, List<GardenJson.GardenVisitor>>() - val config get() = SkyHanniMod.feature.garden.visitors + private val config get() = SkyHanniMod.feature.garden.visitors @SubscribeEvent fun onRepoReload(event: RepositoryReloadEvent) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt index 1ad82a241..f71ab6883 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt @@ -153,7 +153,7 @@ object VisitorAPI { found = false continue } - val name = VisitorAPI.fromHypixelName(line) + val name = fromHypixelName(line) // Hide hypixel watchdog entries if (name.contains("§c") && !name.contains("Spaceman") && !name.contains("Grandma Wolf")) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt index f210f857c..0f8c3fe4a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt @@ -17,7 +17,7 @@ import kotlin.time.Duration.Companion.milliseconds // Delaying key presses by 300ms comes from NotEnoughUpdates object HarpFeatures { - val config get() = SkyHanniMod.feature.inventory.helper.harp + private val config get() = SkyHanniMod.feature.inventory.helper.harp private var lastClick = SimpleTimeMark.farPast() private object KeyIterable : Iterable<Int> { diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt index 455efcef0..abb0c0f4c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt @@ -18,7 +18,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class FireVeilWandParticles { private val config get() = SkyHanniMod.feature.itemAbilities.fireVeilWands - var lastClick = 0L + private var lastClick = 0L val item by lazy { "FIRE_VEIL_WAND".asInternalName() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/crystalhollows/CrystalHollowsNamesInCore.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/crystalhollows/CrystalHollowsNamesInCore.kt index af4d3abf9..b1682baad 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/crystalhollows/CrystalHollowsNamesInCore.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/crystalhollows/CrystalHollowsNamesInCore.kt @@ -12,7 +12,7 @@ import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class CrystalHollowsNamesInCore { - val config get() = SkyHanniMod.feature.mining + private val config get() = SkyHanniMod.feature.mining private val coreLocations = mapOf( LorenzVec(550, 116, 550) to "§8Precursor City", LorenzVec(552, 116, 474) to "§bMithril Deposits", @@ -20,7 +20,7 @@ class CrystalHollowsNamesInCore { LorenzVec(474, 116, 554) to "§6Goblin Hideout" ) - var showWaypoints = false + private var showWaypoints = false @SubscribeEvent fun onTick(event: LorenzTickEvent) { @@ -44,4 +44,4 @@ class CrystalHollowsNamesInCore { } fun isEnabled() = IslandType.CRYSTAL_HOLLOWS.isInIsland() && config.crystalHollowsNamesInCore -}
\ No newline at end of file +} diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/BrewingStandOverlay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/BrewingStandOverlay.kt index d7bee2948..cbcb52db7 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/BrewingStandOverlay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/BrewingStandOverlay.kt @@ -36,8 +36,8 @@ class BrewingStandOverlay { if (name.contains(" or ")) return event.stackTip = name - event.offsetX = event.offsetX + 3 + event.offsetX += 3 event.offsetY = -5 event.alignLeft = false } -}
\ No newline at end of file +} diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/QuickModMenuSwitch.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/QuickModMenuSwitch.kt index e6ce5d8f9..9b6987fad 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/QuickModMenuSwitch.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/QuickModMenuSwitch.kt @@ -52,7 +52,7 @@ object QuickModMenuSwitch { } } - class Mod(val name: String, val description: List<String>, val command: String, val guiPath: List<String>) { + class Mod(val name: String, val description: List<String>, val command: String, private val guiPath: List<String>) { fun isInGui() = guiPath.any { latestGuiPath.startsWith(it) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/SkyBlockKickDuration.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/SkyBlockKickDuration.kt index d536b8f53..7ca34eafb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/SkyBlockKickDuration.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/SkyBlockKickDuration.kt @@ -16,10 +16,10 @@ import kotlin.time.Duration.Companion.seconds class SkyBlockKickDuration { private val config get() = SkyHanniMod.feature.misc.kickDuration - var kickMessage = false - var showTime = false - var lastKickTime = SimpleTimeMark.farPast() - var hasWarned = false + private var kickMessage = false + private var showTime = false + private var lastKickTime = SimpleTimeMark.farPast() + private var hasWarned = false @SubscribeEvent fun onChat(event: LorenzChatEvent) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt index 86f917d35..59d44b1b7 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt @@ -95,7 +95,7 @@ object TrevorTracker { val storage = ProfileStorageData.profileSpecific?.trapperData ?: return storage.questsDone += 1 val rarity = matcher.group("rarity") - val foundRarity = TrapperMobRarity.values().firstOrNull { it.formattedName == rarity } ?: return + val foundRarity = TrapperMobRarity.entries.firstOrNull { it.formattedName == rarity } ?: return val old = storage.animalRarities[foundRarity] ?: 0 storage.animalRarities = storage.animalRarities.editCopy { this[foundRarity] = old + 1 } saveAndUpdate() diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/update/GuiOptionEditorUpdateCheck.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/update/GuiOptionEditorUpdateCheck.kt index b3539c131..b4e517734 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/update/GuiOptionEditorUpdateCheck.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/update/GuiOptionEditorUpdateCheck.kt @@ -59,7 +59,7 @@ class GuiOptionEditorUpdateCheck(option: ProcessedOption) : GuiOptionEditor(opti GlStateManager.popMatrix() } - fun getButtonPosition(width: Int) = width - button.width + private fun getButtonPosition(width: Int) = width - button.width override fun getHeight(): Int { return 55 } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/update/UpdateManager.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/update/UpdateManager.kt index ab32d9aa7..c6e50e4ee 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/update/UpdateManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/update/UpdateManager.kt @@ -62,11 +62,11 @@ object UpdateManager { } } - fun isBetaRelease(): Boolean { + private fun isBetaRelease(): Boolean { return getCurrentVersion().contains("beta", ignoreCase = true) } - val config get() = SkyHanniMod.feature.about + private val config get() = SkyHanniMod.feature.about fun reset() { updateState = UpdateState.NONE @@ -119,7 +119,7 @@ object UpdateManager { }, MinecraftExecutor.OnThread) } - val context = UpdateContext( + private val context = UpdateContext( UpdateSource.githubUpdateSource("hannibal002", "SkyHanni"), UpdateTarget.deleteAndSaveInTheSameFolder(UpdateManager::class.java), CurrentVersion.ofTag(SkyHanniMod.version), @@ -137,5 +137,5 @@ object UpdateManager { NONE } - var potentialUpdate: PotentialUpdate? = null + private var potentialUpdate: PotentialUpdate? = null } diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt index 79a1a5361..52f5c23f4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt @@ -13,7 +13,7 @@ import at.hannibal2.skyhanni.utils.LocationUtils import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList -import at.hannibal2.skyhanni.utils.NEUItems +import at.hannibal2.skyhanni.utils.NEUItems.getItemStack import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import at.hannibal2.skyhanni.utils.jsonobjects.CrimsonIsleReputationJson.ReputationQuest @@ -80,7 +80,7 @@ class DailyMiniBossHelper(private val reputationHelper: CrimsonIsleReputationHel } else { val lineList = mutableListOf<Any>() lineList.add(" ") - lineList.add(NEUItems.getItemStack(displayItem)) + lineList.add(getItemStack(displayItem)) lineList.add("§5$displayName§7: $result") display.add(lineList) } diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt index b39c6d004..e17bd32ed 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt @@ -49,9 +49,9 @@ class RiftWiltedBerberisHelper { } } - fun nearestBerberis(location: LorenzVec): WiltedBerberis? { + private fun nearestBerberis(location: LorenzVec): WiltedBerberis? { return list.filter { it.currentParticles.distanceSq(location) < 8 } - .sortedBy { it.currentParticles.distanceSq(location) }.firstOrNull() + .minByOrNull { it.currentParticles.distanceSq(location) } } @SubscribeEvent diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftLarva.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftLarva.kt index 7c994ea1b..5629972ea 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftLarva.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftLarva.kt @@ -15,7 +15,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class RiftLarva { private val config get() = RiftAPI.config.area.wyldWoods.larvas private var hasHookInHand = false - val larvaSkullTexture = + private val larvaSkullTexture = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTgzYjMwZTlkMTM1YjA1MTkwZWVhMmMzYWM2MWUyYWI1NWEyZDgxZTFhNThkYmIyNjk4M2ExNDA4MjY2NCJ9fX0=" @SubscribeEvent diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt index 1093a8a69..7d1e9b9ba 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt @@ -16,7 +16,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class RiftOdonata { private val config get() = RiftAPI.config.area.wyldWoods.odonata private var hasBottleInHand = false - val odonataSkullTexture = + private val odonataSkullTexture = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOWZkODA2ZGVmZGZkZjU5YjFmMjYwOWM4ZWUzNjQ2NjZkZTY2MTI3YTYyMzQxNWI1NDMwYzkzNThjNjAxZWY3YyJ9fX0=" private val emptyBottle by lazy { "EMPTY_ODONATA_BOTTLE".asInternalName() } diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/FontRendererHook.kt b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/FontRendererHook.kt index f639fbe04..d8a4e8344 100644 --- a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/FontRendererHook.kt +++ b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/FontRendererHook.kt @@ -44,7 +44,7 @@ object FontRendererHook { * [FontRenderer#drawString()][net.minecraft.client.gui.FontRenderer.drawString] rather than a custom font renderer * */ - fun setupChromaFont() { + private fun setupChromaFont() { DRAW_CHROMA.startChroma() DRAW_CHROMA_SHADOW.startChroma() } @@ -52,7 +52,7 @@ object FontRendererHook { /** * See [setupChromaFont] */ - fun endChromaFont() { + private fun endChromaFont() { DRAW_CHROMA.endChroma() DRAW_CHROMA_SHADOW.endChroma() } diff --git a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniConfigSearchResetCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniConfigSearchResetCommand.kt index cee60e7ae..6f1bc9f64 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniConfigSearchResetCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniConfigSearchResetCommand.kt @@ -244,8 +244,7 @@ object SkyHanniConfigSearchResetCommand { if (this is Runnable) return "Runnable" // we don't use javaClass.simpleName since we want to catch edge cases - val name = javaClass.name - return when (name) { + return when (val name = javaClass.name) { "at.hannibal2.skyhanni.config.core.config.Position" -> "Position" "java.lang.Boolean" -> "Boolean" "java.lang.Integer" -> "Int" diff --git a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt index e6cb3e841..b86ac7200 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt @@ -62,7 +62,7 @@ class SkyHanniDebugsAndTests { val debugLogger = LorenzLogger("debug/test") - fun runn(compound: NBTTagCompound, text: String) { + private fun runn(compound: NBTTagCompound, text: String) { print("$text'$compound'") for (s in compound.keySet) { val element = compound.getCompoundTag(s) diff --git a/src/main/java/at/hannibal2/skyhanni/utils/BlockUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/BlockUtils.kt index 5a14cadf7..b37f9b885 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/BlockUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/BlockUtils.kt @@ -40,7 +40,7 @@ object BlockUtils { return false } - fun rayTrace(start: LorenzVec, direction: LorenzVec, distance: Double = 50.0): LorenzVec? { + private fun rayTrace(start: LorenzVec, direction: LorenzVec, distance: Double = 50.0): LorenzVec? { val help = direction.normalize().multiply(distance) val target = start.add(help) val result = Minecraft.getMinecraft().theWorld.rayTraceBlocks(start.toVec3(), target.toVec3()) @@ -53,4 +53,4 @@ object BlockUtils { Minecraft.getMinecraft().thePlayer.lookVec.toLorenzVec(), duration ) -}
\ No newline at end of file +} diff --git a/src/main/java/at/hannibal2/skyhanni/utils/EntityOutlineRenderer.kt b/src/main/java/at/hannibal2/skyhanni/utils/EntityOutlineRenderer.kt index 4ac55af01..611edc75b 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/EntityOutlineRenderer.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/EntityOutlineRenderer.kt @@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.RenderEntityOutlineEvent import at.hannibal2.skyhanni.mixins.transformers.CustomRenderGlobal -import at.hannibal2.skyhanni.test.command.ErrorManager +import at.hannibal2.skyhanni.test.command.ErrorManager.logErrorWithData import net.minecraft.client.Minecraft import net.minecraft.client.renderer.GlStateManager import net.minecraft.client.renderer.OpenGlHelper @@ -339,7 +339,7 @@ object EntityOutlineRenderer { } } - fun isCacheEmpty() = isXrayCacheEmpty() && isNoXrayCacheEmpty() + private fun isCacheEmpty() = isXrayCacheEmpty() && isNoXrayCacheEmpty() private fun isXrayCacheEmpty() = entityRenderCache.xrayCache?.isEmpty() ?: true private fun isNoXrayCacheEmpty() = entityRenderCache.noXrayCache?.isEmpty() ?: true @@ -366,7 +366,7 @@ object EntityOutlineRenderer { val renderGlobal = try { mc.renderGlobal as CustomRenderGlobal } catch (e: NoClassDefFoundError) { - ErrorManager.logError(e, "Unable to enable entity outlines, the required mixin is not loaded") + logErrorWithData(e, "Unable to enable entity outlines, the required mixin is not loaded") isMissingMixin = true return } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/GuiRenderUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/GuiRenderUtils.kt index 5e4a63452..7dfae5bac 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/GuiRenderUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/GuiRenderUtils.kt @@ -16,7 +16,7 @@ import kotlin.math.roundToInt */ object GuiRenderUtils { - fun drawStringCentered(str: String?, fr: FontRenderer, x: Float, y: Float, shadow: Boolean, colour: Int) { + private fun drawStringCentered(str: String?, fr: FontRenderer, x: Float, y: Float, shadow: Boolean, colour: Int) { val strLen = fr.getStringWidth(str) val x2 = x - strLen / 2f val y2 = y - fr.FONT_HEIGHT / 2f diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt index a1b7ed09f..b419b46f4 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt @@ -158,7 +158,7 @@ object ItemUtils { } // Taken from NEU - fun createSkull(displayName: String, uuid: String, value: String, lore: Array<String>?): ItemStack { + private fun createSkull(displayName: String, uuid: String, value: String, lore: Array<String>?): ItemStack { val render = ItemStack(Items.skull, 1, 3) val tag = NBTTagCompound() val skullOwner = NBTTagCompound() diff --git a/src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt b/src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt index 5078a492f..9b7e1afdb 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt @@ -16,7 +16,7 @@ object KeyboardManager { private var lastClickedMouseButton = -1 // A mac-only key, represents Windows key on windows (but different key code) - fun isCommandKeyDown() = Keyboard.KEY_LMETA.isKeyHeld() || Keyboard.KEY_RMETA.isKeyHeld() + private fun isCommandKeyDown() = Keyboard.KEY_LMETA.isKeyHeld() || Keyboard.KEY_RMETA.isKeyHeld() fun isControlKeyDown() = Keyboard.KEY_LCONTROL.isKeyHeld() || Keyboard.KEY_RCONTROL.isKeyHeld() fun isShiftKeyDown() = Keyboard.KEY_LSHIFT.isKeyHeld() || Keyboard.KEY_RSHIFT.isKeyHeld() diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt index fafb41c96..2079408f7 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt @@ -6,7 +6,7 @@ import net.minecraft.util.AxisAlignedBB object LocationUtils { - fun canSee(a: LorenzVec, b: LorenzVec): Boolean { + private fun canSee(a: LorenzVec, b: LorenzVec): Boolean { return Minecraft.getMinecraft().theWorld.rayTraceBlocks(a.toVec3(), b.toVec3(), false, true, false) == null } @@ -28,7 +28,7 @@ object LocationUtils { return vec.add(0.0, 0.0 + player.getEyeHeight(), 0.0) } - fun AxisAlignedBB.isVecInside(vec: LorenzVec) = isVecInside(vec.toVec3()) + private fun AxisAlignedBB.isVecInside(vec: LorenzVec) = isVecInside(vec.toVec3()) fun AxisAlignedBB.isPlayerInside() = isVecInside(playerLocation()) diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt index 90970a315..88678fdd0 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt @@ -367,7 +367,7 @@ object LorenzUtils { } // MoulConfig is in Java, I don't want to downgrade this logic - fun <T> onChange(vararg properties: Property<out T>, observer: Observer<T>) { + private fun <T> onChange(vararg properties: Property<out T>, observer: Observer<T>) { for (property in properties) { property.whenChanged { a, b -> observer.observeChange(a, b) } } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt b/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt index d03455ac9..41e5f4923 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt @@ -204,6 +204,6 @@ object NumberUtil { } val Int.milion get() = this * 1_000_000.0 - val Int.bilion get() = this * 1_000_000_000.0 + private val Int.bilion get() = this * 1_000_000_000.0 val Double.milion get() = (this * 1_000_000.0).toLong() } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt index 7e10b0351..869aeeb25 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt @@ -244,7 +244,7 @@ object RenderUtils { /** * @author Mojang */ - fun drawNametag(str: String, color: Color?) { + private fun drawNametag(str: String, color: Color?) { val fontRenderer = Minecraft.getMinecraft().fontRendererObj val f1 = 0.02666667f GlStateManager.pushMatrix() @@ -352,7 +352,7 @@ object RenderUtils { return lastValue + (currentValue - lastValue) * multiplier } - fun Position.transform(): Pair<Int, Int> { + private fun Position.transform(): Pair<Int, Int> { GlStateManager.translate(getAbsX().toFloat(), getAbsY().toFloat(), 0F) GlStateManager.scale(effectiveScale, effectiveScale, 1F) val x = ((Utils.getMouseX() - getAbsX()) / effectiveScale).toInt() @@ -374,14 +374,11 @@ object RenderUtils { val minecraft = Minecraft.getMinecraft() val renderer = minecraft.renderManager.fontRenderer - val x = offsetX - val y = offsetY - - GlStateManager.translate(x + 1.0, y + 1.0, 0.0) + GlStateManager.translate(offsetX + 1.0, offsetY + 1.0, 0.0) if (centered) { val strLen: Int = renderer.getStringWidth(string) - val x2 = x - strLen / 2f + val x2 = offsetX - strLen / 2f GL11.glTranslatef(x2, 0f, 0f) renderer.drawStringWithShadow(display, 0f, 0f, 0) GL11.glTranslatef(-x2, 0f, 0f) diff --git a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt index 9f65a71f1..b0533a142 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt @@ -254,7 +254,7 @@ object SkyBlockItemModifierUtils { fun ItemStack.getExtraAttributes() = tagCompound?.getCompoundTag("ExtraAttributes") - class GemstoneSlot(val type: GemstoneType, val quality: GemstoneQuality) { + class GemstoneSlot(val type: GemstoneType, private val quality: GemstoneQuality) { fun getInternalName() = "${quality}_${type}_GEM".asInternalName() } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt index dd114d8fd..12b2e4c64 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt @@ -61,7 +61,7 @@ object StringUtils { return map.subMap(prefix, true, lastKey, false) } - fun nextLexicographicallyStringWithSameLength(input: String): String { + private fun nextLexicographicallyStringWithSameLength(input: String): String { val lastCharPosition = input.length - 1 val inputWithoutLastChar = input.substring(0, lastCharPosition) val lastChar = input[lastCharPosition] diff --git a/src/main/java/at/hannibal2/skyhanni/utils/Timer.kt b/src/main/java/at/hannibal2/skyhanni/utils/Timer.kt index 2a6d1f5ab..a03270c57 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/Timer.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/Timer.kt @@ -24,7 +24,7 @@ class Timer( val ended get() = !remaining.isPositive() val remaining get() = duration - elapsed - val elapsed get() = paused?.let { it - started } ?: started.passedSince() + private val elapsed get() = paused?.let { it - started } ?: started.passedSince() fun pause() { paused = SimpleTimeMark.now() 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 552e1a069..aa63f3382 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt @@ -90,7 +90,7 @@ interface Renderable { return clickable(hoverTips(text, tips, bypassChecks = bypassChecks), onClick, bypassChecks = bypassChecks) } - fun clickable( + private fun clickable( render: Renderable, onClick: () -> Unit, button: Int = 0, @@ -195,7 +195,7 @@ interface Renderable { return result } - fun underlined(renderable: Renderable) = object : Renderable { + private fun underlined(renderable: Renderable) = object : Renderable { override val width: Int get() = renderable.width override val height = 10 @@ -207,7 +207,7 @@ interface Renderable { } } - fun hoverable( + private fun hoverable( hovered: Renderable, unhovered: Renderable, bypassChecks: Boolean = false, @@ -254,7 +254,7 @@ interface Renderable { } } - fun placeholder(width: Int) = object : Renderable { + private fun placeholder(width: Int) = object : Renderable { override val width: Int = width override val height = 10 |