Flywheel/src/main/java/com/jozufozu/flywheel/config/FlwCommands.java

23 lines
760 B
Java
Raw Normal View History

package com.jozufozu.flywheel.config;
import com.mojang.brigadier.CommandDispatcher;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
2021-12-07 06:29:21 +01:00
import net.minecraftforge.event.server.ServerStartingEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
public class FlwCommands {
@SubscribeEvent
2021-12-07 06:29:21 +01:00
public static void onServerStarting(ServerStartingEvent event) {
CommandDispatcher<CommandSourceStack> dispatcher = event.getServer()
2021-07-15 20:36:24 +02:00
.getCommands()
.getDispatcher();
dispatcher.register(Commands.literal("flywheel")
.then(new BooleanConfigCommand("backend", BooleanConfig.ENGINE).register())
.then(new BooleanConfigCommand("debugNormals", BooleanConfig.NORMAL_OVERLAY).register())
);
}
}