From a8ab8f3d6326211f6e07694c64ebd8b6ba195988 Mon Sep 17 00:00:00 2001 From: nea Date: Tue, 2 May 2023 22:38:48 +0200 Subject: Todos --- .../moe/nea/notenoughupdates/NotEnoughUpdates.kt | 4 +++- .../mixins/MixinClientBrandRetriever.kt | 18 ++++++++++++++++++ src/main/resources/notenoughupdates.mixins.json | 3 ++- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 src/main/kotlin/moe/nea/notenoughupdates/mixins/MixinClientBrandRetriever.kt (limited to 'src') diff --git a/src/main/kotlin/moe/nea/notenoughupdates/NotEnoughUpdates.kt b/src/main/kotlin/moe/nea/notenoughupdates/NotEnoughUpdates.kt index 77d3c22..7563a7a 100644 --- a/src/main/kotlin/moe/nea/notenoughupdates/NotEnoughUpdates.kt +++ b/src/main/kotlin/moe/nea/notenoughupdates/NotEnoughUpdates.kt @@ -64,18 +64,20 @@ object NotEnoughUpdates : ModInitializer, ClientModInitializer { private fun registerCommands( dispatcher: CommandDispatcher, @Suppress("UNUSED_PARAMETER") - _ctx: CommandRegistryAccess + ctx: CommandRegistryAccess ) { registerNeuCommand(dispatcher) } override fun onInitialize() { + dbusConnection.requestBusName("moe.nea.notenoughupdates") dbusConnection.exportObject(NEUDbusObject) IDataHolder.registerEvents() RepoManager.initialize() SBData.init() FeatureManager.autoload() + ClientCommandRegistrationCallback.EVENT.register(this::registerCommands) ClientLifecycleEvents.CLIENT_STOPPING.register(ClientLifecycleEvents.ClientStopping { runBlocking { diff --git a/src/main/kotlin/moe/nea/notenoughupdates/mixins/MixinClientBrandRetriever.kt b/src/main/kotlin/moe/nea/notenoughupdates/mixins/MixinClientBrandRetriever.kt new file mode 100644 index 0000000..f5ccf23 --- /dev/null +++ b/src/main/kotlin/moe/nea/notenoughupdates/mixins/MixinClientBrandRetriever.kt @@ -0,0 +1,18 @@ +package moe.nea.notenoughupdates.mixins + +import org.spongepowered.asm.mixin.Mixin +import org.spongepowered.asm.mixin.Overwrite +import net.minecraft.client.ClientBrandRetriever + +@Mixin(ClientBrandRetriever::class) +class MixinClientBrandRetriever { + +private companion object { + @JvmStatic + @Overwrite + fun getClientModName(): String { + return "penis" + } + } + +} diff --git a/src/main/resources/notenoughupdates.mixins.json b/src/main/resources/notenoughupdates.mixins.json index 52d30a7..7c1ec6b 100644 --- a/src/main/resources/notenoughupdates.mixins.json +++ b/src/main/resources/notenoughupdates.mixins.json @@ -6,7 +6,8 @@ "MixinClientPlayNetworkHandler", "MixinMessageHandler", "MixinMinecraft", - "MixinWorldRenderer" + "MixinWorldRenderer", + "MixinClientBrandRetriever" ], "mixins": [ ], -- cgit