aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2024-09-23 23:54:16 +1000
committerGitHub <noreply@github.com>2024-09-23 15:54:16 +0200
commitd39f595b150aaa0eee32c7ebacb961ef48095924 (patch)
tree03725f81d7090e880df9ae7038e6e40307a2e341 /src/main/java/at/hannibal2/skyhanni/features
parent74490dcdb619e6eadf1be7665871cdaba4d58ee8 (diff)
downloadskyhanni-d39f595b150aaa0eee32c7ebacb961ef48095924.tar.gz
skyhanni-d39f595b150aaa0eee32c7ebacb961ef48095924.tar.bz2
skyhanni-d39f595b150aaa0eee32c7ebacb961ef48095924.zip
Backend: Remove more neu code from SkyHanni (#2419)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilterGui.kt15
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostUtil.kt56
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/inventory/plots/GardenPlotIcon.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorSupercraft.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/auctionhouse/AuctionHouseOpenPriceWebsite.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarOpenPriceWebsite.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/ColdOverlay.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/DeepCavernsGuide.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/UserLuckBreakdown.kt12
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboPlaytime.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigOptionGui.kt21
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillType.kt4
16 files changed, 73 insertions, 81 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 0fee71849..6a5f22b66 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilterGui.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilterGui.kt
@@ -5,7 +5,8 @@ import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.KeyboardManager
import at.hannibal2.skyhanni.utils.OSUtils
import at.hannibal2.skyhanni.utils.StringUtils.stripHypixelMessage
-import io.github.moulberry.notenoughupdates.util.Utils
+import at.hannibal2.skyhanni.utils.renderables.Renderable
+import at.hannibal2.skyhanni.utils.renderables.RenderableTooltips
import io.github.notenoughupdates.moulconfig.internal.GlScissorStack
import io.github.notenoughupdates.moulconfig.internal.RenderUtils
import net.minecraft.client.Minecraft
@@ -42,7 +43,7 @@ class ChatFilterGui(private val history: List<ChatManager.MessageFilteringResult
GlStateManager.translate(l + 0.0, t + 0.0, 0.0)
RenderUtils.drawFloatingRectDark(0, 0, w, h)
GlStateManager.translate(5.0, 5.0 - scroll, 0.0)
- var mouseX = originalMouseX - l
+ val mouseX = originalMouseX - l
val isMouseButtonDown = mouseX in 0..w && originalMouseY in t..(t + h) && Mouse.isButtonDown(0)
var mouseY = originalMouseY - (t - scroll).toInt()
val sr = ScaledResolution(mc)
@@ -59,7 +60,7 @@ class ChatFilterGui(private val history: List<ChatManager.MessageFilteringResult
drawString(
mc.fontRendererObj,
"§e§lNEW TEXT",
- 0, 0, -1
+ 0, 0, -1,
)
size += drawMultiLineText(
msg.modified,
@@ -86,8 +87,8 @@ class ChatFilterGui(private val history: List<ChatManager.MessageFilteringResult
GlScissorStack.pop(sr)
wasMouseButtonDown = isMouseButtonDown
GlStateManager.popMatrix()
- if (queuedTooltip != null) {
- Utils.drawHoveringText(queuedTooltip, originalMouseX, originalMouseY, width, height, -1, mc.fontRendererObj)
+ queuedTooltip?.let { tooltip ->
+ RenderableTooltips.setTooltipForRender(tooltip.map { Renderable.string(it) })
}
GlStateManager.color(1f, 1f, 1f, 1f)
}
@@ -98,7 +99,7 @@ class ChatFilterGui(private val history: List<ChatManager.MessageFilteringResult
w - (ChatManager.ActionKind.maxLength + reasonMaxLength + 10 + 10),
mc.fontRendererObj,
false,
- true
+ true,
)
}
@@ -121,7 +122,7 @@ class ChatFilterGui(private val history: List<ChatManager.MessageFilteringResult
line.formattedText,
xPos,
0,
- -1
+ -1,
)
GlStateManager.translate(0F, 10F, 0F)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt
index 664acbc97..85d5778fe 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt
@@ -56,7 +56,6 @@ import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import at.hannibal2.skyhanni.utils.renderables.Renderable
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import com.google.gson.JsonPrimitive
-import io.github.moulberry.notenoughupdates.util.Utils
import io.github.moulberry.notenoughupdates.util.XPInformation
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import org.apache.commons.io.FilenameUtils
@@ -241,7 +240,7 @@ object GhostCounter {
}
}
- addAsSingletonList(Utils.chromaStringByColourCode(textFormatting.titleFormat.replace("&", "§")))
+ addAsSingletonList(textFormatting.titleFormat.replace("&", "§"))
addAsSingletonList(textFormatting.ghostKilledFormat.formatText(KILLS))
addAsSingletonList(textFormatting.sorrowsFormat.formatText(Option.SORROWCOUNT))
addAsSingletonList(textFormatting.ghostSinceSorrowFormat.formatText(Option.GHOSTSINCESORROW.getInt()))
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostUtil.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostUtil.kt
index 6cf777b48..d568fc492 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostUtil.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostUtil.kt
@@ -8,7 +8,6 @@ import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
import at.hannibal2.skyhanni.utils.NumberUtil.roundToPrecision
import at.hannibal2.skyhanni.utils.NumberUtil.shortFormat
-import io.github.moulberry.notenoughupdates.util.Utils
import java.io.FileReader
object GhostUtil {
@@ -71,7 +70,7 @@ object GhostUtil {
}
val json = ConfigManager.gson.fromJson(
FileReader(GhostCounter.ghostCounterV3File),
- com.google.gson.JsonObject::class.java
+ com.google.gson.JsonObject::class.java,
)
GhostData.Option.GHOSTSINCESORROW.add(json["ghostsSinceSorrow"].asDouble)
GhostData.Option.SORROWCOUNT.add(json["sorrowCount"].asDouble)
@@ -91,34 +90,25 @@ object GhostUtil {
fun String.formatText(option: GhostData.Option) = formatText(option.getInt(), option.getInt(true))
- fun String.formatText(value: Int, session: Int = -1) = Utils.chromaStringByColourCode(
- this.replace("%value%", value.addSeparators())
- .replace("%session%", session.addSeparators())
- .replace("&", "§")
- )
+ fun String.formatText(value: Int, session: Int = -1) = this.replace("%value%", value.addSeparators())
+ .replace("%session%", session.addSeparators())
+ .replace("&", "§")
- fun String.formatText(t: String) = Utils.chromaStringByColourCode(this.replace("%value%", t).replace("&", "§"))
+ fun String.formatText(t: String) = this.replace("%value%", t).replace("&", "§")
fun String.preFormat(t: String, level: Int, nextLevel: Int) = if (nextLevel == 26) {
- Utils.chromaStringByColourCode(
- replace("%value%", t)
- .replace("%display%", "25")
- )
+ replace("%value%", t).replace("%display%", "25")
} else {
- Utils.chromaStringByColourCode(
- this.replace("%value%", t)
- .replace(
- "%display%",
- "$level->${if (SkyHanniMod.feature.combat.ghostCounter.showMax) "25" else nextLevel}"
- )
- )
+ this.replace("%value%", t)
+ .replace(
+ "%display%",
+ "$level->${if (SkyHanniMod.feature.combat.ghostCounter.showMax) "25" else nextLevel}",
+ )
}
- fun String.formatText(value: Double, session: Double) = Utils.chromaStringByColourCode(
- this.replace("%value%", value.roundToPrecision(2).addSeparators())
- .replace("%session%", session.roundToPrecision(2).addSeparators())
- .replace("&", "§")
- )
+ fun String.formatText(value: Double, session: Double) = this.replace("%value%", value.roundToPrecision(2).addSeparators())
+ .replace("%session%", session.roundToPrecision(2).addSeparators())
+ .replace("&", "§")
fun String.formatBestiary(currentKill: Int, killNeeded: Int): String {
val bestiaryNextLevel = GhostCounter.storage?.bestiaryNextLevel
@@ -127,17 +117,15 @@ object GhostUtil {
val nextLevel = bestiaryNextLevel?.let { if (GhostCounter.config.showMax) "25" else "${it.toInt()}" }
?: "§cNo Bestiary Level data!"
- return Utils.chromaStringByColourCode(
- this.replace(
- "%currentKill%",
- if (GhostCounter.config.showMax) GhostCounter.bestiaryCurrentKill.addSeparators() else currentKill.addSeparators()
- )
- .replace("%percentNumber%", percent(GhostCounter.bestiaryCurrentKill.toDouble()))
- .replace("%killNeeded%", killNeeded.shortFormat())
- .replace("%currentLevel%", currentLevel)
- .replace("%nextLevel%", nextLevel)
- .replace("&", "§")
+ return this.replace(
+ "%currentKill%",
+ if (GhostCounter.config.showMax) GhostCounter.bestiaryCurrentKill.addSeparators() else currentKill.addSeparators(),
)
+ .replace("%percentNumber%", percent(GhostCounter.bestiaryCurrentKill.toDouble()))
+ .replace("%killNeeded%", killNeeded.shortFormat())
+ .replace("%currentLevel%", currentLevel)
+ .replace("%nextLevel%", nextLevel)
+ .replace("&", "§")
}
private fun percent(number: Double) =
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt
index 8c2dc9a95..ab8820b40 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt
@@ -32,10 +32,10 @@ import at.hannibal2.skyhanni.utils.SoundUtils
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import at.hannibal2.skyhanni.utils.TabListData
import at.hannibal2.skyhanni.utils.TimeUtils.format
+import at.hannibal2.skyhanni.utils.json.toJsonArray
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import com.google.gson.Gson
import com.google.gson.JsonPrimitive
-import io.github.moulberry.notenoughupdates.util.toJsonArray
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/plots/GardenPlotIcon.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/plots/GardenPlotIcon.kt
index 1fc378b7e..01e9f87fb 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/plots/GardenPlotIcon.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/plots/GardenPlotIcon.kt
@@ -8,10 +8,10 @@ import at.hannibal2.skyhanni.events.render.gui.ReplaceItemEvent
import at.hannibal2.skyhanni.features.garden.GardenAPI
import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ChatUtils
+import at.hannibal2.skyhanni.utils.ItemUtils.editItemInfo
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.NEUItems.getItemStack
-import io.github.moulberry.notenoughupdates.util.Utils
import net.minecraft.client.player.inventory.ContainerLocalMenu
import net.minecraft.init.Items
import net.minecraft.item.ItemStack
@@ -51,7 +51,7 @@ object GardenPlotIcon {
for ((index, internalName) in plotList) {
val old = originalStack[index]!!
val new = internalName.getItemStack()
- cachedStack[index] = Utils.editItemStackInfo(new, old.displayName, true, *old.getLore().toTypedArray())
+ cachedStack[index] = new.editItemInfo(old.displayName, true, old.getLore())
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorSupercraft.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorSupercraft.kt
index 26bfa7f26..f2e4f80fb 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorSupercraft.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorSupercraft.kt
@@ -8,12 +8,12 @@ import at.hannibal2.skyhanni.events.render.gui.ReplaceItemEvent
import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.HypixelCommands
+import at.hannibal2.skyhanni.utils.ItemUtils
import at.hannibal2.skyhanni.utils.NEUInternalName
import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName
import at.hannibal2.skyhanni.utils.NEUItems
import at.hannibal2.skyhanni.utils.NEUItems.getItemStack
import at.hannibal2.skyhanni.utils.SimpleTimeMark
-import io.github.moulberry.notenoughupdates.util.Utils
import net.minecraft.entity.player.InventoryPlayer
import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -30,11 +30,11 @@ object GardenVisitorSupercraft {
private val superCraftItem by lazy {
val neuItem = "GOLD_PICKAXE".asInternalName().getItemStack()
- Utils.createItemStack(
+ ItemUtils.createItemStack(
neuItem.item,
"§bSuper Craft",
"§7You have the items to craft",
- "§7Click me to open the super crafter!"
+ "§7Click me to open the super crafter!",
)
}
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 88ea75b57..8a8c11165 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
@@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.garden.visitor
import at.hannibal2.skyhanni.api.event.HandleEvent
import at.hannibal2.skyhanni.config.features.garden.visitor.VisitorConfig.VisitorBlockBehaviour
+import at.hannibal2.skyhanni.data.HypixelData
import at.hannibal2.skyhanni.data.jsonobjects.repo.GardenJson
import at.hannibal2.skyhanni.data.jsonobjects.repo.GardenVisitor
import at.hannibal2.skyhanni.events.RepositoryReloadEvent
@@ -19,7 +20,6 @@ import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzVec
import at.hannibal2.skyhanni.utils.getLorenzVec
import at.hannibal2.skyhanni.utils.toLorenzVec
-import io.github.moulberry.notenoughupdates.util.SBInfo
import net.minecraft.client.Minecraft
import net.minecraft.entity.Entity
import net.minecraft.entity.EntityLivingBase
@@ -57,7 +57,8 @@ object HighlightVisitorsOutsideOfGarden {
}
private fun isVisitor(entity: Entity): Boolean {
- val mode = SBInfo.getInstance().getLocation()
+ // todo migrate to Skyhanni IslandType
+ val mode = HypixelData.mode
val possibleJsons = visitorJson[mode] ?: return false
val skinOrType = getSkinOrTypeFor(entity)
return possibleJsons.any {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/auctionhouse/AuctionHouseOpenPriceWebsite.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/auctionhouse/AuctionHouseOpenPriceWebsite.kt
index b253e0191..7229283ca 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/auctionhouse/AuctionHouseOpenPriceWebsite.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/auctionhouse/AuctionHouseOpenPriceWebsite.kt
@@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.events.InventoryCloseEvent
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.events.render.gui.ReplaceItemEvent
import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
+import at.hannibal2.skyhanni.utils.ItemUtils
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName
import at.hannibal2.skyhanni.utils.NEUItems.getItemStack
@@ -13,7 +14,6 @@ import at.hannibal2.skyhanni.utils.OSUtils
import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher
import at.hannibal2.skyhanni.utils.SimpleTimeMark
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
-import io.github.moulberry.notenoughupdates.util.Utils
import net.minecraft.entity.player.InventoryPlayer
import net.minecraft.item.ItemStack
import net.minecraftforge.fml.common.eventhandler.EventPriority
@@ -48,7 +48,7 @@ object AuctionHouseOpenPriceWebsite {
}
}
- private fun createDisplayItem() = Utils.createItemStack(
+ private fun createDisplayItem() = ItemUtils.createItemStack(
"PAPER".asInternalName().getItemStack().item,
"§bPrice History",
"§7Click here to open",
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarOpenPriceWebsite.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarOpenPriceWebsite.kt
index 61606346a..216d3e108 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarOpenPriceWebsite.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarOpenPriceWebsite.kt
@@ -4,12 +4,12 @@ import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.events.GuiContainerEvent
import at.hannibal2.skyhanni.events.render.gui.ReplaceItemEvent
import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
+import at.hannibal2.skyhanni.utils.ItemUtils
import at.hannibal2.skyhanni.utils.NEUInternalName
import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName
import at.hannibal2.skyhanni.utils.NEUItems.getItemStack
import at.hannibal2.skyhanni.utils.OSUtils
import at.hannibal2.skyhanni.utils.SimpleTimeMark
-import io.github.moulberry.notenoughupdates.util.Utils
import net.minecraft.entity.player.InventoryPlayer
import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -23,12 +23,12 @@ object BazaarOpenPriceWebsite {
private val item by lazy {
val neuItem = "PAPER".asInternalName().getItemStack()
- Utils.createItemStack(
+ ItemUtils.createItemStack(
neuItem.item,
"§bPrice History",
"§7Click here to open",
"§7the price history",
- "§7on §cskyblock.bz"
+ "§7on §cskyblock.bz",
)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/ColdOverlay.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/ColdOverlay.kt
index 8af757f6e..58ef41ce7 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/mining/ColdOverlay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/mining/ColdOverlay.kt
@@ -6,8 +6,8 @@ import at.hannibal2.skyhanni.events.ColdUpdateEvent
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.DelayedRun
+import at.hannibal2.skyhanni.utils.GuiRenderUtils
import at.hannibal2.skyhanni.utils.NumberUtil
-import at.hannibal2.skyhanni.utils.RenderUtils
import at.hannibal2.skyhanni.utils.SimpleTimeMark
import net.minecraft.client.Minecraft
import net.minecraft.client.renderer.GlStateManager
@@ -42,7 +42,7 @@ object ColdOverlay {
GlStateManager.translate(0f, 0f, -500f)
GlStateManager.color(1f, 1f, 1f, alpha)
- RenderUtils.drawTexturedRect(0f, 0f)
+ GuiRenderUtils.drawTexturedRect(0f, 0f)
GL11.glDepthMask(true)
GlStateManager.popMatrix()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/DeepCavernsGuide.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/DeepCavernsGuide.kt
index 9600fbc20..a1d8f43a8 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/mining/DeepCavernsGuide.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/mining/DeepCavernsGuide.kt
@@ -16,12 +16,12 @@ import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor
import at.hannibal2.skyhanni.utils.ConditionalUtils
+import at.hannibal2.skyhanni.utils.ItemUtils
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName
import at.hannibal2.skyhanni.utils.NEUItems.getItemStack
import at.hannibal2.skyhanni.utils.ParkourHelper
-import io.github.moulberry.notenoughupdates.util.Utils
import net.minecraft.client.player.inventory.ContainerLocalMenu
import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -37,7 +37,7 @@ object DeepCavernsGuide {
private val startIcon by lazy {
val neuItem = "MAP".asInternalName().getItemStack()
- Utils.createItemStack(
+ ItemUtils.createItemStack(
neuItem.item,
"§bDeep Caverns Guide",
"§8(From SkyHanni)",
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/UserLuckBreakdown.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/UserLuckBreakdown.kt
index d4532a775..7f041bc27 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/UserLuckBreakdown.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/UserLuckBreakdown.kt
@@ -10,6 +10,7 @@ import at.hannibal2.skyhanni.events.render.gui.ReplaceItemEvent
import at.hannibal2.skyhanni.features.skillprogress.SkillType
import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.CollectionUtils.addOrPut
+import at.hannibal2.skyhanni.utils.ItemUtils
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.ItemUtils.name
import at.hannibal2.skyhanni.utils.LorenzUtils
@@ -20,7 +21,6 @@ import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher
import at.hannibal2.skyhanni.utils.SimpleTimeMark
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
-import io.github.moulberry.notenoughupdates.util.Utils
import net.minecraft.client.player.inventory.ContainerLocalMenu
import net.minecraft.item.ItemStack
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -237,9 +237,11 @@ object UserLuckBreakdown {
}
private fun createItems() {
- fillerItem = Utils.createItemStack(
+ fillerItem = ItemUtils.createItemStack(
fillerID.getItemStack().item,
fillerName,
+ listOf(),
+ 1,
15,
)
@@ -247,17 +249,17 @@ object UserLuckBreakdown {
val skillLuck = skillOverflowLuck.values.sum()
val totalLuck = skillLuck + limboLuck
- mainLuckItem = Utils.createItemStack(
+ mainLuckItem = ItemUtils.createItemStack(
mainLuckID.getItemStack().item,
"$mainLuckName §f${tryTruncateFloat(totalLuck)}",
*createItemLore("mainMenu", totalLuck),
)
- limboItem = Utils.createItemStack(
+ limboItem = ItemUtils.createItemStack(
limboID.getItemStack().item,
limboName,
*createItemLore("limbo", limboLuck),
)
- skillsItem = Utils.createItemStack(
+ skillsItem = ItemUtils.createItemStack(
skillsID.getItemStack().item,
skillsName,
*createItemLore("skills"),
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboPlaytime.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboPlaytime.kt
index 0996701f2..666671e9c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboPlaytime.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboPlaytime.kt
@@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.events.InventoryOpenEvent
import at.hannibal2.skyhanni.events.LorenzToolTipEvent
import at.hannibal2.skyhanni.events.render.gui.ReplaceItemEvent
import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
+import at.hannibal2.skyhanni.utils.ItemUtils
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.round
import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName
@@ -14,7 +15,6 @@ import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
import at.hannibal2.skyhanni.utils.RegexUtils.matches
import at.hannibal2.skyhanni.utils.SimpleTimeMark
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
-import io.github.moulberry.notenoughupdates.util.Utils
import net.minecraft.client.player.inventory.ContainerLocalMenu
import net.minecraft.item.ItemStack
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -58,7 +58,7 @@ object LimboPlaytime {
if (lastCreateCooldown.passedSince() > 3.seconds) {
lastCreateCooldown = SimpleTimeMark.now()
- limboItem = Utils.createItemStack(
+ limboItem = ItemUtils.createItemStack(
itemID.getItemStack().item,
itemName,
*createItemLore()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigOptionGui.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigOptionGui.kt
index a68978cae..bbe40db5c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigOptionGui.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigOptionGui.kt
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.features.misc.massconfiguration
-import io.github.moulberry.notenoughupdates.util.Utils
+import at.hannibal2.skyhanni.utils.renderables.Renderable
+import at.hannibal2.skyhanni.utils.renderables.RenderableTooltips
import io.github.notenoughupdates.moulconfig.internal.GlScissorStack
import io.github.notenoughupdates.moulconfig.internal.RenderUtils
import io.github.notenoughupdates.moulconfig.internal.TextRenderUtils
@@ -66,7 +67,7 @@ class DefaultConfigOptionGui(
mc.fontRendererObj.FONT_HEIGHT.toFloat(),
false,
xSize / 2 - padding,
- -1
+ -1,
)
GlStateManager.popMatrix()
@@ -74,7 +75,7 @@ class DefaultConfigOptionGui(
GlStateManager.translate(
(width - xSize) / 2F + padding,
(height + ySize) / 2F - mc.fontRendererObj.FONT_HEIGHT * 2,
- 0F
+ 0F,
)
var i = 0
fun button(title: String, tooltip: List<String>, func: () -> Unit) {
@@ -95,7 +96,7 @@ class DefaultConfigOptionGui(
2 + i.toFloat(),
0F,
if (overMouse) 0xFF00FF00.toInt() else -1,
- overMouse
+ overMouse,
)
i += width + 12
}
@@ -132,12 +133,12 @@ class DefaultConfigOptionGui(
(height - ySize) / 2 + barSize,
(width + xSize) / 2,
(height + ySize) / 2 - barSize,
- scaledResolution
+ scaledResolution,
)
GlStateManager.translate(
(width - xSize) / 2F + padding,
(height - ySize) / 2F + barSize - currentScrollOffset,
- 0F
+ 0F,
)
for ((cat) in orderedOptions.entries) {
@@ -157,13 +158,13 @@ class DefaultConfigOptionGui(
"§7${cat.description}",
"§7Current plan: ${suggestionState.label}",
"§aClick to toggle!",
- "§7Hold shift to show all options"
+ "§7Hold shift to show all options",
)
if (isShiftKeyDown()) {
hoveringTextToDraw = listOf(
"§e${cat.name}",
- "§7${cat.description}"
+ "§7${cat.description}",
) + orderedOptions[cat]!!.map { "§7 - §a" + it.name }
}
@@ -179,8 +180,8 @@ class DefaultConfigOptionGui(
GlStateManager.popMatrix()
GlScissorStack.pop(scaledResolution)
- if (hoveringTextToDraw != null) {
- Utils.drawHoveringText(hoveringTextToDraw, mouseX, mouseY, width, height, 100, mc.fontRendererObj)
+ hoveringTextToDraw?.let { tooltip ->
+ RenderableTooltips.setTooltipForRender(tooltip.map { Renderable.string(it) })
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt
index d91b4008d..2a4613f7a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt
@@ -14,6 +14,7 @@ import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor
import at.hannibal2.skyhanni.utils.InventoryUtils.getAllItems
+import at.hannibal2.skyhanni.utils.ItemUtils
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer
import at.hannibal2.skyhanni.utils.LorenzColor
@@ -24,7 +25,6 @@ import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText
import at.hannibal2.skyhanni.utils.RenderUtils.drawWaypointFilled
import at.hannibal2.skyhanni.utils.RenderUtils.highlight
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
-import io.github.moulberry.notenoughupdates.util.Utils
import net.minecraft.client.gui.inventory.GuiChest
import net.minecraft.client.player.inventory.ContainerLocalMenu
import net.minecraft.inventory.ContainerChest
@@ -43,7 +43,7 @@ object EnigmaSoulWaypoints {
private val item by lazy {
val neuItem = "SKYBLOCK_ENIGMA_SOUL".asInternalName().getItemStack()
- Utils.createItemStack(
+ ItemUtils.createItemStack(
neuItem.item,
"§5Toggle Missing",
"§7Click here to toggle",
diff --git a/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillType.kt b/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillType.kt
index bd44a63f3..b10bc8cb6 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillType.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillType.kt
@@ -1,6 +1,6 @@
package at.hannibal2.skyhanni.features.skillprogress
-import io.github.moulberry.notenoughupdates.util.Utils
+import at.hannibal2.skyhanni.utils.ItemUtils
import net.minecraft.block.Block
import net.minecraft.init.Blocks
import net.minecraft.init.Items
@@ -21,7 +21,7 @@ enum class SkillType(val displayName: String, icon: Item) {
constructor(displayName: String, block: Block) : this(displayName, Item.getItemFromBlock(block))
- val item: ItemStack by lazy { Utils.createItemStack(icon, displayName) }
+ val item: ItemStack by lazy { ItemUtils.createItemStack(icon, displayName) }
val lowercaseName = displayName.lowercase()
val uppercaseName = displayName.uppercase()