FMLRelaunchLog is deprecated in favour of FMLLog. Small grammatical fixed as well.

They want you to get a logger in the PreInit phase, but seeing as we are a coremod we run before those events take place.
This commit is contained in:
Gunther De Wachter
2017-07-04 17:50:10 +02:00
parent 0e2f8a22a2
commit d67f97cd16
3 changed files with 6 additions and 5 deletions
+3 -2
View File
@@ -26,15 +26,16 @@ import javax.annotation.Nullable;
import com.google.common.eventbus.EventBus; import com.google.common.eventbus.EventBus;
import net.minecraftforge.fml.common.DummyModContainer; import net.minecraftforge.fml.common.DummyModContainer;
import net.minecraftforge.fml.common.FMLLog;
import net.minecraftforge.fml.common.LoadController; import net.minecraftforge.fml.common.LoadController;
import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.ModMetadata; import net.minecraftforge.fml.common.ModMetadata;
import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.relauncher.FMLRelaunchLog;
import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin; import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin;
import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin.MCVersion; import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin.MCVersion;
import appeng.core.AEConfig; import appeng.core.AEConfig;
import org.apache.logging.log4j.Level;
@MCVersion( "1.11.2" ) @MCVersion( "1.11.2" )
@@ -44,7 +45,7 @@ public final class AppEngCore extends DummyModContainer implements IFMLLoadingPl
public AppEngCore() public AppEngCore()
{ {
FMLRelaunchLog.info( "[AppEng] Core Init" ); FMLLog.log("AE2-CORE", Level.INFO,"[AppEng] Core Init" );
this.metadata.autogenerated = false; this.metadata.autogenerated = false;
this.metadata.authorList.add( "AlgorithmX2" ); this.metadata.authorList.add( "AlgorithmX2" );
this.metadata.credits = "AlgorithmX2"; this.metadata.credits = "AlgorithmX2";
@@ -72,7 +72,7 @@ public final class MissingCoreMod extends CustomModLoadingErrorDisplayException
} }
else else
{ {
this.drawCenteredString( fontRenderer, "You're launcher may refer to this by different names,", errorScreen.width / 2, offset, COLOR_WHITE ); this.drawCenteredString( fontRenderer, "Your launcher may refer to this by different names,", errorScreen.width / 2, offset, COLOR_WHITE );
offset += SCREEN_OFFSET + 5; offset += SCREEN_OFFSET + 5;
@@ -23,6 +23,7 @@ import java.util.Iterator;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import net.minecraftforge.fml.common.FMLLog;
import org.apache.logging.log4j.Level; import org.apache.logging.log4j.Level;
import org.objectweb.asm.ClassReader; import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter; import org.objectweb.asm.ClassWriter;
@@ -32,7 +33,6 @@ import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.MethodNode; import org.objectweb.asm.tree.MethodNode;
import net.minecraft.launchwrapper.IClassTransformer; import net.minecraft.launchwrapper.IClassTransformer;
import net.minecraftforge.fml.relauncher.FMLRelaunchLog;
import appeng.coremod.annotations.Integration; import appeng.coremod.annotations.Integration;
import appeng.helpers.Reflected; import appeng.helpers.Reflected;
@@ -250,6 +250,6 @@ public final class ASMIntegration implements IClassTransformer
private void log( final String string ) private void log( final String string )
{ {
FMLRelaunchLog.log( "AE2-CORE", Level.INFO, string ); FMLLog.log( "AE2-CORE", Level.INFO, string );
} }
} }