summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/CommandsSendToServerLogger.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/DebugCommand.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/PacketTest.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/ParkourWaypointSaver.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/SkyHanniConfigSearchResetCommand.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt47
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/TestBingo.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/TestCopyBestiaryValues.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/TestCopyRngMeterValues.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/TestExportTools.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/WorldEdit.kt17
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyParticlesCommand.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/CopyScoreboardCommand.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt11
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt9
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/hotswap/HotswapSupport.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/hotswap/HotswapSupportHandle.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/hotswap/HotswapSupportImpl.kt15
21 files changed, 94 insertions, 83 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/CommandsSendToServerLogger.kt b/src/main/java/at/hannibal2/skyhanni/test/CommandsSendToServerLogger.kt
index 25d876f7a..88ce05746 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/CommandsSendToServerLogger.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/CommandsSendToServerLogger.kt
@@ -6,6 +6,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
class CommandsSendToServerLogger {
companion object {
+
fun logCommandsToServer(command: String) {
if (SkyHanniMod.feature.dev.debug.commandLogs) {
Exception("command send to server: '$command'").printStackTrace()
@@ -17,4 +18,4 @@ class CommandsSendToServerLogger {
fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) {
event.move(3, "dev.commandLogs", "dev.debug.commandLogs")
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/test/DebugCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/DebugCommand.kt
index e2ff4dbb4..42f5a5c96 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/DebugCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/DebugCommand.kt
@@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.data.HypixelData
import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.events.DebugDataCollectEvent
+import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.OSUtils
import at.hannibal2.skyhanni.utils.StringUtils.equalsIgnoreColor
@@ -13,7 +14,7 @@ object DebugCommand {
fun command(args: Array<String>) {
if (args.size == 2 && args[0] == "profileName") {
HypixelData.profileName = args[1].lowercase()
- LorenzUtils.chat("§eManually set profileName to '${HypixelData.profileName}'")
+ ChatUtils.chat("§eManually set profileName to '${HypixelData.profileName}'")
return
}
val list = mutableListOf<String>()
@@ -51,7 +52,7 @@ object DebugCommand {
list.add("```")
OSUtils.copyToClipboard(list.joinToString("\n"))
- LorenzUtils.chat("§eCopied SkyHanni debug data in the clipboard.")
+ ChatUtils.chat("§eCopied SkyHanni debug data in the clipboard.")
}
private fun profileType(event: DebugDataCollectEvent) {
diff --git a/src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt b/src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt
index 525e9bc69..b957129cc 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt
@@ -17,7 +17,7 @@ object GriffinUtils {
beacon: Boolean = false,
extraSize: Double = 0.0,
extraSizeTopY: Double = extraSize,
- extraSizeBottomY: Double = extraSize
+ extraSizeBottomY: Double = extraSize,
) {
val (viewerX, viewerY, viewerZ) = RenderUtils.getViewerPos(partialTicks)
val x = location.x - viewerX
@@ -47,4 +47,4 @@ object GriffinUtils {
GlStateManager.enableCull()
}
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/test/PacketTest.kt b/src/main/java/at/hannibal2/skyhanni/test/PacketTest.kt
index 8ae9f0c5e..c9fecaf08 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/PacketTest.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/PacketTest.kt
@@ -1,9 +1,9 @@
package at.hannibal2.skyhanni.test
import at.hannibal2.skyhanni.events.PacketEvent
+import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.EntityUtils
import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer
-import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.round
import at.hannibal2.skyhanni.utils.LorenzVec
import at.hannibal2.skyhanni.utils.getLorenzVec
@@ -33,11 +33,12 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
class PacketTest {
companion object {
+
private var enabled = false
fun toggle() {
enabled = !enabled
- LorenzUtils.chat("Packet test: $enabled")
+ ChatUtils.chat("Packet test: $enabled")
}
}
@@ -68,7 +69,6 @@ class PacketTest {
val packet = event.packet
val packetName = packet.javaClass.simpleName
-
// Keep alive
if (packetName == "S00PacketKeepAlive") return
if (packetName == "C00PacketKeepAlive") return
@@ -116,7 +116,6 @@ class PacketTest {
// if (packetName == "S20PacketEntityProperties") return
// if (packetName == "S1BPacketEntityAttach") return
-
val id = getEntityId(packet)
val entity = getEntity(packet, id)
val distance = getDistance(getLocation(packet, entity))
@@ -134,7 +133,6 @@ class PacketTest {
return
}
-
// if (packetName.contains("")) {
//
// }
diff --git a/src/main/java/at/hannibal2/skyhanni/test/ParkourWaypointSaver.kt b/src/main/java/at/hannibal2/skyhanni/test/ParkourWaypointSaver.kt
index 2574256cc..4ad8d51e6 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/ParkourWaypointSaver.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/ParkourWaypointSaver.kt
@@ -17,6 +17,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import kotlin.time.Duration.Companion.milliseconds
class ParkourWaypointSaver {
+
private val config get() = SkyHanniMod.feature.dev.waypoint
private var timeLastSaved = SimpleTimeMark.farPast()
private var locations = mutableListOf<LorenzVec>()
@@ -77,4 +78,4 @@ class ParkourWaypointSaver {
}
}
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniConfigSearchResetCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniConfigSearchResetCommand.kt
index 4332a495a..8bfcbfd22 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniConfigSearchResetCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniConfigSearchResetCommand.kt
@@ -6,10 +6,10 @@ import at.hannibal2.skyhanni.config.Features
import at.hannibal2.skyhanni.config.core.config.Position
import at.hannibal2.skyhanni.data.ProfileStorageData
import at.hannibal2.skyhanni.test.command.ErrorManager
-import at.hannibal2.skyhanni.utils.LorenzUtils
-import at.hannibal2.skyhanni.utils.LorenzUtils.makeAccessible
+import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
import at.hannibal2.skyhanni.utils.OSUtils
+import at.hannibal2.skyhanni.utils.ReflectionUtils.makeAccessible
import com.google.gson.JsonElement
import io.github.moulberry.notenoughupdates.util.Shimmy
import kotlinx.coroutines.launch
@@ -23,7 +23,7 @@ object SkyHanniConfigSearchResetCommand {
fun command(args: Array<String>) {
SkyHanniMod.coroutineScope.launch {
- LorenzUtils.chat(runCommand(args), false)
+ ChatUtils.chat(runCommand(args), false)
}
lastCommand = args
}
diff --git a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt
index 799e096eb..ccb6b198e 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt
@@ -16,6 +16,7 @@ import at.hannibal2.skyhanni.events.ReceiveParticleEvent
import at.hannibal2.skyhanni.features.garden.GardenNextJacobContest
import at.hannibal2.skyhanni.features.garden.visitor.GardenVisitorColorNames
import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled
+import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.InventoryUtils
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalNameOrNull
@@ -28,13 +29,13 @@ import at.hannibal2.skyhanni.utils.LorenzColor
import at.hannibal2.skyhanni.utils.LorenzDebug
import at.hannibal2.skyhanni.utils.LorenzLogger
import at.hannibal2.skyhanni.utils.LorenzUtils
-import at.hannibal2.skyhanni.utils.LorenzUtils.makeAccessible
import at.hannibal2.skyhanni.utils.LorenzVec
import at.hannibal2.skyhanni.utils.NEUInternalName
import at.hannibal2.skyhanni.utils.NEUItems
import at.hannibal2.skyhanni.utils.NEUItems.getNpcPriceOrNull
import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
import at.hannibal2.skyhanni.utils.OSUtils
+import at.hannibal2.skyhanni.utils.ReflectionUtils.makeAccessible
import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText
import at.hannibal2.skyhanni.utils.RenderUtils.renderString
import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems
@@ -53,6 +54,7 @@ import kotlin.time.Duration.Companion.seconds
class SkyHanniDebugsAndTests {
companion object {
+
private val config get() = SkyHanniMod.feature.dev
private val debugConfig get() = config.debug
var displayLine = ""
@@ -93,14 +95,14 @@ class SkyHanniDebugsAndTests {
if (args.isEmpty()) {
testLocation = null
- LorenzUtils.chat("reset test waypoint")
+ ChatUtils.chat("reset test waypoint")
}
val x = args[0].toDouble()
val y = args[1].toDouble()
val z = args[2].toDouble()
testLocation = LorenzVec(x, y, z)
- LorenzUtils.chat("set test waypoint")
+ ChatUtils.chat("set test waypoint")
}
fun testCommand(args: Array<String>) {
@@ -184,7 +186,7 @@ class SkyHanniDebugsAndTests {
return
}
- LorenzUtils.clickableChat(
+ ChatUtils.clickableChat(
"§cTHIS WILL RESET YOUR SkyHanni CONFIG! Click here to procceed.",
"shconfigmanagerreset confirm",
false
@@ -209,7 +211,7 @@ class SkyHanniDebugsAndTests {
// resetting the MoulConfigProcessor in use
ConfigGuiManager.editor = null
- LorenzUtils.chat("Reset the config manager!")
+ ChatUtils.chat("Reset the config manager!")
}.start()
}
@@ -239,7 +241,7 @@ class SkyHanniDebugsAndTests {
val internalName = NEUItems.getRawInternalName(itemName)
list.add(NEUItems.getItemStack(internalName))
} catch (e: Error) {
- LorenzUtils.debug("itemName '$itemName' is invalid for visitor '$name'")
+ ChatUtils.debug("itemName '$itemName' is invalid for visitor '$name'")
errors++
}
}
@@ -251,9 +253,9 @@ class SkyHanniDebugsAndTests {
bigList.add(list)
displayList = bigList
if (errors == 0) {
- LorenzUtils.debug("Test garden visitor renderer: no errors")
+ ChatUtils.debug("Test garden visitor renderer: no errors")
} else {
- LorenzUtils.debug("Test garden visitor renderer: $errors errors")
+ ChatUtils.debug("Test garden visitor renderer: $errors errors")
}
}
@@ -282,7 +284,7 @@ class SkyHanniDebugsAndTests {
println("Skipped registering listener $simpleName")
}
}
- LorenzUtils.chat("reloaded ${modules.size} listener classes.")
+ ChatUtils.chat("reloaded ${modules.size} listener classes.")
}
fun stopListeners() {
@@ -293,22 +295,22 @@ class SkyHanniDebugsAndTests {
MinecraftForge.EVENT_BUS.unregister(original)
println("Unregistered listener $simpleName")
}
- LorenzUtils.chat("stopped ${modules.size} listener classes.")
+ ChatUtils.chat("stopped ${modules.size} listener classes.")
}
fun whereAmI() {
if (LorenzUtils.inSkyBlock) {
- LorenzUtils.chat("§eYou are currently in ${LorenzUtils.skyBlockIsland}.")
+ ChatUtils.chat("§eYou are currently in ${LorenzUtils.skyBlockIsland}.")
return
}
- LorenzUtils.chat("§eYou are not in Skyblock.")
+ ChatUtils.chat("§eYou are not in Skyblock.")
}
private var lastManualContestDataUpdate = SimpleTimeMark.farPast()
fun clearContestData() {
if (lastManualContestDataUpdate.passedSince() < 30.seconds) {
- LorenzUtils.userError("§cYou already cleared Jacob's Contest data recently!")
+ ChatUtils.userError("§cYou already cleared Jacob's Contest data recently!")
return
}
lastManualContestDataUpdate = SimpleTimeMark.now()
@@ -338,34 +340,34 @@ class SkyHanniDebugsAndTests {
fun debugVersion() {
val name = "SkyHanni ${SkyHanniMod.version}"
- LorenzUtils.chat("§eYou are using $name")
+ ChatUtils.chat("§eYou are using $name")
OSUtils.copyToClipboard(name)
}
fun copyItemInternalName() {
val hand = InventoryUtils.getItemInHand()
if (hand == null) {
- LorenzUtils.userError("No item in hand!")
+ ChatUtils.userError("No item in hand!")
return
}
val internalName = hand.getInternalNameOrNull()
if (internalName == null) {
- LorenzUtils.error("§cInternal name is null for item ${hand.name}")
+ ChatUtils.error("§cInternal name is null for item ${hand.name}")
return
}
val rawInternalName = internalName.asString()
OSUtils.copyToClipboard(rawInternalName)
- LorenzUtils.chat("§eCopied internal name §7$rawInternalName §eto the clipboard!")
+ ChatUtils.chat("§eCopied internal name §7$rawInternalName §eto the clipboard!")
}
fun toggleRender() {
globalRender = !globalRender
if (globalRender) {
- LorenzUtils.chat("§aEnabled global renderer!")
+ ChatUtils.chat("§aEnabled global renderer!")
} else {
- LorenzUtils.chat("§cDisabled global renderer! Run this command again to show SkyHanni rendering again.")
+ ChatUtils.chat("§cDisabled global renderer! Run this command again to show SkyHanni rendering again.")
}
}
}
@@ -379,7 +381,7 @@ class SkyHanniDebugsAndTests {
val internalName = stack.getInternalNameOrNull() ?: return
val rawInternalName = internalName.asString()
OSUtils.copyToClipboard(rawInternalName)
- LorenzUtils.chat("§eCopied internal name §7$rawInternalName §eto the clipboard!")
+ ChatUtils.chat("§eCopied internal name §7$rawInternalName §eto the clipboard!")
}
@SubscribeEvent
@@ -390,7 +392,6 @@ class SkyHanniDebugsAndTests {
val internalName = itemStack.getInternalName()
if ((internalName == NEUInternalName.NONE) && !debugConfig.showEmptyNames) return
event.toolTip.add("Internal Name: '${internalName.asString()}'")
-
}
@SubscribeEvent
@@ -435,7 +436,6 @@ class SkyHanniDebugsAndTests {
@SubscribeEvent
fun onChat(event: LorenzChatEvent) {
-
}
@SubscribeEvent
@@ -571,7 +571,7 @@ class SkyHanniDebugsAndTests {
// if (soundName == "mob.zombie.infect") {
// if (pitch == 1.968254f) {
// if (volume == 0.3f) {
-// LorenzUtils.chat("used ancestral spade!")
+// ChatUtils.chat("used ancestral spade!")
// return
// }
// }
@@ -662,6 +662,5 @@ class SkyHanniDebugsAndTests {
event.move(3, "dev.showItemRarity", "dev.debug.showItemRarity")
event.move(3, "dev.copyInternalName", "dev.debug.copyInternalName")
event.move(3, "dev.showNpcPrice", "dev.debug.showNpcPrice")
-
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/test/TestBingo.kt b/src/main/java/at/hannibal2/skyhanni/test/TestBingo.kt
index 95832ac46..99418c607 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/TestBingo.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/TestBingo.kt
@@ -1,12 +1,13 @@
package at.hannibal2.skyhanni.test
-import at.hannibal2.skyhanni.utils.LorenzUtils
+import at.hannibal2.skyhanni.utils.ChatUtils
object TestBingo {
+
var testBingo = false
fun toggle() {
testBingo = !testBingo
- LorenzUtils.chat("Test Bingo " + (if (testBingo) "enabled" else "disabled"))
+ ChatUtils.chat("Test Bingo " + (if (testBingo) "enabled" else "disabled"))
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/test/TestCopyBestiaryValues.kt b/src/main/java/at/hannibal2/skyhanni/test/TestCopyBestiaryValues.kt
index 24edae9cc..e418f6043 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/TestCopyBestiaryValues.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/TestCopyBestiaryValues.kt
@@ -3,11 +3,11 @@ package at.hannibal2.skyhanni.test
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator
import at.hannibal2.skyhanni.events.InventoryUpdatedEvent
+import at.hannibal2.skyhanni.utils.CollectionUtils.nextAfter
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.ItemUtils.getSkullOwner
import at.hannibal2.skyhanni.utils.ItemUtils.getSkullTexture
import at.hannibal2.skyhanni.utils.ItemUtils.name
-import at.hannibal2.skyhanni.utils.LorenzUtils.nextAfter
import at.hannibal2.skyhanni.utils.NumberUtil.formatNumber
import at.hannibal2.skyhanni.utils.OSUtils
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
@@ -21,6 +21,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
object TestCopyBestiaryValues {
class BestiarityObject {
+
@Expose
var name: String = ""
diff --git a/src/main/java/at/hannibal2/skyhanni/test/TestCopyRngMeterValues.kt b/src/main/java/at/hannibal2/skyhanni/test/TestCopyRngMeterValues.kt
index be659b25d..5ab1effb7 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/TestCopyRngMeterValues.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/TestCopyRngMeterValues.kt
@@ -4,9 +4,9 @@ import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.ConfigManager
import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
+import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
-import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.NEUInternalName
import at.hannibal2.skyhanni.utils.NumberUtil.formatNumber
import at.hannibal2.skyhanni.utils.OSUtils
@@ -35,11 +35,11 @@ object TestCopyRngMeterValues {
if (map.isEmpty()) return
OSUtils.copyToClipboard(ConfigManager.gson.toJson(map))
- LorenzUtils.debug("${map.size} items saved to clipboard.")
+ ChatUtils.debug("${map.size} items saved to clipboard.")
}
@SubscribeEvent
fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) {
event.move(3, "dev.copyRngMeter", "dev.debug.copyRngMeter")
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/test/TestExportTools.kt b/src/main/java/at/hannibal2/skyhanni/test/TestExportTools.kt
index b7c1a6f4b..304d4646f 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/TestExportTools.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/TestExportTools.kt
@@ -3,11 +3,11 @@ package at.hannibal2.skyhanni.test
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator
import at.hannibal2.skyhanni.test.command.CopyItemCommand.copyItemToClipboard
+import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.ItemStackTypeAdapterFactory
import at.hannibal2.skyhanni.utils.KSerializable
import at.hannibal2.skyhanni.utils.KeyboardManager.isKeyHeld
import at.hannibal2.skyhanni.utils.KotlinTypeAdapterFactory
-import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.NBTTypeAdapter
import at.hannibal2.skyhanni.utils.OSUtils
import at.hannibal2.skyhanni.utils.fromJson
@@ -22,6 +22,7 @@ import java.io.InputStreamReader
import java.io.Reader
object TestExportTools {
+
private val config get() = SkyHanniMod.feature.dev.debug
val gson = GsonBuilder()
@@ -61,7 +62,7 @@ object TestExportTools {
}
val json = toJson(Item, stack)
OSUtils.copyToClipboard(json)
- LorenzUtils.chat("Compressed item info copied into the clipboard!")
+ ChatUtils.chat("Compressed item info copied into the clipboard!")
}
inline fun <reified T> getTestData(category: Key<T>, name: String): T {
diff --git a/src/main/java/at/hannibal2/skyhanni/test/WorldEdit.kt b/src/main/java/at/hannibal2/skyhanni/test/WorldEdit.kt
index 26ac4d9a7..5e03464b7 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/WorldEdit.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/WorldEdit.kt
@@ -5,9 +5,9 @@ import at.hannibal2.skyhanni.data.ClickType
import at.hannibal2.skyhanni.events.BlockClickEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
import at.hannibal2.skyhanni.events.withAlpha
+import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.ClipboardUtils
import at.hannibal2.skyhanni.utils.LocationUtils
-import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.RenderUtils
import at.hannibal2.skyhanni.utils.RenderUtils.expandBlock
import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getItemId
@@ -18,6 +18,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import java.awt.Color
object WorldEdit {
+
private var leftPos = null as BlockPos?
private var rightPos = null as BlockPos?
@@ -97,37 +98,37 @@ object WorldEdit {
fun command(it: Array<String>) {
if (!isEnabled()) {
- LorenzUtils.userError("World Edit is disabled in the config. Enable it if you want to use it.")
+ ChatUtils.userError("World Edit is disabled in the config. Enable it if you want to use it.")
return
}
when (it.firstOrNull()) {
null, "help" -> {
- LorenzUtils.chat("Use a wood axe and left/right click to select a region in the world. Then use /shworldedit copy or /shworldedit reset.")
+ ChatUtils.chat("Use a wood axe and left/right click to select a region in the world. Then use /shworldedit copy or /shworldedit reset.")
}
"copy" -> {
copyToClipboard()
- LorenzUtils.chat("Copied text to clipboard.")
+ ChatUtils.chat("Copied text to clipboard.")
}
"reset" -> {
leftPos = null
rightPos = null
- LorenzUtils.chat("Reset selected region")
+ ChatUtils.chat("Reset selected region")
}
"left", "pos1" -> {
leftPos = LocationUtils.playerLocation().toBlockPos()
- LorenzUtils.chat("Set left pos.")
+ ChatUtils.chat("Set left pos.")
}
"right", "pos2" -> {
leftPos = LocationUtils.playerLocation().toBlockPos()
- LorenzUtils.chat("Set right pos.")
+ ChatUtils.chat("Set right pos.")
}
else -> {
- LorenzUtils.chat("Unknown subcommand")
+ ChatUtils.chat("Unknown subcommand")
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt
index 6a583b1e3..d038d7759 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt
@@ -1,9 +1,9 @@
package at.hannibal2.skyhanni.test.command
+import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.InventoryUtils
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
-import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.OSUtils
import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getMinecraftId
import net.minecraft.item.ItemStack
@@ -14,7 +14,7 @@ object CopyItemCommand {
fun command() {
val itemStack = InventoryUtils.getItemInHand()
if (itemStack == null) {
- LorenzUtils.userError("No item in hand!")
+ ChatUtils.userError("No item in hand!")
return
}
copyItemToClipboard(itemStack)
@@ -53,6 +53,6 @@ object CopyItemCommand {
val string = resultList.joinToString("\n")
OSUtils.copyToClipboard(string)
- LorenzUtils.chat("Item info copied into the clipboard!")
+ ChatUtils.chat("Item info copied into the clipboard!")
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt
index dae69775a..5ba4447f2 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt
@@ -1,5 +1,6 @@
package at.hannibal2.skyhanni.test.command
+import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.EntityUtils
import at.hannibal2.skyhanni.utils.EntityUtils.getBlockInHand
import at.hannibal2.skyhanni.utils.EntityUtils.getSkinTexture
@@ -8,7 +9,6 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getSkullTexture
import at.hannibal2.skyhanni.utils.ItemUtils.isEnchanted
import at.hannibal2.skyhanni.utils.ItemUtils.name
import at.hannibal2.skyhanni.utils.LocationUtils
-import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.baseMaxHealth
import at.hannibal2.skyhanni.utils.OSUtils
import at.hannibal2.skyhanni.utils.toLorenzVec
@@ -45,7 +45,7 @@ object CopyNearbyEntitiesCommand {
resultList.add("name: '" + entity.name + "'")
resultList.add("displayName: '${displayName.formattedText}'")
resultList.add("entityId: ${entity.entityId}")
- resultList.add("uuid version: ${entity.uniqueID.version()} ${if(entity.uniqueID.version() != 4) "NPC " else ""}(${entity.uniqueID})")
+ resultList.add("uuid version: ${entity.uniqueID.version()} ${if (entity.uniqueID.version() != 4) "NPC " else ""}(${entity.uniqueID})")
resultList.add("location data:")
resultList.add("- vec: $vec")
resultList.add("- distance: $distance")
@@ -147,9 +147,9 @@ object CopyNearbyEntitiesCommand {
if (counter != 0) {
val string = resultList.joinToString("\n")
OSUtils.copyToClipboard(string)
- LorenzUtils.chat("$counter entities copied into the clipboard!")
+ ChatUtils.chat("$counter entities copied into the clipboard!")
} else {
- LorenzUtils.chat("No entities found in a search radius of $searchRadius!")
+ ChatUtils.chat("No entities found in a search radius of $searchRadius!")
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyParticlesCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyParticlesCommand.kt
index 67b28f0aa..c76d7318f 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyParticlesCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyParticlesCommand.kt
@@ -1,8 +1,8 @@
package at.hannibal2.skyhanni.test.command
import at.hannibal2.skyhanni.events.PacketEvent
+import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.LocationUtils
-import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.round
import at.hannibal2.skyhanni.utils.LorenzVec
import at.hannibal2.skyhanni.utils.OSUtils
@@ -13,6 +13,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
// Note: Each particle is copied anywhere between 1-3 times. Different each time. Shouldn't affect using this for debugging or developing
object CopyNearbyParticlesCommand {
+
private var searchRadius = 0
private var saveNextTick = false
private var searchTime: Long = 0
@@ -41,10 +42,10 @@ object CopyNearbyParticlesCommand {
if (resultList.isEmpty() && tickTime == 0L) tickTime = System.currentTimeMillis()
if (System.currentTimeMillis() > tickTime + 30) {
- if (counter == 0) LorenzUtils.chat("No particles found nearby, try a larger search radius") else {
+ if (counter == 0) ChatUtils.chat("No particles found nearby, try a larger search radius") else {
val string = resultList.joinToString("\n")
OSUtils.copyToClipboard(string)
- LorenzUtils.chat("$counter particles copied into the clipboard!")
+ ChatUtils.chat("$counter particles copied into the clipboard!")
}
saveNextTick = false
return
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyScoreboardCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyScoreboardCommand.kt
index b940d1948..e0750c5a1 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyScoreboardCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test