Skip to content

Commit

Permalink
random
Browse files Browse the repository at this point in the history
  • Loading branch information
freebonsai committed May 4, 2024
1 parent c8ef6f2 commit 2a8fa4e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,6 @@ object PuzzleSolvers : Module(
WaterSolver.scan(event)

IceFillSolver.enterDungeonRoom(event)
//BlazeSolver.getRoomType()
BlazeSolver.getRoomType()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,43 +20,39 @@ object PlayerDisplay : Module(
private val hideFood: Boolean by BooleanSetting("Hide Food").withDependency { hideElements }
private val hideHearts: Boolean by BooleanSetting("Hide Hearts").withDependency { hideElements }
private val hideXP: Boolean by BooleanSetting("Hide XP Level").withDependency { hideElements }
private val healthHud: HudElement by HudSetting("Health Hud", 10f, 10f, 1f, true) {
val text =
// This is all in one hud for now because multiple huds in a single module doesnt work properly and i cba to fix it, it will be bad for now.
private val hud: HudElement by HudSetting("Stat Hud", 10f, 10f, 1f, true) {
var text =
if (it)
"§c5000/5000❤"
"§c5000/5000❤ "
else if (SkyblockPlayer.currentHealth != 0 && SkyblockPlayer.maxHealth != 0)
"§c${SkyblockPlayer.currentHealth}/${SkyblockPlayer.maxHealth}"
"§c${SkyblockPlayer.currentHealth}/${SkyblockPlayer.maxHealth} "
else return@HudSetting 0f to 0f

text += if (it)
"§a1000❈ "
else if (SkyblockPlayer.currentDefense != 0)
"§a${SkyblockPlayer.currentDefense}"
else return@HudSetting 0f to 0f

text += if (it)
"§b2000/2000✎"
else if (SkyblockPlayer.currentMana != 0 && SkyblockPlayer.maxMana != 0)
"§b${SkyblockPlayer.currentMana}/${SkyblockPlayer.maxMana}"
else return@HudSetting 0f to 0f


mcText(text, 2, 2, 2, Color.RED, center = false)
return@HudSetting getMCTextWidth(text) * 2f + 4f to 20f
}
private val manaHud: HudElement by HudSetting("Mana Hud", 10f, 10f, 1f, true) {
val text =
if (it)
"§b2000/2000✎"
else if (SkyblockPlayer.currentMana != 0 && SkyblockPlayer.maxMana != 0)
"§b${SkyblockPlayer.currentMana}/${SkyblockPlayer.maxMana}"
else return@HudSetting 0f to 0f
mcText(text, 2, 2, 2, Color.CYAN, center = false)
return@HudSetting getMCTextWidth(text) * 2f + 4f to 20f
}
private val defenseHud: HudElement by HudSetting("Defense Hud", 10f, 10f, 1f, true) {
val text =
if (it)
"§a1000❈"
else if (SkyblockPlayer.currentDefense != 0)
"§a${SkyblockPlayer.currentDefense}"
else return@HudSetting 0f to 0f
mcText(text, 2, 2, 2, Color.GREEN, center = false)
return@HudSetting getMCTextWidth(text) * 2f + 4f to 20f
}


fun modifyText(text: String): String {
if (!enabled) return text
var toReturn = text
toReturn = if (healthHud.enabled) toReturn.replace("[\\d|,]+/[\\d|,]+❤".toRegex(), "") else toReturn
toReturn = if (manaHud.enabled) toReturn.replace("[\\d|,]+/[\\d|,]+✎ Mana".toRegex(), "") else toReturn
toReturn = if (defenseHud.enabled) toReturn.replace("[\\d|,]+§a❈ Defense".toRegex(), "") else toReturn
toReturn = if (hud.enabled) toReturn.replace("[\\d|,]+/[\\d|,]+❤".toRegex(), "") else toReturn
toReturn = if (hud.enabled) toReturn.replace("[\\d|,]+/[\\d|,]+✎ Mana".toRegex(), "") else toReturn
toReturn = if (hud.enabled) toReturn.replace("[\\d|,]+§a❈ Defense".toRegex(), "") else toReturn
return toReturn
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ object RenderOptimizer : Module(

private fun handleWitherMiner(entity: Entity) {
val customName = entity.customNameTag.noControlCodes
if (entity !is EntityArmorStand || !customName.hasWitherMinerName()) return
if (entity !is EntityArmorStand || !customName.containsOneOf("Wither Miner", "Wither Guard", "Apostle")) return
entity.alwaysRenderNameTag = false
}

Expand All @@ -141,10 +141,6 @@ object RenderOptimizer : Module(
entity.alwaysRenderNameTag = false
}

private fun String.hasWitherMinerName(): Boolean {
return contains("Wither Miner") || contains("Wither Guard") || contains("Apostle")
}

private fun getHealerFairyTextureValue(armorStand: EntityArmorStand?): String? {
return armorStand?.heldItem
?.tagCompound
Expand Down

0 comments on commit 2a8fa4e

Please sign in to comment.