Skip to content

Commit

Permalink
update to new command api
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyvest committed Oct 24, 2022
1 parent 2db4091 commit 34be152
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ loom {
arg("--tweakClass", "cc.polyfrost.oneconfigwrapper.OneConfigWrapper")
property("mixin.debug.export", "true")
}
runConfigs.named("client") {
vmArgs.remove("-XstartOnFirstThread")
}
}
if (project.platform.isForge) {
forge {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mod_name = PolyTime
mod_id = polytime
mod_version = 1.0.0-alpha4
mod_version = 1.0.0-beta1

essential.defaults.loom=0

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/cc/polyfrost/polytime/PolyTime.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class PolyTime {
@net.minecraftforge.fml.common.Mod.EventHandler
public void onFMLInitialization(net.minecraftforge.fml.common.event.FMLInitializationEvent event) {
config = new TimeConfig();
CommandManager.INSTANCE.registerCommand(TimeCommand.class);
CommandManager.INSTANCE.registerCommand(new TimeCommand());
calculateSunriseSunset();
calculateMoonPhases();
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/cc/polyfrost/polytime/command/TimeCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import cc.polyfrost.oneconfig.utils.commands.annotations.Command;
import cc.polyfrost.oneconfig.utils.commands.annotations.Main;

@Command(value = PolyTime.MODID, description = "Access the " + PolyTime.NAME + " GUI.")
@Command(value = PolyTime.MODID, description = "Access the " + PolyTime.NAME + " GUI.", aliases = "timechanger")
public class TimeCommand {

@Main
private static void main() {
private void main() {
PolyTime.INSTANCE.config.openGui();
}
}

0 comments on commit 34be152

Please sign in to comment.