Skip to content

Commit

Permalink
Updated library version
Browse files Browse the repository at this point in the history
  • Loading branch information
odtheking committed Dec 11, 2024
1 parent 5038969 commit b5f7f65
Show file tree
Hide file tree
Showing 13 changed files with 93 additions and 191 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ allprojects {

//implementation("com.github.stivais:AuroraUI:0.9.1-beta")
// todo: create releases for aurora
implementation("com.github.stivais:AuroraUI:f41a1e07c2")
implementation("com.github.stivais:AuroraUI:4ba1ee9386e01035a05f7efd331c1be0554fc16b")

implementation("com.github.odtheking:odin-lwjgl:e50f062233")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,10 @@ object ArrowsDevice : Module(
fun guiOpen(event: GuiOpenEvent) {
if (autoState != AutoState.WaitingOnLeapingGui) return
val chest = (event.gui as? GuiChest)?.inventorySlots ?: return
if (chest !is ContainerChest || chest.name != "Spirit Leap" || DungeonUtils.leapTeammates.isEmpty()) return
if (chest !is ContainerChest || chest.name != "Spirit Leap" || DungeonUtils.dungeonTeammatesNoSelf.isEmpty()) return

val leapTo = DungeonUtils.leapTeammates.firstOrNull { it.clazz == DungeonClass.entries[autoLeapClass] }
?: DungeonUtils.leapTeammates.first()
val leapTo = DungeonUtils.dungeonTeammatesNoSelf.firstOrNull { it.clazz == DungeonClass.entries[autoLeapClass] }
?: DungeonUtils.dungeonTeammatesNoSelf.first()

clock.update()

Expand Down
11 changes: 4 additions & 7 deletions src/main/kotlin/me/odinmain/commands/impl/DevCommand.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
package me.odinmain.commands.impl

import com.github.stivais.aurora.color.Color
import com.github.stivais.aurora.utils.hexToRGBA
import com.github.stivais.aurora.utils.toHexString
import com.github.stivais.commodore.utils.GreedyString
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.launch
import me.odinmain.OdinMain.mc
import me.odinmain.OdinMain.scope
Expand All @@ -19,14 +15,16 @@ import me.odinmain.features.impl.floor7.WitherDragons.priorityDragon
import me.odinmain.features.impl.floor7.WitherDragonsEnum
import me.odinmain.features.impl.nether.NoPre
import me.odinmain.features.impl.render.DevPlayers.updateDevs
import me.odinmain.utils.*
import me.odinmain.utils.isOtherPlayer
import me.odinmain.utils.postAndCatch
import me.odinmain.utils.sendDataToServer
import me.odinmain.utils.skyblock.*
import me.odinmain.utils.skyblock.dungeon.Blessing
import me.odinmain.utils.skyblock.dungeon.DungeonUtils
import me.odinmain.utils.skyblock.dungeon.DungeonUtils.getRelativeCoords
import me.odinmain.utils.skyblock.dungeon.ScanUtils
import me.odinmain.utils.skyblock.dungeon.ScanUtils.getRoomCenter
import me.odinmain.utils.ui.screens.UIScreen.Companion.open
import me.odinmain.utils.writeToClipboard
import net.minecraft.network.play.server.S02PacketChat
import net.minecraft.util.ChatComponentText

Expand Down Expand Up @@ -112,7 +110,6 @@ val devCommand = commodore("oddev") {
|currentRoom: ${DungeonUtils.currentRoom?.data?.name}, roomsPassed: ${DungeonUtils.passedRooms.map { it.data.name }}
|Teammates: ${DungeonUtils.dungeonTeammates.joinToString { "§${it.clazz.colorCode}${it.name} (${it.clazz} [${it.clazzLvl}])" }}
|TeammatesNoSelf: ${DungeonUtils.dungeonTeammatesNoSelf.map { it.name }}
|LeapTeammates: ${DungeonUtils.leapTeammates.map { it.name }}
|Blessings: ${Blessing.entries.joinToString { "${it.name}: ${it.current}" }}
${getChatBreak()}
""".trimIndent(), "")
Expand Down
6 changes: 2 additions & 4 deletions src/main/kotlin/me/odinmain/commands/impl/OdinCommand.kt
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
package me.odinmain.commands.impl

import com.github.stivais.aurora.utils.loop
import com.github.stivais.commodore.utils.GreedyString
import me.odinmain.commands.commodore
import me.odinmain.features.huds.HUDManager
import me.odinmain.features.huds.HUDManager.HUDs
import me.odinmain.features.impl.dungeon.LeapMenu
import me.odinmain.features.impl.dungeon.dungeonwaypoints.DungeonWaypoints
import me.odinmain.features.impl.render.ClickGUI
import me.odinmain.features.impl.render.ClickGUI.clickGUI
import me.odinmain.utils.ServerUtils
import me.odinmain.utils.equalsOneOf
import me.odinmain.utils.fillItemFromSack
import me.odinmain.utils.skyblock.*
import me.odinmain.utils.skyblock.dungeon.DungeonUtils
import me.odinmain.utils.ui.screens.UIScreen.Companion.open
import me.odinmain.utils.writeToClipboard
import kotlin.math.round
Expand Down Expand Up @@ -146,7 +144,7 @@ val mainCommand = commodore("od", "odin") {

literal("leap").runs { player1: String?, player2: String?, player3: String?, player4: String? ->
val players = listOfNotNull(player1, player2, player3, player4)
DungeonUtils.customLeapOrder = players
LeapMenu.customLeapOrder = players
modMessage("§aCustom leap order set to: §f${players.joinToString(", ")}")
}

Expand Down
3 changes: 1 addition & 2 deletions src/main/kotlin/me/odinmain/config/DungeonWaypointConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,11 @@ object DungeonWaypointConfig {

return jsonObject
}

}

class ColorSerializer : JsonSerializer<Color>, JsonDeserializer<Color> {
override fun serialize(p0: Color?, p1: Type?, p2: JsonSerializationContext?): JsonElement {
return JsonPrimitive(p0?.toHexString() ?: "#000000FF")
return JsonPrimitive(p0?.toHexString(true) ?: "#000000FF")
}

override fun deserialize(p0: JsonElement?, p1: Type?, p2: JsonDeserializationContext?): Color {
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/me/odinmain/features/huds/HUDManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ object HUDManager {
)
hud.settings.loop {
if (it is Setting.Renders && !it.hidden) {
scope(it.Drawable()) {
createScope(it.Drawable()) {
hoverInformation(description = it.description)
onValueChanged { refreshHUDs() }
it.apply { create() }
Expand Down Expand Up @@ -207,7 +207,7 @@ object HUDManager {
val py = minY.px

return popup(constraints = constrain(px, py, (maxX - minX).px, (maxY - minY).px), smooth = true) {
outline(
outlineBlock(
constraints = copies(),
color = Color.WHITE,
thickness = 1.px
Expand Down
66 changes: 0 additions & 66 deletions src/main/kotlin/me/odinmain/features/impl/dungeon/LeapHelper.kt

This file was deleted.

Loading

0 comments on commit b5f7f65

Please sign in to comment.