mirror of
https://github.com/GTNewHorizons/waila.git
synced 2026-11-26 15:03:20 +00:00
Updated to log4j2
Also did some unused import cleanup and deprecation cleanup.
This commit is contained in:
1 parent
f4ae8de69e
commit
eae6385a45
29 files changed
+102
-103
No files matched your search
@@ -2,7 +2,9 @@ package mcp.mobius.waila;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import com.google.common.eventbus.EventBus;
|
||||
import com.google.common.eventbus.Subscribe;
|
||||
@@ -56,7 +58,7 @@ public class Waila {
|
||||
|
||||
@SidedProxy(clientSide="mcp.mobius.waila.client.ProxyClient", serverSide="mcp.mobius.waila.server.ProxyServer")
|
||||
public static ProxyServer proxy;
|
||||
public static Logger log = Logger.getLogger("Waila");
|
||||
public static Logger log = LogManager.getLogger("Waila");
|
||||
public boolean serverPresent = false;
|
||||
|
||||
/* INIT SEQUENCE */
|
||||
@@ -147,7 +149,7 @@ public class Waila {
|
||||
if (imcMessage.key.equalsIgnoreCase("addconfig")){
|
||||
String[] params = imcMessage.getStringValue().split("\\$\\$");
|
||||
if (params.length != 3){
|
||||
Waila.log.warning(String.format("Error while parsing config option from [ %s ] for %s", imcMessage.getSender(), imcMessage.getStringValue()));
|
||||
Waila.log.warn(String.format("Error while parsing config option from [ %s ] for %s", imcMessage.getSender(), imcMessage.getStringValue()));
|
||||
continue;
|
||||
}
|
||||
Waila.log.info(String.format("Receiving config request from [ %s ] for %s", imcMessage.getSender(), imcMessage.getStringValue()));
|
||||
@@ -176,11 +178,11 @@ public class Waila {
|
||||
Waila.log.info(String.format("Success in registering %s", modname));
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.warning(String.format("Could not find class %s", className));
|
||||
Waila.log.warn(String.format("Could not find class %s", className));
|
||||
} catch (NoSuchMethodException e){
|
||||
Waila.log.warning(String.format("Could not find method %s", methodName));
|
||||
Waila.log.warn(String.format("Could not find method %s", methodName));
|
||||
} catch (Exception e){
|
||||
Waila.log.warning(String.format("Exception while trying to access the method : %s", e.toString()));
|
||||
Waila.log.warn(String.format("Exception while trying to access the method : %s", e.toString()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package mcp.mobius.waila.addons.agriculture;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
@@ -21,7 +21,7 @@ public class AgricultureModule {
|
||||
try{
|
||||
BlockCrop = Class.forName("com.teammetallurgy.agriculture.crops.BlockCrop");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[Agriculture] Class not found. " + e);
|
||||
Waila.log.log(Level.WARN, "[Agriculture] Class not found. " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package mcp.mobius.waila.addons.buildcraft;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import mcp.mobius.waila.Waila;
|
||||
@@ -31,10 +32,10 @@ public class BCModule {
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileTank);
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[BC] Class not found. " + e);
|
||||
Waila.log.log(Level.WARN, "[BC] Class not found. " + e);
|
||||
return;
|
||||
} catch (NoSuchMethodException e){
|
||||
Waila.log.log(Level.WARNING, "[BC] Method not found." + e);
|
||||
Waila.log.log(Level.WARN, "[BC] Method not found." + e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package mcp.mobius.waila.addons.buildcraft;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import mcp.mobius.waila.Waila;
|
||||
@@ -56,16 +56,16 @@ public class BCPowerAPIModule {
|
||||
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[EnderStorage] Class not found. " + e);
|
||||
Waila.log.log(Level.WARN, "[EnderStorage] Class not found. " + e);
|
||||
return;
|
||||
} catch (NoSuchMethodException e){
|
||||
Waila.log.log(Level.WARNING, "[EnderStorage] Method not found." + e);
|
||||
Waila.log.log(Level.WARN, "[EnderStorage] Method not found." + e);
|
||||
return;
|
||||
// } catch (NoSuchFieldException e){
|
||||
// mod_Waila.log.log(Level.WARNING, "[EnderStorage] Field not found." + e);
|
||||
// return;
|
||||
} catch (Exception e){
|
||||
Waila.log.log(Level.WARNING, "[EnderStorage] Unhandled exception." + e);
|
||||
Waila.log.log(Level.WARN, "[EnderStorage] Unhandled exception." + e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package mcp.mobius.waila.addons.buildcraft;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
//import buildcraft.factory.TileTank;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
@@ -14,7 +15,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import mcp.mobius.waila.cbcore.LangUtil;
|
||||
|
||||
public class HUDHandlerBCTanks implements IWailaDataProvider {
|
||||
@@ -62,7 +62,7 @@ public class HUDHandlerBCTanks implements IWailaDataProvider {
|
||||
try{
|
||||
tank = ((FluidTankInfo[])BCModule.TileTank_getTankInfo.invoke(BCModule.TileTank.cast(accessor.getTileEntity()), ForgeDirection.UNKNOWN))[0];
|
||||
} catch (Exception e){
|
||||
Waila.log.log(Level.SEVERE, "[BC] Unhandled exception trying to access a tank for display !.\n" + String.valueOf(e));
|
||||
Waila.log.log(Level.ERROR, "[BC] Unhandled exception trying to access a tank for display !.\n" + String.valueOf(e));
|
||||
return null;
|
||||
}
|
||||
return tank;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package mcp.mobius.waila.addons.enderio;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
@@ -39,16 +39,16 @@ public class EnderIOModule {
|
||||
TileTesseract = Class.forName("crazypants.enderio.machine.hypercube.TileHyperCube");
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[EnderStorage] Class not found. " + e);
|
||||
Waila.log.log(Level.WARN, "[EnderStorage] Class not found. " + e);
|
||||
return;
|
||||
} catch (NoSuchMethodException e){
|
||||
Waila.log.log(Level.WARNING, "[EnderStorage] Method not found." + e);
|
||||
Waila.log.log(Level.WARN, "[EnderStorage] Method not found." + e);
|
||||
return;
|
||||
// } catch (NoSuchFieldException e){
|
||||
// mod_Waila.log.log(Level.WARNING, "[EnderStorage] Field not found." + e);
|
||||
// return;
|
||||
} catch (Exception e){
|
||||
Waila.log.log(Level.WARNING, "[EnderStorage] Unhandled exception." + e);
|
||||
Waila.log.log(Level.WARN, "[EnderStorage] Unhandled exception." + e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@ package mcp.mobius.waila.addons.enderstorage;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
@@ -37,16 +38,16 @@ public class EnderStorageModule {
|
||||
TileEnderTank = Class.forName("codechicken.enderstorage.storage.liquid.TileEnderTank");
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[EnderStorage] Class not found. " + e);
|
||||
Waila.log.log(Level.WARN, "[EnderStorage] Class not found. " + e);
|
||||
return;
|
||||
} catch (NoSuchMethodException e){
|
||||
Waila.log.log(Level.WARNING, "[EnderStorage] Method not found." + e);
|
||||
Waila.log.log(Level.WARN, "[EnderStorage] Method not found." + e);
|
||||
return;
|
||||
} catch (NoSuchFieldException e){
|
||||
Waila.log.log(Level.WARNING, "[EnderStorage] Field not found." + e);
|
||||
Waila.log.log(Level.WARN, "[EnderStorage] Field not found." + e);
|
||||
return;
|
||||
} catch (Exception e){
|
||||
Waila.log.log(Level.WARNING, "[EnderStorage] Unhandled exception." + e);
|
||||
Waila.log.log(Level.WARN, "[EnderStorage] Unhandled exception." + e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package mcp.mobius.waila.addons.etb;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
|
||||
@@ -63,16 +63,16 @@ public class ETBModule {
|
||||
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[Engineer Toolbox] Class not found. " + e);
|
||||
Waila.log.log(Level.WARN, "[Engineer Toolbox] Class not found. " + e);
|
||||
return;
|
||||
// } catch (NoSuchMethodException e){
|
||||
// mod_Waila.log.log(Level.WARNING, "[Engineer Toolbox] Method not found." + e);
|
||||
// Waila.log.log(Level.WARN, "[Engineer Toolbox] Method not found." + e);
|
||||
// return;
|
||||
} catch (NoSuchFieldException e){
|
||||
Waila.log.log(Level.WARNING, "[Engineer Toolbox] Field not found." + e);
|
||||
Waila.log.log(Level.WARN, "[Engineer Toolbox] Field not found." + e);
|
||||
return;
|
||||
} catch (Exception e){
|
||||
Waila.log.log(Level.WARNING, "[Engineer Toolbox] Unhandled exception." + e);
|
||||
Waila.log.log(Level.WARN, "[Engineer Toolbox] Unhandled exception." + e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package mcp.mobius.waila.addons.exu;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
@@ -24,7 +24,7 @@ public class ExtraUtilitiesModule {
|
||||
try{
|
||||
TileEntityDrum = Class.forName("extrautils.tileentity.TileEntityDrum");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[ExtraUtilities] Class not found. " + e);
|
||||
Waila.log.log(Level.WARN, "[ExtraUtilities] Class not found. " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package mcp.mobius.waila.addons.gravestone;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
@@ -22,7 +22,7 @@ public class GravestoneModule {
|
||||
try {
|
||||
BlockGraveStone = Class.forName("GraveStone.block.BlockGSGraveStone");
|
||||
} catch (ClassNotFoundException e) {
|
||||
Waila.log.log(Level.WARNING, "[GraveStone] Class not found. " + e);
|
||||
Waila.log.log(Level.WARN, "[GraveStone] Class not found. " + e);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package mcp.mobius.waila.addons.harvestcraft;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
@@ -21,7 +21,7 @@ public class HarvestcraftModule {
|
||||
try{
|
||||
TileEntityPamCrop = Class.forName("assets.pamharvestcraft.TileEntityPamCrop");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[PamHarvestCraft] Class not found. " + e);
|
||||
Waila.log.log(Level.WARN, "[PamHarvestCraft] Class not found. " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package mcp.mobius.waila.addons.magicalcrops;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
@@ -21,7 +21,7 @@ public class MagicalCropsModule {
|
||||
try{
|
||||
BlockMagicalCrops = Class.forName("magicalcrops.BlockMagicalCrops");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[MagicalCrops] Class not found. " + e);
|
||||
Waila.log.log(Level.WARN, "[MagicalCrops] Class not found. " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ public class HUDHandlerTank implements IWailaDataProvider {
|
||||
String name = currenttip.get(0);
|
||||
|
||||
try{
|
||||
name += String.format(" < %s >", fluid.getFluid().getLocalizedName());
|
||||
name += String.format(" < %s >", fluid.getFluid().getLocalizedName(fluid));
|
||||
} catch (NullPointerException f){
|
||||
name += " " + LangUtil.translateG("hud.msg.empty");
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package mcp.mobius.waila.addons.openblocks;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
@@ -22,7 +22,7 @@ public class OpenBlocksModule {
|
||||
try{
|
||||
TileEntityTank = Class.forName("openblocks.common.tileentity.TileEntityTank");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[OpenBlocks] Class not found. " + e);
|
||||
Waila.log.log(Level.WARN, "[OpenBlocks] Class not found. " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
package mcp.mobius.waila.addons.projectred;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.logging.Level;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public class HUDHandlerTank implements IWailaDataProvider {
|
||||
String name = currenttip.get(0);
|
||||
|
||||
try{
|
||||
name += String.format(" < %s >", fluid.getFluid().getLocalizedName());
|
||||
name += String.format(" < %s >", fluid.getFluid().getLocalizedName(fluid));
|
||||
} catch (NullPointerException f){
|
||||
name += " " + LangUtil.translateG("hud.msg.empty");
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package mcp.mobius.waila.addons.railcraft;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
@@ -28,10 +29,10 @@ public class RailcraftModule {
|
||||
//StandardTank = Class.forName("mods.railcraft.common.fluids.tanks.StandardTank");
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[Railcraft] Class not found. " + e);
|
||||
Waila.log.log(Level.WARN, "[Railcraft] Class not found. " + e);
|
||||
return;
|
||||
} catch (NoSuchMethodException e){
|
||||
Waila.log.log(Level.WARNING, "[Railcraft] Method not found." + e);
|
||||
Waila.log.log(Level.WARN, "[Railcraft] Method not found." + e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package mcp.mobius.waila.addons.statues;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
@@ -24,10 +25,10 @@ public class StatuesModule {
|
||||
TileEntityStatue = Class.forName("info.jbcs.minecraft.statues.TileEntityStatue");
|
||||
skinName = TileEntityStatue.getDeclaredField("skinName");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[Statues] Class not found. " + e);
|
||||
Waila.log.log(Level.WARN, "[Statues] Class not found. " + e);
|
||||
return;
|
||||
} catch (NoSuchFieldException e){
|
||||
Waila.log.log(Level.WARNING, "[Statues] Class not found. " + e);
|
||||
Waila.log.log(Level.WARN, "[Statues] Class not found. " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@ package mcp.mobius.waila.addons.thaumcraft;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
import mcp.mobius.waila.utils.WailaExceptionHandler;
|
||||
|
||||
public class ThaumcraftModule {
|
||||
|
||||
@@ -52,10 +52,10 @@ public class ThaumcraftModule {
|
||||
list_getAspects = AspectList.getDeclaredMethod("getAspects");
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[Thaumcraft] Class not found. " + e);
|
||||
Waila.log.log(Level.WARN, "[Thaumcraft] Class not found. " + e);
|
||||
return;
|
||||
} catch (Exception e){
|
||||
Waila.log.log(Level.WARNING, "[Thaumcraft] Unhandled exception." + e);
|
||||
Waila.log.log(Level.WARN, "[Thaumcraft] Unhandled exception." + e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ public class HUDHandlerTank implements IWailaDataProvider {
|
||||
String name = currenttip.get(0);
|
||||
|
||||
try{
|
||||
name += String.format(" < %s >", fluid.getFluid().getLocalizedName());
|
||||
name += String.format(" < %s >", fluid.getFluid().getLocalizedName(fluid));
|
||||
} catch (NullPointerException f){
|
||||
name += " " + LangUtil.translateG("hud.msg.empty");
|
||||
}
|
||||
|
||||
@@ -2,7 +2,8 @@ package mcp.mobius.waila.addons.thermalexpansion;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import mcp.mobius.waila.Waila;
|
||||
@@ -35,7 +36,7 @@ public class ThermalExpansionModule {
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", IEnergyHandler);
|
||||
|
||||
} catch (Exception e){
|
||||
Waila.log.log(Level.WARNING, "[Thermal Expansion] Error while loading Energy hooks." + e);
|
||||
Waila.log.log(Level.WARN, "[Thermal Expansion] Error while loading Energy hooks." + e);
|
||||
}
|
||||
|
||||
// XXX : We register the energy cell
|
||||
@@ -47,7 +48,7 @@ public class ThermalExpansionModule {
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileEnergyCell);
|
||||
|
||||
} catch (Exception e){
|
||||
Waila.log.log(Level.WARNING, "[Thermal Expansion] Error while loading Energy Cell hooks." + e);
|
||||
Waila.log.log(Level.WARN, "[Thermal Expansion] Error while loading Energy Cell hooks." + e);
|
||||
}
|
||||
|
||||
// XXX : We register the Tank interface
|
||||
@@ -65,7 +66,7 @@ public class ThermalExpansionModule {
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileTank);
|
||||
|
||||
} catch (Exception e){
|
||||
Waila.log.log(Level.WARNING, "[Thermal Expansion] Error while loading Tank hooks." + e);
|
||||
Waila.log.log(Level.WARN, "[Thermal Expansion] Error while loading Tank hooks." + e);
|
||||
}
|
||||
|
||||
// XXX : We register the Tesseract interface
|
||||
@@ -78,7 +79,7 @@ public class ThermalExpansionModule {
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileTesseract);
|
||||
|
||||
} catch (Exception e){
|
||||
Waila.log.log(Level.WARNING, "[Thermal Expansion] Error while loading Tesseract hooks." + e);
|
||||
Waila.log.log(Level.WARN, "[Thermal Expansion] Error while loading Tesseract hooks." + e);
|
||||
}
|
||||
|
||||
// XXX : We register the ISecureTile interface
|
||||
@@ -90,7 +91,7 @@ public class ThermalExpansionModule {
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", ISecureTile);
|
||||
|
||||
} catch (Exception e){
|
||||
Waila.log.log(Level.WARNING, "[Thermal Expansion] Error while loading ISecureTile hooks." + e);
|
||||
Waila.log.log(Level.WARN, "[Thermal Expansion] Error while loading ISecureTile hooks." + e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package mcp.mobius.waila.addons.twilightforest;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
@@ -26,7 +26,7 @@ public class TwilightForestModule {
|
||||
BlockTFPlant = Class.forName("twilightforest.block.BlockTFPlant");
|
||||
BlockTFSapling = Class.forName("twilightforest.block.BlockTFSapling");
|
||||
} catch (ClassNotFoundException e) {
|
||||
Waila.log.log(Level.WARNING, "[TwilightForestMod] Class not found. " + e);
|
||||
Waila.log.log(Level.WARN, "[TwilightForestMod] Class not found. " + e);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@ import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import au.com.bytecode.opencsv.CSVReader;
|
||||
import net.minecraft.block.Block;
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.IWailaBlockDecorator;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
@@ -339,7 +339,7 @@ public class ModuleRegistrar implements IWailaRegistrar {
|
||||
try{
|
||||
docData = this.readFileAsString(filename);
|
||||
} catch (IOException e){
|
||||
Waila.log.log(Level.WARNING, String.format("Error while accessing file %s : %s", filename, e));
|
||||
Waila.log.log(Level.WARN, String.format("Error while accessing file %s : %s", filename, e));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package mcp.mobius.waila.handlers;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -9,7 +9,6 @@ import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.IWailaBlockDecorator;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaFMPAccessor;
|
||||
import mcp.mobius.waila.api.IWailaFMPDecorator;
|
||||
import mcp.mobius.waila.api.impl.DataAccessorFMP;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
@@ -37,10 +36,10 @@ public class DecoratorFMP implements IWailaBlockDecorator {
|
||||
try{
|
||||
BlockMultipart = Class.forName("codechicken.multipart.BlockMultipart");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[FMP] Class not found. " + e);
|
||||
Waila.log.log(Level.WARN, "[FMP] Class not found. " + e);
|
||||
return;
|
||||
} catch (Exception e){
|
||||
Waila.log.log(Level.WARNING, "[FMP] Unhandled exception." + e);
|
||||
Waila.log.log(Level.WARN, "[FMP] Unhandled exception." + e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package mcp.mobius.waila.handlers;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -81,10 +82,10 @@ public class HUDHandlerFMP implements IWailaDataProvider {
|
||||
try{
|
||||
BlockMultipart = Class.forName("codechicken.multipart.BlockMultipart");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[FMP] Class not found. " + e);
|
||||
Waila.log.log(Level.WARN, "[FMP] Class not found. " + e);
|
||||
return;
|
||||
} catch (Exception e){
|
||||
Waila.log.log(Level.WARNING, "[FMP] Unhandled exception." + e);
|
||||
Waila.log.log(Level.WARN, "[FMP] Unhandled exception." + e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ public class ModNameFilter implements ISearchProvider{
|
||||
result &= pattern.matcher(ItemInfo.getSearchName(item)).find() || pattern.matcher(ModIdentification.nameFromStack(item).toLowerCase()).find();
|
||||
}
|
||||
} catch (Exception e){
|
||||
Waila.log.warning(String.format("Error while filtering items : %s : %s", e, e.getMessage()));
|
||||
Waila.log.warn(String.format("Error while filtering items : %s : %s", e, e.getMessage()));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -2,16 +2,12 @@ package mcp.mobius.waila.utils;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
|
||||
public class AccessHelper {
|
||||
@@ -25,15 +21,15 @@ public class AccessHelper {
|
||||
return field_;
|
||||
}
|
||||
catch (NoSuchFieldException e) {
|
||||
Waila.log.warning(String.format("== Field %s %s not found !\n", classname, fieldname));
|
||||
Waila.log.warn(String.format("== Field %s %s not found !\n", classname, fieldname));
|
||||
return null;
|
||||
}
|
||||
catch (SecurityException e) {
|
||||
Waila.log.warning(String.format("== Field %s %s security exception !\n", classname, fieldname));
|
||||
Waila.log.warn(String.format("== Field %s %s security exception !\n", classname, fieldname));
|
||||
return null;
|
||||
}
|
||||
catch (ClassNotFoundException e) {
|
||||
Waila.log.warning(String.format("== Class %s not found !\n", classname));
|
||||
Waila.log.warn(String.format("== Class %s not found !\n", classname));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -49,21 +45,21 @@ public class AccessHelper {
|
||||
return field_.get(instance);
|
||||
}
|
||||
catch (NoSuchFieldException e) {
|
||||
Waila.log.warning(String.format("== Field %s %s not found !\n", classname, fieldname));
|
||||
Waila.log.warn(String.format("== Field %s %s not found !\n", classname, fieldname));
|
||||
return null;
|
||||
}
|
||||
catch (SecurityException e) {
|
||||
Waila.log.warning(String.format("== Field %s %s security exception !\n", classname, fieldname));
|
||||
Waila.log.warn(String.format("== Field %s %s security exception !\n", classname, fieldname));
|
||||
return null;
|
||||
}
|
||||
catch (ClassNotFoundException e) {
|
||||
Waila.log.warning(String.format("== Class %s not found !\n", classname));
|
||||
Waila.log.warn(String.format("== Class %s not found !\n", classname));
|
||||
return null;
|
||||
} catch (IllegalArgumentException e) {
|
||||
Waila.log.warning(String.format("== %s\n", e));
|
||||
Waila.log.warn(String.format("== %s\n", e));
|
||||
return null;
|
||||
} catch (IllegalAccessException e) {
|
||||
Waila.log.warning(String.format("== %s\n", e));
|
||||
Waila.log.warn(String.format("== %s\n", e));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -85,7 +81,7 @@ public class AccessHelper {
|
||||
return (Block)field_.get(Block.class);
|
||||
} catch (Exception e) {
|
||||
System.out.printf("%s\n", e);
|
||||
Waila.log.warning(String.format("== ERROR GETTING BLOCK %s %s\n", classname, fieldname));
|
||||
Waila.log.warn(String.format("== ERROR GETTING BLOCK %s %s\n", classname, fieldname));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -96,7 +92,7 @@ public class AccessHelper {
|
||||
return (Item)field_.get(Item.class);
|
||||
} catch (Exception e) {
|
||||
System.out.printf("%s\n", e);
|
||||
Waila.log.warning(String.format("== ERROR GETTING ITEM %s %s\n", classname, fieldname));
|
||||
Waila.log.warn(String.format("== ERROR GETTING ITEM %s %s\n", classname, fieldname));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,8 @@ import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.HashSet;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import net.minecraft.nbt.CompressedStreamTools;
|
||||
@@ -13,10 +14,7 @@ import net.minecraft.nbt.NBTSizeTracker;
|
||||
import net.minecraft.nbt.NBTTagByte;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagInt;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.nbt.NBTTagLong;
|
||||
import net.minecraft.nbt.NBTTagShort;
|
||||
import net.minecraft.nbt.NBTTagString;
|
||||
|
||||
public class NBTUtil {
|
||||
|
||||
@@ -32,7 +30,7 @@ public class NBTUtil {
|
||||
return deepTag.getTag(i);
|
||||
}
|
||||
} else {
|
||||
Waila.log.log(Level.WARNING, "Leaf " + key + " not found.");
|
||||
Waila.log.log(Level.WARN, "Leaf " + key + " not found.");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,8 @@ package mcp.mobius.waila.utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
|
||||
@@ -17,11 +18,11 @@ public class WailaExceptionHandler {
|
||||
errs.add(className);
|
||||
|
||||
for (StackTraceElement elem : e.getStackTrace()){
|
||||
Waila.log.log(Level.WARNING, String.format("%s.%s:%s",elem.getClassName(), elem.getMethodName(), elem.getLineNumber()));
|
||||
Waila.log.log(Level.WARN, String.format("%s.%s:%s",elem.getClassName(), elem.getMethodName(), elem.getLineNumber()));
|
||||
if (elem.getClassName().contains("waila")) break;
|
||||
}
|
||||
|
||||
Waila.log.log(Level.WARNING, String.format("Catched unhandled exception : [%s] %s",className,e));
|
||||
Waila.log.log(Level.WARN, String.format("Catched unhandled exception : [%s] %s",className,e));
|
||||
}
|
||||
if (currenttip != null)
|
||||
currenttip.add("<ERROR>");
|
||||
|
||||
Reference in new issue
Block a user