mirror of
https://github.com/GTNewHorizons/Mantle.git
synced 2026-11-19 19:49:41 +00:00
Run formatter over project
This commit is contained in:
1 parent
fea057fa7e
commit
8f59aa1cc7
7 files changed
+67
-62
No files matched your search
+43
-40
@@ -23,52 +23,55 @@ import mantle.internal.EnvironmentChecks;
|
||||
*/
|
||||
@Mod(modid = CoreRepo.modId, name = CoreRepo.modName, version = CoreRepo.modVersion, dependencies = "required-after:Forge@[8.9,)")
|
||||
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
|
||||
public class Mantle {
|
||||
|
||||
public class Mantle
|
||||
{
|
||||
|
||||
public static final Logger logger = Logger.getLogger(CoreRepo.modName);
|
||||
|
||||
/**
|
||||
* FML preinitialisation handler
|
||||
*
|
||||
* This is where we load our configs and related data, preparing for main load.
|
||||
*
|
||||
* @param evt The FMLPreInitializationEvent from FML
|
||||
*/
|
||||
@EventHandler
|
||||
public void preInit (FMLPreInitializationEvent event)
|
||||
{
|
||||
logger.setParent(FMLCommonHandler.instance().getFMLLogger());
|
||||
|
||||
/**
|
||||
* FML preinitialisation handler
|
||||
*
|
||||
* This is where we load our configs and related data, preparing for main load.
|
||||
*
|
||||
* @param evt The FMLPreInitializationEvent from FML
|
||||
*/
|
||||
@EventHandler
|
||||
public void preInit (FMLPreInitializationEvent event){
|
||||
logger.setParent(FMLCommonHandler.instance().getFMLLogger());
|
||||
CoreConfig.loadConfiguration(new Configuration(event.getSuggestedConfigurationFile()));
|
||||
|
||||
CoreConfig.loadConfiguration(new Configuration(event.getSuggestedConfigurationFile()));
|
||||
|
||||
logger.info("Mantle (" + CoreRepo.modVersion + ") -- Preparing for launch.");
|
||||
logger.info("Entering preinitialization phase.");
|
||||
logger.info("Mantle (" + CoreRepo.modVersion + ") -- Preparing for launch.");
|
||||
logger.info("Entering preinitialization phase.");
|
||||
|
||||
EnvironmentChecks.verifyEnvironmentSanity();
|
||||
}
|
||||
EnvironmentChecks.verifyEnvironmentSanity();
|
||||
}
|
||||
|
||||
/**
|
||||
* FML preinitialisation handler
|
||||
*
|
||||
* This is where we handle basic loading and populating any missing data in the Repo
|
||||
*
|
||||
* @param evt The FMLInitializationEvent from FML
|
||||
*/
|
||||
@EventHandler
|
||||
public void Init (FMLPreInitializationEvent event){
|
||||
logger.info("Entering initialization phase.");
|
||||
}
|
||||
/**
|
||||
* FML preinitialisation handler
|
||||
*
|
||||
* This is where we handle basic loading and populating any missing data in the Repo
|
||||
*
|
||||
* @param evt The FMLInitializationEvent from FML
|
||||
*/
|
||||
@EventHandler
|
||||
public void Init (FMLPreInitializationEvent event)
|
||||
{
|
||||
logger.info("Entering initialization phase.");
|
||||
}
|
||||
|
||||
/**
|
||||
* FML preinitialisation handler
|
||||
*
|
||||
* Final chance for cleanup before main game launch
|
||||
*
|
||||
* @param evt The FMLPostInitializationEvent from FML
|
||||
*/
|
||||
@EventHandler
|
||||
public void postInit (FMLPreInitializationEvent event){
|
||||
logger.info("Entering postinitialization phase.");
|
||||
}
|
||||
/**
|
||||
* FML preinitialisation handler
|
||||
*
|
||||
* Final chance for cleanup before main game launch
|
||||
*
|
||||
* @param evt The FMLPostInitializationEvent from FML
|
||||
*/
|
||||
@EventHandler
|
||||
public void postInit (FMLPreInitializationEvent event)
|
||||
{
|
||||
logger.info("Entering postinitialization phase.");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,8 +12,6 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
* NEEDS CONVERTED!
|
||||
*
|
||||
* Abstract logic for inventory Tile Entities.
|
||||
*
|
||||
* @author mDiyo
|
||||
|
||||
@@ -8,7 +8,8 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
*
|
||||
* @author mDiyo
|
||||
*/
|
||||
public interface IFacingLogic {
|
||||
public interface IFacingLogic
|
||||
{
|
||||
|
||||
public byte getRenderDirection ();
|
||||
|
||||
|
||||
@@ -20,7 +20,8 @@ import mantle.internal.crash.CallableSuppConfig;
|
||||
*
|
||||
* @author Sunstrike <[email protected]>
|
||||
*/
|
||||
public class EnvironmentChecks {
|
||||
public class EnvironmentChecks
|
||||
{
|
||||
|
||||
public static boolean hasOptifine = false;
|
||||
|
||||
@@ -38,7 +39,8 @@ public class EnvironmentChecks {
|
||||
|
||||
if (Loader.isModLoaded("gregtech_addon"))
|
||||
{
|
||||
Mantle.logger.severe("[Environment Checks] Gelatinous iceberg dead ahead! Entering Greggy waters! Abandon hope all ye who enter here! (No, seriously, we don't support GT. Don't report any issues. Thanks.)");
|
||||
Mantle.logger
|
||||
.severe("[Environment Checks] Gelatinous iceberg dead ahead! Entering Greggy waters! Abandon hope all ye who enter here! (No, seriously, we don't support GT. Don't report any issues. Thanks.)");
|
||||
modIds.add("gregtech_addon");
|
||||
}
|
||||
|
||||
@@ -49,7 +51,6 @@ public class EnvironmentChecks {
|
||||
hasOptifine = true;
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
Class cl = Class.forName("org.bukkit.Bukkit");
|
||||
|
||||
@@ -11,21 +11,23 @@ import mantle.lib.CoreRepo.*;
|
||||
*
|
||||
* @author Sunstrike <[email protected]>
|
||||
*/
|
||||
public class CoreConfig {
|
||||
public class CoreConfig
|
||||
{
|
||||
|
||||
/**
|
||||
* Loads state from a Forge configuration object, or saves a new file if it doesn't already exist.
|
||||
*
|
||||
* @param config Configuration object (usually from a location given by FML in preinit)
|
||||
*/
|
||||
public static void loadConfiguration(Configuration config) {
|
||||
Mantle.logger.info("Loading configuration from disk.");
|
||||
config.load();
|
||||
/**
|
||||
* Loads state from a Forge configuration object, or saves a new file if it doesn't already exist.
|
||||
*
|
||||
* @param config Configuration object (usually from a location given by FML in preinit)
|
||||
*/
|
||||
public static void loadConfiguration (Configuration config)
|
||||
{
|
||||
Mantle.logger.info("Loading configuration from disk.");
|
||||
config.load();
|
||||
|
||||
// TODO: Config vars get/set here
|
||||
// TODO: Config vars get/set here
|
||||
|
||||
config.save();
|
||||
Mantle.logger.info("Configuration load completed.");
|
||||
}
|
||||
config.save();
|
||||
Mantle.logger.info("Configuration load completed.");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,9 +9,10 @@ import java.util.logging.Logger;
|
||||
*
|
||||
* @author Sunstrike <[email protected]>
|
||||
*/
|
||||
public final class CoreRepo {
|
||||
public final class CoreRepo
|
||||
{
|
||||
|
||||
public static final String modId = "Mantle";
|
||||
public static final String modId = "Mantle";
|
||||
public static final String modName = "Mantle";
|
||||
public static final String modVersion = "${version}";
|
||||
|
||||
|
||||
@@ -28,4 +28,3 @@ public class CoordTupleSort implements Comparator
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user