Small patch for commands

This commit is contained in:
2025-11-24 11:42:46 +01:00
parent fb6cc3f277
commit e5a721cb72
3 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ dependencies {
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
// Local Ascend mod (works because of mavenLocal()) // Local Ascend mod (works because of mavenLocal())
implementation fg.deobf("net.fretux.ascend:Ascend:2.0.1") implementation fg.deobf("net.fretux.ascend:Ascend:2.0.2")
// Iron's Spellbooks // Iron's Spellbooks
compileOnly fg.deobf("io.redspace.ironsspellbooks:irons_spellbooks:${irons_spells_version}:api") compileOnly fg.deobf("io.redspace.ironsspellbooks:irons_spellbooks:${irons_spells_version}:api")
@@ -30,6 +30,7 @@ public class AscendMindMotion {
MinecraftForge.EVENT_BUS.register(this); MinecraftForge.EVENT_BUS.register(this);
MinecraftForge.EVENT_BUS.register(PlayerTickHandler.class); MinecraftForge.EVENT_BUS.register(PlayerTickHandler.class);
MinecraftForge.EVENT_BUS.register(CombatEvents.class); MinecraftForge.EVENT_BUS.register(CombatEvents.class);
MinecraftForge.EVENT_BUS.register(SanityCommand.class);
LOGGER.info("Ascend: Mind and Motion initialized!"); LOGGER.info("Ascend: Mind and Motion initialized!");
ModLoadingContext.get().registerConfig(ModConfig.Type.CLIENT, ConfigMM.CLIENT_SPEC); ModLoadingContext.get().registerConfig(ModConfig.Type.CLIENT, ConfigMM.CLIENT_SPEC);
ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, ConfigMM.COMMON_SPEC); ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, ConfigMM.COMMON_SPEC);
@@ -38,9 +39,4 @@ public class AscendMindMotion {
private void commonSetup(final FMLCommonSetupEvent event) { private void commonSetup(final FMLCommonSetupEvent event) {
ModMessages.register(); ModMessages.register();
} }
@SubscribeEvent
public static void registerCommands(RegisterCommandsEvent event) {
SanityCommand.register(event.getDispatcher());
}
} }
@@ -6,6 +6,8 @@ import net.fretux.mindmotion.player.PlayerCapabilityProvider;
import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands; import net.minecraft.commands.Commands;
import net.minecraft.server.level.ServerPlayer; import net.minecraft.server.level.ServerPlayer;
import net.minecraftforge.event.RegisterCommandsEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
public class SanityCommand { public class SanityCommand {
@@ -38,4 +40,9 @@ public class SanityCommand {
) )
); );
} }
@SubscribeEvent
public static void registerCommands(RegisterCommandsEvent event) {
SanityCommand.register(event.getDispatcher());
}
} }