aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/chat
diff options
context:
space:
mode:
authorWalker Selby <git@walkerselby.com>2023-11-22 12:10:51 +0000
committerGitHub <noreply@github.com>2023-11-22 13:10:51 +0100
commit5c9cbdba458638ae962ccf92e750ebdcea718478 (patch)
treef4ab8c3f6abe71d4e056125f582cfde465fd79d0 /src/main/java/at/hannibal2/skyhanni/features/chat
parent7137b0a07ba4c4efe65282a18ebc68f25ffa1796 (diff)
downloadskyhanni-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/features/chat')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilterGui.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt14
2 files changed, 10 insertions, 10 deletions
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) {