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
@@ -30,6 +30,7 @@ public class AscendMindMotion {
MinecraftForge.EVENT_BUS.register(this);
MinecraftForge.EVENT_BUS.register(PlayerTickHandler.class);
MinecraftForge.EVENT_BUS.register(CombatEvents.class);
MinecraftForge.EVENT_BUS.register(SanityCommand.class);
LOGGER.info("Ascend: Mind and Motion initialized!");
ModLoadingContext.get().registerConfig(ModConfig.Type.CLIENT, ConfigMM.CLIENT_SPEC);
ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, ConfigMM.COMMON_SPEC);
@@ -38,9 +39,4 @@ public class AscendMindMotion {
private void commonSetup(final FMLCommonSetupEvent event) {
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.Commands;
import net.minecraft.server.level.ServerPlayer;
import net.minecraftforge.event.RegisterCommandsEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
public class SanityCommand {
@@ -38,4 +40,9 @@ public class SanityCommand {
)
);
}
@SubscribeEvent
public static void registerCommands(RegisterCommandsEvent event) {
SanityCommand.register(event.getDispatcher());
}
}