Don't cover entire screen in matter commentary

This commit is contained in:
DBotThePony 2022-11-27 00:36:03 +07:00
parent 2c7bb69b71
commit 6dabb0b5ba
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -1118,8 +1118,12 @@ object MatterManager {
val commentary = getCommentary(event.itemStack.item) val commentary = getCommentary(event.itemStack.item)
if (commentary != null) { if (commentary != null) {
for (value in commentary) { if (commentary.size > 3) {
event.toolTip.add(value.withStyle(ChatFormatting.DARK_GRAY)) event.toolTip.add(TextComponent("...").withStyle(ChatFormatting.DARK_GRAY))
}
for (i in (commentary.size - 3).coerceAtLeast(0) until commentary.size) {
event.toolTip.add(commentary[i].withStyle(ChatFormatting.DARK_GRAY))
} }
} }
} }