aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/kotlin/dulkirmod/DulkirMod.kt7
-rw-r--r--src/main/kotlin/dulkirmod/command/JoinDungeonCommand.kt10
-rw-r--r--src/main/kotlin/dulkirmod/command/LeapNameCommand.kt2
-rw-r--r--src/main/kotlin/dulkirmod/config/Config.kt2
-rw-r--r--src/main/kotlin/dulkirmod/events/ChatEvent.kt2
-rw-r--r--src/main/kotlin/dulkirmod/features/AlarmClock.kt4
-rw-r--r--src/main/kotlin/dulkirmod/features/ArachneTimer.kt14
-rw-r--r--src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt4
-rw-r--r--src/main/kotlin/dulkirmod/features/Croesus.kt14
-rw-r--r--src/main/kotlin/dulkirmod/features/DungeonLeap.kt14
-rw-r--r--src/main/kotlin/dulkirmod/features/ItemAnimations.kt2
-rw-r--r--src/main/kotlin/dulkirmod/features/NametagCleaner.kt11
-rw-r--r--src/main/kotlin/dulkirmod/features/chat/AbiphoneDND.kt3
-rw-r--r--src/main/kotlin/dulkirmod/features/chat/Bridge.kt6
-rw-r--r--src/main/kotlin/dulkirmod/features/chat/ThrottleNotif.kt8
-rw-r--r--src/main/kotlin/dulkirmod/utils/ConfigData.kt6
-rw-r--r--src/main/kotlin/dulkirmod/utils/ScoreBoardUtils.kt2
-rw-r--r--src/main/kotlin/dulkirmod/utils/TitleUtils.kt6
-rw-r--r--src/main/kotlin/dulkirmod/utils/Utils.kt12
-rw-r--r--src/main/kotlin/dulkirmod/utils/WorldRenderUtils.kt9
20 files changed, 78 insertions, 60 deletions
diff --git a/src/main/kotlin/dulkirmod/DulkirMod.kt b/src/main/kotlin/dulkirmod/DulkirMod.kt
index 8f1be1c..738f133 100644
--- a/src/main/kotlin/dulkirmod/DulkirMod.kt
+++ b/src/main/kotlin/dulkirmod/DulkirMod.kt
@@ -37,7 +37,8 @@ import kotlin.coroutines.EmptyCoroutineContext
)
class DulkirMod {
- var lastLongUpdate : Long = 0
+ var lastLongUpdate: Long = 0
+
@Mod.EventHandler
fun preInit(event: FMLPreInitializationEvent) {
val directory = File(event.modConfigurationDirectory, "dulkirmod")
@@ -46,7 +47,7 @@ class DulkirMod {
// REGISTER COMMANDS HERE // Help Commands
ClientCommandHandler.instance.registerCommand(HelpCommand())
- // General
+ // General
ClientCommandHandler.instance.registerCommand(EnchantRuneCommand())
ClientCommandHandler.instance.registerCommand(FairyCommand())
ClientCommandHandler.instance.registerCommand(SettingsCommand())
@@ -87,7 +88,7 @@ class DulkirMod {
}
var longupdate = false
- val currTime : Long = System.currentTimeMillis()
+ val currTime: Long = System.currentTimeMillis()
if (currTime - lastLongUpdate > 1000) {
longupdate = true
lastLongUpdate = currTime
diff --git a/src/main/kotlin/dulkirmod/command/JoinDungeonCommand.kt b/src/main/kotlin/dulkirmod/command/JoinDungeonCommand.kt
index 9765a47..25b7c7c 100644
--- a/src/main/kotlin/dulkirmod/command/JoinDungeonCommand.kt
+++ b/src/main/kotlin/dulkirmod/command/JoinDungeonCommand.kt
@@ -10,13 +10,12 @@ import net.minecraft.util.ChatComponentText
class JoinDungeonCommand : ClientCommandBase("joindungeon") {
@Throws(CommandException::class)
override fun processCommand(sender: ICommandSender, args: Array<String>) {
- var arguments = args.contentToString().replace("[", "").replace("]", "").replace(",","")
+ var arguments = args.contentToString().replace("[", "").replace("]", "").replace(",", "")
var type = ""
var num = ""
if (args[0] == "master_catacombs") {
type = "M"
- }
- else if (args[0] == "catacombs") {
+ } else if (args[0] == "catacombs") {
type = "F"
}
@@ -25,9 +24,10 @@ class JoinDungeonCommand : ClientCommandBase("joindungeon") {
if (args[1].toInt() in 1..7) {
num = args[1]
}
- } catch (e: NumberFormatException) { }
+ } catch (e: NumberFormatException) {
+ }
- if(Config.dungeonCommandConfirm) {
+ if (Config.dungeonCommandConfirm) {
mc.thePlayer.addChatMessage(
ChatComponentText("${DulkirMod.CHAT_PREFIX} §6Running command: $type$num")
)
diff --git a/src/main/kotlin/dulkirmod/command/LeapNameCommand.kt b/src/main/kotlin/dulkirmod/command/LeapNameCommand.kt
index 3d7b4f2..cacaaea 100644
--- a/src/main/kotlin/dulkirmod/command/LeapNameCommand.kt
+++ b/src/main/kotlin/dulkirmod/command/LeapNameCommand.kt
@@ -8,7 +8,7 @@ import net.minecraft.util.ChatComponentText
class LeapNameCommand : ClientCommandBase("hl") {
@Throws(CommandException::class)
- override fun processCommand(sender: ICommandSender, args: Array<String>) {
+ override fun processCommand(sender: ICommandSender, args: Array<String>) {
if (args.isEmpty()) {
DulkirMod.mc.thePlayer.addChatMessage(
ChatComponentText("${DulkirMod.CHAT_PREFIX} §6Please give a username argument (case sensitive) for who you want to be highlighted.")
diff --git a/src/main/kotlin/dulkirmod/config/Config.kt b/src/main/kotlin/dulkirmod/config/Config.kt
index 3496ddd..9075b4f 100644
--- a/src/main/kotlin/dulkirmod/config/Config.kt
+++ b/src/main/kotlin/dulkirmod/config/Config.kt
@@ -42,6 +42,7 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so
category = "Dungeons"
)
var hideHealerFairy = false
+
@Property(
type = PropertyType.SWITCH,
name = "Hide Heart Particles",
@@ -495,6 +496,7 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so
"If your bridge format does not work, message me on discord and I can probably add it."
)
}
+
private object ConfigSorting : SortingBehavior() {
override fun getCategoryComparator(): Comparator<in Category> = Comparator { o1, o2 ->
if (o1.name == "General") return@Comparator -1
diff --git a/src/main/kotlin/dulkirmod/events/ChatEvent.kt b/src/main/kotlin/dulkirmod/events/ChatEvent.kt
index 9820ecc..884e4cc 100644
--- a/src/main/kotlin/dulkirmod/events/ChatEvent.kt
+++ b/src/main/kotlin/dulkirmod/events/ChatEvent.kt
@@ -32,6 +32,6 @@ class ChatEvent {
AbiphoneDND.handle(event, unformatted)
// FAKE MESSAGE SENDER (DULKIR ONLY)
- FakeMsg.handle(event,unformatted)
+ FakeMsg.handle(event, unformatted)
}
} \ No newline at end of file
diff --git a/src/main/kotlin/dulkirmod/features/AlarmClock.kt b/src/main/kotlin/dulkirmod/features/AlarmClock.kt
index 075f106..0d3f51c 100644
--- a/src/main/kotlin/dulkirmod/features/AlarmClock.kt
+++ b/src/main/kotlin/dulkirmod/features/AlarmClock.kt
@@ -6,13 +6,13 @@ import dulkirmod.config.Config
import dulkirmod.utils.ScoreBoardUtils
import dulkirmod.utils.Utils
-var lastUpdate : Long = 0
+var lastUpdate: Long = 0
fun alarmClock() {
// CHECK IF IN SKYBLOCK
if (!Utils.isInSkyblock()) return
// CHECK TIME
- val currTime : Long = System.currentTimeMillis()
+ val currTime: Long = System.currentTimeMillis()
val lines = ScoreBoardUtils.getLines()
for (l in lines) {
// ZOMBIE VILLAGER
diff --git a/src/main/kotlin/dulkirmod/features/ArachneTimer.kt b/src/main/kotlin/dulkirmod/features/ArachneTimer.kt
index d5334ba..4e4ae66 100644
--- a/src/main/kotlin/dulkirmod/features/ArachneTimer.kt
+++ b/src/main/kotlin/dulkirmod/features/ArachneTimer.kt
@@ -13,15 +13,15 @@ import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
class ArachneTimer {
- private var startmillis : Long = -1
- private var endmillis : Long = -1
- private var spawnmillis : Long = -1
+ private var startmillis: Long = -1
+ private var endmillis: Long = -1
+ private var spawnmillis: Long = -1
@SubscribeEvent(receiveCanceled = true, priority = EventPriority.LOW)
fun onChat(event: ClientChatReceivedEvent) {
if (!Config.arachneKillTimer) return
- var killtime : Float = -1f;
+ var killtime: Float = -1f;
if (event.type == 2.toByte()) {
return
@@ -30,8 +30,7 @@ class ArachneTimer {
val unformatted = Utils.stripColorCodes(event.message.unformattedText)
if (unformatted == "[BOSS] Arachne: You dare to call me, the queen of the dark, to you. I'll accept no excuses, you shall die!") {
startmillis = System.currentTimeMillis()
- }
- else if (unformatted.startsWith('☄') && unformatted.contains("Something is awakening!")) {
+ } else if (unformatted.startsWith('☄') && unformatted.contains("Something is awakening!")) {
spawnmillis = System.currentTimeMillis()
}
@@ -46,13 +45,14 @@ class ArachneTimer {
}
}
}
+
@SubscribeEvent
fun onWorldRenderLast(event: RenderWorldLastEvent) {
if (!Config.arachneSpawnTimer) return
if (spawnmillis > startmillis) {
val color = Utils.getColorString(Config.bestiaryNotifColor)
- var time = 18 - (System.currentTimeMillis() - spawnmillis)/1000
+ var time = 18 - (System.currentTimeMillis() - spawnmillis) / 1000
if (time < 0) time = 0
WorldRenderUtils.render(Vec3(-282.5, 50.8, -178.5), "${color}${time}")
}
diff --git a/src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt b/src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt
index d516fcf..adb8edc 100644
--- a/src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt
+++ b/src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt
@@ -20,7 +20,7 @@ fun brokenHypeNotif() {
if (mc.thePlayer == null) return
- val stack: ItemStack = mc.thePlayer.heldItem?: return
+ val stack: ItemStack = mc.thePlayer.heldItem ?: return
// get info about held item
if (stack.hasTagCompound()) {
@@ -58,7 +58,7 @@ fun brokenHypeNotif() {
// If this section of the code is reached, then we have the same item, and we can check for updated stats
if (oldKill != kill && oldChampionXp == championXp) {
- mc.thePlayer.playSound("random.anvil_land",1f * Config.bestiaryNotifVol,0f)
+ mc.thePlayer.playSound("random.anvil_land", 1f * Config.bestiaryNotifVol, 0f)
val color = Utils.getColorString(Config.bestiaryNotifColor)
DulkirMod.titleUtils.drawStringForTime("${color}Hype Broken", 5000)
}
diff --git a/src/main/kotlin/dulkirmod/features/Croesus.kt b/src/main/kotlin/dulkirmod/features/Croesus.kt
index 8302167..e38616c 100644
--- a/src/main/kotlin/dulkirmod/features/Croesus.kt
+++ b/src/main/kotlin/dulkirmod/features/Croesus.kt
@@ -11,7 +11,8 @@ import net.minecraftforge.fml.common.gameevent.TickEvent
class Croesus {
- var lastGuiOpenEvent : Long = 0
+ var lastGuiOpenEvent: Long = 0
+
@SubscribeEvent
fun onTick(event: TickEvent.ClientTickEvent) {
val lastInCroesus = inCroesusBool
@@ -29,7 +30,7 @@ class Croesus {
if (inCroesusBool && System.currentTimeMillis() - lastGuiOpenEvent < 300) {
for (i in 9..44) {
- boolArray[i-9] = false
+ boolArray[i - 9] = false
val slotIn = mc.thePlayer.openContainer.getSlot(i)
if (slotIn.stack == null) continue
@@ -38,14 +39,15 @@ class Croesus {
val tagList: NBTTagList = stack.getSubCompound("display", true).getTagList("Lore", 8)
for (j in 0 until tagList.tagCount()) {
- if (tagList.getStringTagAt(j) == "§aChests have been opened!") boolArray[i-9] = true
+ if (tagList.getStringTagAt(j) == "§aChests have been opened!") boolArray[i - 9] = true
}
}
}
}
+
companion object {
- var inCroesusBool : Boolean = false
- var boolArray = BooleanArray(36) {false}
+ var inCroesusBool: Boolean = false
+ var boolArray = BooleanArray(36) { false }
fun inCroesus(): Boolean {
return inCroesusBool
@@ -53,7 +55,7 @@ class Croesus {
fun isChestOpened(slotIn: Slot): Boolean {
if (!inCroesusBool) return false
- if(slotIn.inventory == mc.thePlayer.inventory) return false
+ if (slotIn.inventory == mc.thePlayer.inventory) return false
val slotindex = slotIn.slotIndex
if (slotindex !in 9..44) return false
return boolArray[slotindex - 9]
diff --git a/src/main/kotlin/dulkirmod/features/DungeonLeap.kt b/src/main/kotlin/dulkirmod/features/DungeonLeap.kt
index b8ce75e..91e85f7 100644
--- a/src/main/kotlin/dulkirmod/features/DungeonLeap.kt
+++ b/src/main/kotlin/dulkirmod/features/DungeonLeap.kt
@@ -13,7 +13,8 @@ import net.minecraftforge.fml.common.gameevent.TickEvent
class DungeonLeap {
- private var lastGuiOpenEvent : Long = 0
+ private var lastGuiOpenEvent: Long = 0
+
@SubscribeEvent
fun onTick(event: TickEvent.ClientTickEvent) {
val lastInLeap = inLeapMenuBool
@@ -31,18 +32,19 @@ class DungeonLeap {
if (inLeapMenuBool && System.currentTimeMillis() - lastGuiOpenEvent < 300) {
for (i in 11..15) {
- boolArray[i-11] = false
+ boolArray[i - 11] = false
val slotIn = DulkirMod.mc.thePlayer.openContainer.getSlot(i)
if (slotIn.stack == null) continue
val stack = slotIn.stack
- if (Utils.stripColorCodes(stack.displayName) == Config.highlightLeapName) boolArray[i-11] = true
+ if (Utils.stripColorCodes(stack.displayName) == Config.highlightLeapName) boolArray[i - 11] = true
}
}
}
+
companion object {
- var inLeapMenuBool : Boolean = false
- var boolArray = BooleanArray(5) {false}
+ var inLeapMenuBool: Boolean = false
+ var boolArray = BooleanArray(5) { false }
fun inLeapMenu(): Boolean {
return inLeapMenuBool
@@ -50,7 +52,7 @@ class DungeonLeap {
fun isHighlightedLeapPlayer(slotIn: Slot): Boolean {
if (!inLeapMenuBool) return false
- if(slotIn.inventory == mc.thePlayer.inventory) return false
+ if (slotIn.inventory == mc.thePlayer.inventory) return false
val slotIndex = slotIn.slotIndex
if (slotIndex !in 11..15) return false
return boolArray[slotIndex - 11]
diff --git a/src/main/kotlin/dulkirmod/features/ItemAnimations.kt b/src/main/kotlin/dulkirmod/features/ItemAnimations.kt
index a86e947..7e9b85d 100644
--- a/src/main/kotlin/dulkirmod/features/ItemAnimations.kt
+++ b/src/main/kotlin/dulkirmod/features/ItemAnimations.kt
@@ -66,7 +66,7 @@ object ItemAnimations {
* Directly referenced by the ItemRendereMixin. If enabled will scale the potion drink animation.
* Returns whether custom animation was performed.
*/
- fun rotationlessDrink(clientPlayer : AbstractClientPlayer, partialTicks : Float): Boolean {
+ fun rotationlessDrink(clientPlayer: AbstractClientPlayer, partialTicks: Float): Boolean {
if (!config.customAnimations || config.drinkingSelector != 1) return false
val f: Float = clientPlayer.itemInUseCount.toFloat() - partialTicks + 1.0f
val f1: Float = f / mc.thePlayer.heldItem.maxItemUseDuration.toFloat()
diff --git a/src/main/kotlin/dulkirmod/features/NametagCleaner.kt b/src/main/kotlin/dulkirmod/features/NametagCleaner.kt
index f198251..b847bf1 100644
--- a/src/main/kotlin/dulkirmod/features/NametagCleaner.kt
+++ b/src/main/kotlin/dulkirmod/features/NametagCleaner.kt
@@ -14,17 +14,18 @@ object NametagCleaner {
@SubscribeEvent
fun onRenderLivingPre(event: RenderLivingEvent.Pre<*>) {
if (event.entity is EntityArmorStand && event.entity.hasCustomName()) {
- if (config.hideTags) {
+ if (config.hideTags) {
val name = stripColorCodes(event.entity.customNameTag)
if (name.contains("ABILITY DAMAGE") || name.contains("DEFENSE") || name.contains("DAMAGE")
- || name.contains("Superboom TNT") || name.contains ("Blessing")) {
- mc.theWorld.removeEntity(event.entity)
+ || name.contains("Superboom TNT") || name.contains("Blessing")
+ ) {
+ mc.theWorld.removeEntity(event.entity)
}
- }
+ }
if (config.hideArachneTags) {
val name = stripColorCodes(event.entity.customNameTag)
- if (name.contains("Luxurious Spool") || name.contains("String") || name.contains("Arachne Fragment")){
+ if (name.contains("Luxurious Spool") || name.contains("String") || name.contains("Arachne Fragment")) {
mc.theWorld.removeEntity(event.entity)
}
}
diff --git a/src/main/kotlin/dulkirmod/features/chat/AbiphoneDND.kt b/src/main/kotlin/dulkirmod/features/chat/AbiphoneDND.kt
index 1f922f2..d2e0a69 100644
--- a/src/main/kotlin/dulkirmod/features/chat/AbiphoneDND.kt
+++ b/src/main/kotlin/dulkirmod/features/chat/AbiphoneDND.kt
@@ -42,7 +42,8 @@ class AbiphoneDND {
}
}
if (unformatted.startsWith("✆ Ring...") && unformatted.endsWith("[PICK UP]")
- && System.currentTimeMillis() - lastRing < 5000) {
+ && System.currentTimeMillis() - lastRing < 5000
+ ) {
event.isCanceled = true;
}
}
diff --git a/src/main/kotlin/dulkirmod/features/chat/Bridge.kt b/src/main/kotlin/dulkirmod/features/chat/Bridge.kt
index f413be8..88430af 100644
--- a/src/main/kotlin/dulkirmod/features/chat/Bridge.kt
+++ b/src/main/kotlin/dulkirmod/features/chat/Bridge.kt
@@ -7,8 +7,10 @@ import net.minecraft.util.EnumChatFormatting
import net.minecraftforge.client.event.ClientChatReceivedEvent
object Bridge {
- private val guildFormat = "^(§2Guild|§3Officer) > (?:\\S+ )?([\\w§]{3,18})(?: §[a-z0-9]\\[[A-Z]+])?§f: (\\w+) > .+".toRegex()
- private val alternateFormat = "^(§2Guild|§3Officer) > (?:\\S+ )?([\\w§]{3,18})(?: §[a-z0-9]\\[[A-Z]+])?§f: (\\w+): .+".toRegex()
+ private val guildFormat =
+ "^(§2Guild|§3Officer) > (?:\\S+ )?([\\w§]{3,18})(?: §[a-z0-9]\\[[A-Z]+])?§f: (\\w+) > .+".toRegex()
+ private val alternateFormat =
+ "^(§2Guild|§3Officer) > (?:\\S+ )?([\\w§]{3,18})(?: §[a-z0-9]\\[[A-Z]+])?§f: (\\w+): .+".toRegex()
fun handle(event: ClientChatReceivedEvent) {
val message = event.message.unformattedText
diff --git a/src/main/kotlin/dulkirmod/features/chat/ThrottleNotif.kt b/src/main/kotlin/dulkirmod/features/chat/ThrottleNotif.kt
index ff747eb..c572db0 100644
--- a/src/main/kotlin/dulkirmod/features/chat/ThrottleNotif.kt
+++ b/src/main/kotlin/dulkirmod/features/chat/ThrottleNotif.kt
@@ -6,15 +6,15 @@ import dulkirmod.utils.Utils
import net.minecraftforge.client.event.ClientChatReceivedEvent
object ThrottleNotif {
- private var lastThrottle : Long = 0
+ private var lastThrottle: Long = 0
fun handle(event: ClientChatReceivedEvent, unformatted: String) {
if (unformatted == "This menu has been throttled! Please slow down..." && DulkirMod.config.throttleNotifier
- && Utils.isInDungeons()) {
+ && Utils.isInDungeons()
+ ) {
event.isCanceled = true;
if (!Config.throttleNotifierSpam && System.currentTimeMillis() - lastThrottle > 8000) {
DulkirMod.mc.thePlayer.sendChatMessage("/pc " + DulkirMod.config.customMessage)
- }
- else {
+ } else {
DulkirMod.mc.thePlayer.sendChatMessage("/pc " + DulkirMod.config.customMessage)
}
lastThrottle = System.currentTimeMillis()
diff --git a/src/main/kotlin/dulkirmod/utils/ConfigData.kt b/src/main/kotlin/dulkirmod/utils/ConfigData.kt
index 213528b..b881248 100644
--- a/src/main/kotlin/dulkirmod/utils/ConfigData.kt
+++ b/src/main/kotlin/dulkirmod/utils/ConfigData.kt
@@ -1,10 +1,8 @@
package dulkirmod.utils
-import com.sun.org.apache.xpath.internal.operations.Bool
-import com.typesafe.config.ConfigOrigin
import dulkirmod.config.Config
-data class ConfigData (
+data class ConfigData(
val size: Float = Config.customSize,
val scaleSwing: Boolean = Config.doesScaleSwing,
val x: Float = Config.customX,
@@ -15,5 +13,5 @@ data class ConfigData (
val roll: Float = Config.customRoll,
val speed: Float = Config.customSpeed,
val ignoreHaste: Boolean = Config.ignoreHaste,
- val drinkingFix: Int = Config.drinkingSelector
+ val drinkingFix: Int = Config.drinkingSelector,
)
diff --git a/src/main/kotlin/dulkirmod/utils/ScoreBoardUtils.kt b/src/main/kotlin/dulkirmod/utils/ScoreBoardUtils.kt
index 7b6c96d..520c143 100644
--- a/src/main/kotlin/dulkirmod/utils/ScoreBoardUtils.kt
+++ b/src/main/kotlin/dulkirmod/utils/ScoreBoardUtils.kt
@@ -5,7 +5,7 @@ import net.minecraft.scoreboard.Score
import net.minecraft.scoreboard.ScorePlayerTeam
object ScoreBoardUtils {
- fun getLines() : MutableList<String> {
+ fun getLines(): MutableList<String> {
val scoreboard = DulkirMod.mc.thePlayer.worldScoreboard
val sidebarObjective = scoreboard.getObjectiveInDisplaySlot(1)
val scores: List<Score> = ArrayList(scoreboard.getSortedScores(sidebarObjective))
diff --git a/src/main/kotlin/dulkirmod/utils/TitleUtils.kt b/src/main/kotlin/dulkirmod/utils/TitleUtils.kt
index f289a8c..b7399c3 100644
--- a/src/main/kotlin/dulkirmod/utils/TitleUtils.kt
+++ b/src/main/kotlin/dulkirmod/utils/TitleUtils.kt
@@ -10,7 +10,7 @@ import kotlin.math.min
class TitleUtils {
var curString = ""
- var endTime : Long = 0
+ var endTime: Long = 0
@SubscribeEvent
fun onRender(event: RenderGameOverlayEvent.Text) {
@@ -21,13 +21,13 @@ class TitleUtils {
var scale = ((screenWidth - 100) * Config.bestiaryNotifSize) / width
scale = min(scale, 10.0)
GlStateManager.pushMatrix()
- GlStateManager.translate((screenWidth / 2 - width * scale / 2), screenHeight/2 - (4.5 * scale), 0.0)
+ GlStateManager.translate((screenWidth / 2 - width * scale / 2), screenHeight / 2 - (4.5 * scale), 0.0)
GlStateManager.scale(scale, scale, scale)
mc.fontRendererObj.drawString(curString, 0f, 0f, 0, Config.bestiaryTextShadow)
GlStateManager.popMatrix()
}
- fun drawStringForTime(string : String, time : Int) {
+ fun drawStringForTime(string: String, time: Int) {
this.curString = string
this.endTime = time.toLong() + System.currentTimeMillis()
}
diff --git a/src/main/kotlin/dulkirmod/utils/Utils.kt b/src/main/kotlin/dulkirmod/utils/Utils.kt
index 1a85d0a..731778f 100644
--- a/src/main/kotlin/dulkirmod/utils/Utils.kt
+++ b/src/main/kotlin/dulkirmod/utils/Utils.kt
@@ -44,7 +44,8 @@ object Utils {
Config.customPitch = import.pitch
Config.customRoll = import.roll
Config.drinkingSelector = import.drinkingFix
- Config.ignoreHaste = import.ignoreHaste } catch (e : Exception) {
+ Config.ignoreHaste = import.ignoreHaste
+ } catch (e: Exception) {
mc.thePlayer.addChatMessage(
ChatComponentText(
EnumChatFormatting.GOLD.toString() + "" + EnumChatFormatting.BOLD + "Current clipboard is not a recognizable Custom Animation Preset."
@@ -54,10 +55,11 @@ object Utils {
mc.displayGuiScreen(null)
}
- fun isInSkyblock() : Boolean{
+ fun isInSkyblock(): Boolean {
if ((mc.theWorld != null) && (mc.thePlayer != null)) {
if (mc.isSingleplayer || mc.thePlayer.clientBrand == null ||
- !mc.thePlayer.clientBrand.lowercase(Locale.getDefault()).contains("hypixel")) {
+ !mc.thePlayer.clientBrand.lowercase(Locale.getDefault()).contains("hypixel")
+ ) {
return false
}
if (mc.thePlayer.worldScoreboard.getObjectiveInDisplaySlot(1) == null)
@@ -67,7 +69,7 @@ object Utils {
return false
}
- fun isInDungeons() : Boolean {
+ fun isInDungeons(): Boolean {
val lines = ScoreBoardUtils.getLines()
for (l in lines) {
if (l.contains("Catac\uD83C\uDF6D§combs"))
@@ -76,7 +78,7 @@ object Utils {
return false
}
- fun getColorString(int : Int) : String {
+ fun getColorString(int: Int): String {
return if (int == 16) "§z" else EnumChatFormatting.values()[int].toString()
}
} \ No newline at end of file
diff --git a/src/main/kotlin/dulkirmod/utils/WorldRenderUtils.kt b/src/main/kotlin/dulkirmod/utils/WorldRenderUtils.kt
index b214555..d3c2761 100644
--- a/src/main/kotlin/dulkirmod/utils/WorldRenderUtils.kt
+++ b/src/main/kotlin/dulkirmod/utils/WorldRenderUtils.kt
@@ -13,7 +13,14 @@ import org.lwjgl.opengl.GL11
class WorldRenderUtils {
companion object {
- fun render(location: Vec3, text: String, depthTest: Boolean = true, scale: Float = 1f, shadow: Boolean = false, renderBlackBox: Boolean = true) {
+ fun render(
+ location: Vec3,
+ text: String,
+ depthTest: Boolean = true,
+ scale: Float = 1f,
+ shadow: Boolean = false,
+ renderBlackBox: Boolean = true,
+ ) {
if (!depthTest) {
GL11.glDisable(GL11.GL_DEPTH_TEST)
GL11.glDepthMask(false)