diff options
Diffstat (limited to 'src/main/kotlin')
-rw-r--r-- | src/main/kotlin/dulkirmod/DulkirMod.kt | 4 | ||||
-rw-r--r-- | src/main/kotlin/dulkirmod/config/DulkirConfig.kt | 43 | ||||
-rw-r--r-- | src/main/kotlin/dulkirmod/features/DragonFeatures.kt (renamed from src/main/kotlin/dulkirmod/features/DragonTimer.kt) | 46 |
3 files changed, 85 insertions, 8 deletions
diff --git a/src/main/kotlin/dulkirmod/DulkirMod.kt b/src/main/kotlin/dulkirmod/DulkirMod.kt index 8295108..6fbc948 100644 --- a/src/main/kotlin/dulkirmod/DulkirMod.kt +++ b/src/main/kotlin/dulkirmod/DulkirMod.kt @@ -5,7 +5,6 @@ import dulkirmod.config.DulkirConfig import dulkirmod.events.ChatEvent import dulkirmod.features.* import dulkirmod.features.chat.AbiphoneDND -import dulkirmod.huds.KeyHud import dulkirmod.utils.ContainerNameUtil import dulkirmod.utils.TabListUtils import dulkirmod.utils.TextUtils @@ -78,7 +77,7 @@ class DulkirMod { mcBus.register(KeeperWaypoints) mcBus.register(ScalableTooltips) mcBus.register(GardenVisitorAlert) - mcBus.register(DragonTimer) + mcBus.register(DragonFeatures) mcBus.register(HideHealerFairy) mcBus.register(SecretSounds) @@ -133,7 +132,6 @@ class DulkirMod { val mc: Minecraft = Minecraft.getMinecraft() var config = DulkirConfig - var hud = KeyHud() var display: GuiScreen? = null val scope = CoroutineScope(EmptyCoroutineContext) diff --git a/src/main/kotlin/dulkirmod/config/DulkirConfig.kt b/src/main/kotlin/dulkirmod/config/DulkirConfig.kt index 24d69b7..ecec289 100644 --- a/src/main/kotlin/dulkirmod/config/DulkirConfig.kt +++ b/src/main/kotlin/dulkirmod/config/DulkirConfig.kt @@ -5,10 +5,11 @@ import cc.polyfrost.oneconfig.config.annotations.* import cc.polyfrost.oneconfig.config.data.Mod import cc.polyfrost.oneconfig.config.data.ModType import dulkirmod.DulkirMod -import dulkirmod.huds.GardenInfoHud -import dulkirmod.huds.KeyHud -import dulkirmod.huds.YawDisplayHud +import dulkirmod.overlays.GardenInfoHud +import dulkirmod.overlays.KeyHud +import dulkirmod.overlays.YawDisplayHud import dulkirmod.utils.Utils +import net.minecraft.client.audio.SoundCategory object DulkirConfig : Config(Mod("DulkirMod", ModType.SKYBLOCK), "dulkirmod-config.json") { @@ -158,6 +159,30 @@ object DulkirConfig : Config(Mod("DulkirMod", ModType.SKYBLOCK), "dulkirmod-conf var dragonKillBox = true @Switch( + name = "Gyro Waypoints", + description = "Only renders in p5", + category = "Dungeons", + subcategory = "Dungeons" + ) + var gyroWaypoints = true + + @Switch( + name = "Decoy Waypoints", + description = "Only renders in p5", + category = "Dungeons", + subcategory = "Dungeons" + ) + var decoyWaypoints = true + + @Switch( + name = "LB Waypoints", + description = "Only renders in p5", + category = "Dungeons", + subcategory = "Dungeons" + ) + var lbWaypoints = true + + @Switch( name = "Hide Extra Nametags", description = "Prevents some nametags not covered by skytils \"Hide non-starred nametags\" from rendering.", category = "General", @@ -389,7 +414,17 @@ object DulkirConfig : Config(Mod("DulkirMod", ModType.SKYBLOCK), "dulkirmod-conf text = "Test" ) fun demoSecretVolume() { - DulkirMod.mc.thePlayer.playSound("random.break", 1f * secretSoundVolume, 1f) + val prevMaster = DulkirMod.mc.gameSettings.getSoundLevel(SoundCategory.MASTER) + DulkirMod.mc.gameSettings.setSoundLevel(SoundCategory.MASTER, 1f) + val prevNote = DulkirMod.mc.gameSettings.getSoundLevel(SoundCategory.MASTER) + DulkirMod.mc.gameSettings.setSoundLevel(SoundCategory.RECORDS, 1f) + DulkirMod.mc.thePlayer.playSound( + "note.pling", + 1f * DulkirConfig.secretSoundVolume, + 1f + ) + DulkirMod.mc.gameSettings.setSoundLevel(SoundCategory.MASTER, prevMaster) + DulkirMod.mc.gameSettings.setSoundLevel(SoundCategory.RECORDS, prevNote) } @Switch( diff --git a/src/main/kotlin/dulkirmod/features/DragonTimer.kt b/src/main/kotlin/dulkirmod/features/DragonFeatures.kt index 4f20430..42f8780 100644 --- a/src/main/kotlin/dulkirmod/features/DragonTimer.kt +++ b/src/main/kotlin/dulkirmod/features/DragonFeatures.kt @@ -15,7 +15,7 @@ import java.util.concurrent.Executors import java.util.concurrent.TimeUnit import kotlin.math.max -object DragonTimer { +object DragonFeatures { data class Dragon(val color: String, val pos: Vec3, var spawnTime: Long) private val dragons = arrayOf( @@ -26,6 +26,24 @@ object DragonTimer { Dragon("blue", Vec3(84.0, 18.0, 95.0), 0) ) + val gyros = arrayOf( + Vec3(83.5,5.5,104.5), // blue + Vec3(25.5, 5.5, 81.5) // green + ) + val decoys = arrayOf( + Vec3(32.5, 19.5, 59.9), // red + Vec3(56.5, 7.5, 124.5), // purple + Vec3(90.5, 11.5, 100.5), // blue + Vec3(21.5, 11.5, 88.5) // green + ) + val shoot = arrayOf( + Vec3(56.5, 20.5, 124.5), // purple + Vec3(84.5, 20.5, 59.5), // orange + Vec3(23.5,21.5, 54.5), // red + Vec3(27.5, 16.5, 94.5), // green + Vec3(85.5, 20.5, 98.5) // blue + ) + /** * Called from within the MixinWorld Class */ @@ -143,4 +161,30 @@ object DragonTimer { ScoreBoardUtils.inM7() }, 10, TimeUnit.SECONDS) } + + @SubscribeEvent + fun renderP5Waypoints(event: RenderWorldLastEvent) { + if (!(DulkirConfig.gyroWaypoints || DulkirConfig.lbWaypoints || DulkirConfig.decoyWaypoints)) return + if (!ScoreBoardUtils.isInM7) return + val playerVec = mc.thePlayer.positionVector + if (playerVec.yCoord > 45) return + if (DulkirConfig.gyroWaypoints) { + val color = "§6" + for (g in gyros) { + WorldRenderUtils.renderString(g, "${color}Gyro", false, max(1f, playerVec.distanceTo(g).toFloat()/10f), false) + } + } + if (DulkirConfig.lbWaypoints) { + val color = "§a" + for (s in shoot) { + WorldRenderUtils.renderString(s, "${color}Target", false, max(1f, playerVec.distanceTo(s).toFloat()/10f), false) + } + } + if (DulkirConfig.decoyWaypoints) { + val color = "§3" + for (d in decoys) { + WorldRenderUtils.renderString(d, "${color}Decoy", false, max(1f, playerVec.distanceTo(d).toFloat()/10f), false) + } + } + } }
\ No newline at end of file |