Spotless autoformatter (#32)

* Fix editorconfig for language files

* Add spotless autoformatting plugin

* Autoformatting fixes

* Update build.gradle timestamp
This commit is contained in:
Raven Szewczyk authored and GitHub committed 2022-06-23 20:53:03 +01:00
1 parent 317e07e1cf
commit 2016e39dea
7 files changed
+56 -35

No files matched your search

@@ -6,7 +6,7 @@ public class ClientProxy extends CommonProxy {
// preInit "Run before anything else. Read your config, create blocks, items,
// etc, and register them with the GameRegistry."
public void preInit(FMLPreInitializationEvent event) {
public void preInit(FMLPreInitializationEvent event) {
super.preInit(event);
}
@@ -40,4 +40,4 @@ public class ClientProxy extends CommonProxy {
public void serverStopped(FMLServerStoppedEvent event) {
super.serverStopped(event);
}
}
}
@@ -6,7 +6,7 @@ public class CommonProxy {
// preInit "Run before anything else. Read your config, create blocks, items,
// etc, and register them with the GameRegistry."
public void preInit(FMLPreInitializationEvent event) {
public void preInit(FMLPreInitializationEvent event) {
Config.syncronizeConfiguration(event.getSuggestedConfigurationFile());
MyMod.info(Config.greeting);
@@ -14,33 +14,19 @@ public class CommonProxy {
}
// load "Do your mod setup. Build whatever data structures you care about. Register recipes."
public void init(FMLInitializationEvent event) {
}
public void init(FMLInitializationEvent event) {}
// postInit "Handle interaction with other mods, complete your setup based on this."
public void postInit(FMLPostInitializationEvent event) {
public void postInit(FMLPostInitializationEvent event) {}
}
public void serverAboutToStart(FMLServerAboutToStartEvent event) {
}
public void serverAboutToStart(FMLServerAboutToStartEvent event) {}
// register server commands in this event handler
public void serverStarting(FMLServerStartingEvent event) {
public void serverStarting(FMLServerStartingEvent event) {}
}
public void serverStarted(FMLServerStartedEvent event) {}
public void serverStarted(FMLServerStartedEvent event) {
public void serverStopping(FMLServerStoppingEvent event) {}
}
public void serverStopping(FMLServerStoppingEvent event) {
}
public void serverStopped(FMLServerStoppedEvent event) {
}
public void serverStopped(FMLServerStoppedEvent event) {}
}
+5 -5
View File
@@ -1,10 +1,9 @@
package com.myname.mymodid;
import java.io.File;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.config.Property;
import java.io.File;
public class Config {
private static class Defaults {
@@ -21,11 +20,12 @@ public class Config {
Configuration configuration = new Configuration(configFile);
configuration.load();
Property greetingProperty = configuration.get(Categories.general, "greeting", Defaults.greeting, "How shall I greet?");
Property greetingProperty =
configuration.get(Categories.general, "greeting", Defaults.greeting, "How shall I greet?");
greeting = greetingProperty.getString();
if(configuration.hasChanged()) {
if (configuration.hasChanged()) {
configuration.save();
}
}
}
}
+2 -2
View File
@@ -11,7 +11,7 @@ public class MyMod {
private static Logger LOG = LogManager.getLogger(Tags.MODID);
@SidedProxy(clientSide= Tags.GROUPNAME + ".ClientProxy", serverSide=Tags.GROUPNAME + ".CommonProxy")
@SidedProxy(clientSide = Tags.GROUPNAME + ".ClientProxy", serverSide = Tags.GROUPNAME + ".CommonProxy")
public static CommonProxy proxy;
@Mod.EventHandler
@@ -74,4 +74,4 @@ public class MyMod {
public static void error(String message) {
LOG.error(message);
}
}
}
+1 -1
View File
@@ -9,4 +9,4 @@ public class Tags {
public static final String MODNAME = "GRADLETOKEN_MODNAME";
public static final String VERSION = "GRADLETOKEN_VERSION";
public static final String GROUPNAME = "GRADLETOKEN_GROUPNAME";
}
}