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

23 lines
769 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;
import net.minecraftforge.eventbus.api.SubscribeEvent;
2021-09-15 09:26:51 +02:00
import net.minecraftforge.fmlserverevents.FMLServerStartingEvent;
public class FlwCommands {
@SubscribeEvent
public static void onServerStarting(FMLServerStartingEvent 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())
);
}
}