Utils

object Utils

A general collection of utility functions.

This is the place for all the utility functions that do not (yet) have their own class files for a category.

Author

Aton

Functions

Link copied to clipboard
fun String.containsOneOf(options: List<String>, ignoreCase: Boolean = false): Boolean
fun String.containsOneOf(options: Set<String>, ignoreCase: Boolean = false): Boolean

Test whether the String contains one of the stings in the list.

Link copied to clipboard
fun dungeonTeammateWithClass(targetClass: String, allowSelf: Boolean = false): DungeonPlayer?

Returns the first dungeon Teammate with the chose class. Or null if not found / dead

Link copied to clipboard
fun Any?.equalsOneOf(vararg other: Any): Boolean

Checks whether any of the inputs in other fulfils structural equality (==).

Link copied to clipboard

Returns the players attack speed from the tab list info. If no attack speed info can be found return null.

Link copied to clipboard
fun getDungeonClass(tabEntries: List<Pair<NetworkPlayerInfo, String>>, playerName: String = mc.thePlayer.name): String?
Link copied to clipboard
fun Any?.identicalToOneOf(vararg other: Any): Boolean

Checks whether any of the inputs in other fulfils referential equality (===).

Link copied to clipboard
Link copied to clipboard
fun isValidEtherwarpPos(obj: MovingObjectPosition): Boolean
Link copied to clipboard
fun leftClick()
Link copied to clipboard
fun leftClickWindow(windowId: Int, index: Int)

Left clicks the specified slot.

Link copied to clipboard
fun middleClickWindow(windowId: Int, index: Int)

Middle clicks the specified slot.

Link copied to clipboard
fun playLoudSound(sound: String?, volume: Float, pitch: Float)

Taken from Skytils: Taken from SkyblockAddons under MIT License https://github.com/BiscuitDevelopment/SkyblockAddons/blob/master/LICENSE

Link copied to clipboard
fun <K, V> MutableMap<K, V>.removeIf(filter: (Map.Entry<K, V>) -> Boolean): Boolean
Link copied to clipboard
fun renderText(text: String, x: Int, y: Int, scale: Double = 1.0, color: Int = 16777215)
Link copied to clipboard
Link copied to clipboard
fun shiftClickWindow(windowId: Int, index: Int)

Shift left clicks the specified slot.

Link copied to clipboard
fun timeFormat(long: Long): String

Returns a string formatted for minutes and seconds from a value

Link copied to clipboard
fun windowClick(windowId: Int, index: Int, button: Int, mode: Int)

Performs a click on the specified slot.

Properties

Link copied to clipboard
val EntityPlayerSP.flooredPosition: BlockPos

Returns the actual block pos of the player. The value obtained by .position is shifted by 0.5 before flooring.

Link copied to clipboard

Referenced in the sound manager hook.

Link copied to clipboard
val Minecraft.timer: Timer