2021-06-19 07:52:33 +02:00
|
|
|
package com.jozufozu.flywheel.config;
|
|
|
|
|
|
|
|
import com.mojang.brigadier.CommandDispatcher;
|
|
|
|
|
2021-09-15 08:45:29 +02:00
|
|
|
import net.minecraft.commands.CommandSourceStack;
|
|
|
|
import net.minecraft.commands.Commands;
|
2021-06-19 07:52:33 +02:00
|
|
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
2021-09-15 09:26:51 +02:00
|
|
|
import net.minecraftforge.fmlserverevents.FMLServerStartingEvent;
|
2021-06-19 07:52:33 +02:00
|
|
|
|
|
|
|
public class FlwCommands {
|
|
|
|
@SubscribeEvent
|
|
|
|
public static void onServerStarting(FMLServerStartingEvent event) {
|
2021-09-15 08:45:29 +02:00
|
|
|
CommandDispatcher<CommandSourceStack> dispatcher = event.getServer()
|
2021-07-15 20:36:24 +02:00
|
|
|
.getCommands()
|
2021-06-30 21:43:54 +02:00
|
|
|
.getDispatcher();
|
2021-06-19 07:52:33 +02:00
|
|
|
|
|
|
|
dispatcher.register(Commands.literal("flywheel")
|
|
|
|
.then(new BooleanConfigCommand("backend", BooleanConfig.ENGINE).register())
|
2021-08-02 09:06:26 +02:00
|
|
|
.then(new BooleanConfigCommand("debugNormals", BooleanConfig.NORMAL_OVERLAY).register())
|
|
|
|
);
|
2021-06-19 07:52:33 +02:00
|
|
|
}
|
|
|
|
}
|