mirror of
https://github.com/GTNewHorizons/WirelessCraftingTerminal.git
synced 2026-10-26 14:34:11 +00:00
remove timing logging
This commit is contained in:
1 parent
9d1e6e9310
commit
c8fee02cdc
2 files changed
-38
No files matched your search
-7
@@ -3,7 +3,6 @@ package net.p455w0rd.wirelesscraftingterminal.common;
|
||||
import java.io.File;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.p455w0rd.wirelesscraftingterminal.common.utils.WCTLog;
|
||||
import net.p455w0rd.wirelesscraftingterminal.core.sync.network.NetworkHandler;
|
||||
import net.p455w0rd.wirelesscraftingterminal.creativetab.CreativeTabWCT;
|
||||
import net.p455w0rd.wirelesscraftingterminal.handlers.AchievementHandler;
|
||||
@@ -57,7 +56,6 @@ public class WirelessCraftingTerminal {
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
long stopwatch = WCTLog.beginSection("PreInit");
|
||||
WirelessCraftingTerminal.WCTState = LoaderState.PREINITIALIZATION;
|
||||
WirelessCraftingTerminal.INSTANCE = this;
|
||||
creativeTab = new CreativeTabWCT(CreativeTabs.getNextID(), Reference.MODID).setNoScrollbar();
|
||||
@@ -66,29 +64,24 @@ public class WirelessCraftingTerminal {
|
||||
FMLCommonHandler.instance().bus().register(proxy);
|
||||
AEApi.instance().registries().wireless()
|
||||
.registerWirelessHandler((IWirelessTermHandler) ItemEnum.WIRELESS_CRAFTING_TERMINAL.getItem());
|
||||
WCTLog.endSection("PreInit", stopwatch);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void init(FMLInitializationEvent event) {
|
||||
long stopwatch = WCTLog.beginSection("Init");
|
||||
IntegrationRegistry.INSTANCE.init();
|
||||
WirelessCraftingTerminal.WCTState = LoaderState.INITIALIZATION;
|
||||
if (!Loader.isModLoaded("dreamcraft")) {
|
||||
RecipeHandler.loadRecipes(!Reference.WCT_MINETWEAKER_OVERRIDE);
|
||||
}
|
||||
AchievementHandler.init();
|
||||
WCTLog.endSection("Init", stopwatch);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void postInit(final FMLPostInitializationEvent event) {
|
||||
long stopwatch = WCTLog.beginSection("PostInit");
|
||||
IntegrationRegistry.INSTANCE.postInit();
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(WirelessCraftingTerminal.INSTANCE, new WCTGuiHandler());
|
||||
NetworkHandler.instance = new NetworkHandler("WCT");
|
||||
WirelessCraftingTerminal.proxy.removeItemsFromNEI();
|
||||
WCTLog.endSection("PostInit", stopwatch);
|
||||
}
|
||||
|
||||
public static LoaderState getLoaderState() {
|
||||
|
||||
@@ -9,40 +9,15 @@ public class WCTLog {
|
||||
|
||||
public static final Logger log = LogManager.getLogger("Wireless Crafting Terminal");
|
||||
|
||||
/**
|
||||
* Displays the section header.
|
||||
*/
|
||||
public static long beginSection(final String section) {
|
||||
log.info(String.format("-=-=-=-=-=-=-=[START] %s=-=-=-=-=-=-=-", section));
|
||||
return System.currentTimeMillis();
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs a debug statement.
|
||||
*
|
||||
* @param format
|
||||
* @param data
|
||||
*/
|
||||
public static void debug(final String format, final Object... data) {
|
||||
log.debug(String.format(format, data));
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the section footer.
|
||||
*/
|
||||
public static void endSection(final String section, final long sectionStartTime) {
|
||||
log.info(
|
||||
String.format(
|
||||
"-=-=-=-=-=-=-=[FINISH] %s in %dms=-=-=-=-=-=-=-",
|
||||
section,
|
||||
(System.currentTimeMillis() - sectionStartTime)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs basic info.
|
||||
*
|
||||
* @param format
|
||||
* @param data
|
||||
*/
|
||||
public static void info(final String format, final Object... data) {
|
||||
log.info(String.format(format, data));
|
||||
@@ -50,9 +25,6 @@ public class WCTLog {
|
||||
|
||||
/**
|
||||
* Logs an error.
|
||||
*
|
||||
* @param format
|
||||
* @param data
|
||||
*/
|
||||
public static void severe(final String format, final Object... data) {
|
||||
log.error(String.format(format, data));
|
||||
@@ -60,9 +32,6 @@ public class WCTLog {
|
||||
|
||||
/**
|
||||
* Logs a warning.
|
||||
*
|
||||
* @param format
|
||||
* @param data
|
||||
*/
|
||||
public static void warning(final String format, final Object... data) {
|
||||
log.warn(String.format(format, data));
|
||||
|
||||
Reference in new issue
Block a user