mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-01-09 22:06:09 +01:00
22 lines
760 B
Java
22 lines
760 B
Java
package com.jozufozu.flywheel.config;
|
|
|
|
import com.mojang.brigadier.CommandDispatcher;
|
|
|
|
import net.minecraft.commands.CommandSourceStack;
|
|
import net.minecraft.commands.Commands;
|
|
import net.minecraftforge.event.server.ServerStartingEvent;
|
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
|
|
|
public class FlwCommands {
|
|
@SubscribeEvent
|
|
public static void onServerStarting(ServerStartingEvent event) {
|
|
CommandDispatcher<CommandSourceStack> dispatcher = event.getServer()
|
|
.getCommands()
|
|
.getDispatcher();
|
|
|
|
dispatcher.register(Commands.literal("flywheel")
|
|
.then(new BooleanConfigCommand("backend", BooleanConfig.ENGINE).register())
|
|
.then(new BooleanConfigCommand("debugNormals", BooleanConfig.NORMAL_OVERLAY).register())
|
|
);
|
|
}
|
|
}
|