aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/commands/rome.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-09-01 22:21:19 +0200
committerLinnea Gräf <nea@nea.moe>2024-09-01 22:21:19 +0200
commit5ed74f2df49c93ed1617520a935078b59ad7e195 (patch)
treef0d52699fff7f820bd724902878988859bd43516 /src/main/kotlin/commands/rome.kt
parent816f80f862d2f5de6bc9b0ae84cd6df0da341228 (diff)
downloadFirmament-5ed74f2df49c93ed1617520a935078b59ad7e195.tar.gz
Firmament-5ed74f2df49c93ed1617520a935078b59ad7e195.tar.bz2
Firmament-5ed74f2df49c93ed1617520a935078b59ad7e195.zip
Add per compat project event listeners
[no changelog]
Diffstat (limited to 'src/main/kotlin/commands/rome.kt')
-rw-r--r--src/main/kotlin/commands/rome.kt33
1 files changed, 30 insertions, 3 deletions
diff --git a/src/main/kotlin/commands/rome.kt b/src/main/kotlin/commands/rome.kt
index 015512d..fbcad07 100644
--- a/src/main/kotlin/commands/rome.kt
+++ b/src/main/kotlin/commands/rome.kt
@@ -1,5 +1,3 @@
-
-
package moe.nea.firmament.commands
import com.mojang.brigadier.CommandDispatcher
@@ -9,6 +7,7 @@ import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource
import net.minecraft.text.Text
import moe.nea.firmament.apis.UrsaManager
import moe.nea.firmament.events.CommandEvent
+import moe.nea.firmament.events.FirmamentEventBus
import moe.nea.firmament.features.debug.PowerUserTools
import moe.nea.firmament.features.inventory.buttons.InventoryButtons
import moe.nea.firmament.features.inventory.storageoverlay.StorageOverlayScreen
@@ -16,6 +15,7 @@ import moe.nea.firmament.features.inventory.storageoverlay.StorageOverviewScreen
import moe.nea.firmament.gui.config.AllConfigsGui
import moe.nea.firmament.gui.config.BooleanHandler
import moe.nea.firmament.gui.config.ManagedOption
+import moe.nea.firmament.init.MixinPlugin
import moe.nea.firmament.repo.HypixelStaticData
import moe.nea.firmament.repo.RepoManager
import moe.nea.firmament.util.FirmFormatters
@@ -201,7 +201,8 @@ fun firmamentCommand() = literal("firmament") {
thenLiteral("copyEntities") {
thenExecute {
val player = MC.player ?: return@thenExecute
- player.world.getOtherEntities(player, player.boundingBox.expand(12.0)).forEach(PowerUserTools::showEntity)
+ player.world.getOtherEntities(player, player.boundingBox.expand(12.0))
+ .forEach(PowerUserTools::showEntity)
}
}
thenLiteral("callUrsa") {
@@ -213,6 +214,32 @@ fun firmamentCommand() = literal("firmament") {
}
}
}
+ thenLiteral("events") {
+ thenExecute {
+ source.sendFeedback(Text.translatable("firmament.event.start"))
+ FirmamentEventBus.allEventBuses.forEach { eventBus ->
+ source.sendFeedback(Text.translatable(
+ "firmament.event.bustype",
+ eventBus.eventType.typeName.removePrefix("moe.nea.firmament")))
+ eventBus.handlers.forEach { handler ->
+ source.sendFeedback(Text.translatable(
+ "firmament.event.handler",
+ handler.label))
+ }
+ }
+ }
+ }
+ thenLiteral("mixins") {
+ thenExecute {
+ source.sendFeedback(Text.translatable("firmament.mixins.start"))
+ MixinPlugin.appliedMixins
+ .map { it.removePrefix(MixinPlugin.mixinPackage) }
+ .forEach {
+ source.sendFeedback(Text.literal(" - ").withColor(0xD020F0)
+ .append(Text.literal(it).withColor(0xF6BA20)))
+ }
+ }
+ }
}
CommandEvent.SubCommand.publish(CommandEvent.SubCommand(this@literal))
}