Fixed up logger, added needed overlays

This commit is contained in:
Aidan C. Brady 2014-06-03 08:46:03 +02:00
parent 9a16625585
commit b365494f2e
46 changed files with 108 additions and 95 deletions

View file

@ -64,7 +64,7 @@ public final class ItemRetriever
return null;
}
} catch(Exception e) {
System.err.println("[Mekanism] Error retrieving item with identifier '" + identifier + "': " + e.getMessage());
System.err.println("Error retrieving item with identifier '" + identifier + "': " + e.getMessage());
return null;
}
}

View file

@ -26,7 +26,7 @@ public final class RecipeHelper
Method m = recipeClass.getMethod("addEnrichmentChamberRecipe", ItemStack.class, ItemStack.class);
m.invoke(null, input, output);
} catch(Exception e) {
System.err.println("[Mekanism] Error while adding recipe: " + e.getMessage());
System.err.println("Error while adding recipe: " + e.getMessage());
}
}
@ -42,7 +42,7 @@ public final class RecipeHelper
Method m = recipeClass.getMethod("addOsmiumCompressorRecipe", ItemStack.class, ItemStack.class);
m.invoke(null, input, output);
} catch(Exception e) {
System.err.println("[Mekanism] Error while adding recipe: " + e.getMessage());
System.err.println("Error while adding recipe: " + e.getMessage());
}
}
@ -58,7 +58,7 @@ public final class RecipeHelper
Method m = recipeClass.getMethod("addCombinerRecipe", ItemStack.class, ItemStack.class);
m.invoke(null, input, output);
} catch(Exception e) {
System.err.println("[Mekanism] Error while adding recipe: " + e.getMessage());
System.err.println("Error while adding recipe: " + e.getMessage());
}
}
@ -74,7 +74,7 @@ public final class RecipeHelper
Method m = recipeClass.getMethod("addCrusherRecipe", ItemStack.class, ItemStack.class);
m.invoke(null, input, output);
} catch(Exception e) {
System.err.println("[Mekanism] Error while adding recipe: " + e.getMessage());
System.err.println("Error while adding recipe: " + e.getMessage());
}
}
@ -90,7 +90,7 @@ public final class RecipeHelper
Method m = recipeClass.getMethod("addPurificationChamberRecipe", ItemStack.class, ItemStack.class);
m.invoke(null, input, output);
} catch(Exception e) {
System.err.println("[Mekanism] Error while adding recipe: " + e.getMessage());
System.err.println("Error while adding recipe: " + e.getMessage());
}
}
@ -106,7 +106,7 @@ public final class RecipeHelper
Method m = recipeClass.getMethod("addChemicalOxidizerRecipe", ItemStack.class, GasStack.class);
m.invoke(null, input, output);
} catch(Exception e) {
System.err.println("[Mekanism] Error while adding recipe: " + e.getMessage());
System.err.println("Error while adding recipe: " + e.getMessage());
}
}
@ -122,7 +122,7 @@ public final class RecipeHelper
Method m = recipeClass.getMethod("addChemicalInfuserRecipe", ChemicalPair.class, GasStack.class);
m.invoke(null, input, output);
} catch(Exception e) {
System.err.println("[Mekanism] Error while adding recipe: " + e.getMessage());
System.err.println("Error while adding recipe: " + e.getMessage());
}
}
@ -138,7 +138,7 @@ public final class RecipeHelper
Method m = recipeClass.getMethod("addPrecisionSawmillRecipe", ItemStack.class, ChanceOutput.class);
m.invoke(null, input, output);
} catch(Exception e) {
System.err.println("[Mekanism] Error while adding recipe: " + e.getMessage());
System.err.println("Error while adding recipe: " + e.getMessage());
}
}
@ -154,7 +154,7 @@ public final class RecipeHelper
Method m = recipeClass.getMethod("addChemicalInjectionChamberRecipe", AdvancedInput.class, ItemStack.class);
m.invoke(null, input, output);
} catch(Exception e) {
System.err.println("[Mekanism] Error while adding recipe: " + e.getMessage());
System.err.println("Error while adding recipe: " + e.getMessage());
}
}
@ -170,7 +170,7 @@ public final class RecipeHelper
Method m = recipeClass.getMethod("addElectrolyticSeparatorRecipe", FluidStack.class, ChemicalPair.class);
m.invoke(null, input, output);
} catch(Exception e) {
System.err.println("[Mekanism] Error while adding recipe: " + e.getMessage());
System.err.println("Error while adding recipe: " + e.getMessage());
}
}
@ -186,7 +186,7 @@ public final class RecipeHelper
Method m = recipeClass.getMethod("addChemicalDissolutionChamberRecipe", ItemStack.class, GasStack.class);
m.invoke(null, input, output);
} catch(Exception e) {
System.err.println("[Mekanism] Error while adding recipe: " + e.getMessage());
System.err.println("Error while adding recipe: " + e.getMessage());
}
}
@ -202,7 +202,7 @@ public final class RecipeHelper
Method m = recipeClass.getMethod("addChemicalWasherRecipe", GasStack.class, GasStack.class);
m.invoke(null, input, output);
} catch(Exception e) {
System.err.println("[Mekanism] Error while adding recipe: " + e.getMessage());
System.err.println("Error while adding recipe: " + e.getMessage());
}
}
@ -218,7 +218,7 @@ public final class RecipeHelper
Method m = recipeClass.getMethod("addChemicalCrystallizerRecipe", GasStack.class, ItemStack.class);
m.invoke(null, input, output);
} catch(Exception e) {
System.err.println("[Mekanism] Error while adding recipe: " + e.getMessage());
System.err.println("Error while adding recipe: " + e.getMessage());
}
}
@ -234,7 +234,7 @@ public final class RecipeHelper
Method m = recipeClass.getMethod("addMetallurgicInfuserRecipe", InfusionInput.class, ItemStack.class);
m.invoke(null, input, output);
} catch(Exception e) {
System.err.println("[Mekanism] Error while adding recipe: " + e.getMessage());
System.err.println("Error while adding recipe: " + e.getMessage());
}
}
}

View file

@ -35,7 +35,7 @@ public final class TabProxy
return preferred;
} catch(Exception e) {
System.err.println("[Mekanism] Error retrieving Mekanism creative tab.");
System.err.println("Error retrieving Mekanism creative tab.");
return preferred;
}
}

View file

@ -351,7 +351,7 @@ public class ClientProxy extends CommonProxy
RenderingRegistry.registerBlockHandler(new MachineRenderingHandler());
RenderingRegistry.registerBlockHandler(new BasicRenderingHandler());
System.out.println("[Mekanism] Render registrations complete.");
Mekanism.logger.info("Render registrations complete.");
}
@Override

View file

@ -5,6 +5,7 @@ import java.util.Calendar;
import java.util.List;
import mekanism.api.EnumColor;
import mekanism.common.Mekanism;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ChatComponentText;
@ -25,7 +26,7 @@ public final class HolidayManager
holidays.add(new NewYear());
}
System.out.println("[Mekanism] Initialized HolidayManager.");
Mekanism.logger.info("Initialized HolidayManager.");
}
public static void check()

View file

@ -64,6 +64,6 @@ public class MekanismClient extends Mekanism
Mekanism.proxy.loadConfiguration();
System.out.println("[Mekanism] Reloaded config.");
Mekanism.logger.info("Reloaded config.");
}
}

View file

@ -89,13 +89,13 @@ public class ThreadClientUpdate extends Thread
hasUpdated = true;
GuiCredits.updateInfo("Update installed, reboot Minecraft for changes.");
System.out.println("[Mekanism] Successfully updated to latest version (" + Mekanism.latestVersionNumber + ").");
Mekanism.logger.info("Successfully updated to latest version (" + Mekanism.latestVersionNumber + ").");
finalize();
} catch(Throwable t) {
GuiCredits.updateInfo(EnumColor.DARK_RED + "Error updating.");
hasUpdated = true;
System.err.println("[Mekanism] Error while finishing update thread: " + t.getMessage());
Mekanism.logger.error("Error while finishing update thread: " + t.getMessage());
t.printStackTrace();
}
}
@ -196,7 +196,7 @@ public class ThreadClientUpdate extends Thread
}
}
System.out.println("[Mekanism] Preparing to update...");
Mekanism.logger.info("Preparing to update...");
}
private static URL createURL()

View file

@ -4,6 +4,7 @@ import java.net.URL;
import mekanism.api.Pos3D;
import mekanism.client.MekanismClient;
import mekanism.common.Mekanism;
import net.minecraft.client.Minecraft;
import net.minecraft.world.World;
@ -47,7 +48,7 @@ public abstract class Sound
if(url == null)
{
System.out.println("[Mekanism] Invalid sound file: " + sound);
Mekanism.logger.error("Invalid sound file: " + sound);
}
if(SoundHandler.getSoundSystem() != null)

View file

@ -58,7 +58,7 @@ public class SoundHandler
{
MinecraftForge.EVENT_BUS.register(this);
System.out.println("[Mekanism] Successfully set up SoundHandler.");
Mekanism.logger.info("Successfully set up SoundHandler.");
}
public void preloadSounds()
@ -82,7 +82,7 @@ public class SoundHandler
preloadSound(s);
}
System.out.println("[Mekanism] Preloaded " + listings.size() + " object sounds.");
Mekanism.logger.info("Preloaded " + listings.size() + " object sounds.");
/*listings = listFiles(corePath.replace("%20", " ").replace(".jar!", ".jar").replace("file:", ""), "assets/mekanism/sounds/etc");
@ -96,7 +96,7 @@ public class SoundHandler
mc.sndManager.addSound("mekanism:etc/" + s);
}
System.out.println("[Mekanism] Initialized " + listings.size() + " sound effects.");*/
Mekanism.logger.info("Initialized " + listings.size() + " sound effects.");*/
if(MekanismClient.holidays)
{
@ -315,7 +315,7 @@ public class SoundHandler
if(url == null)
{
System.out.println("[Mekanism] Invalid sound file: " + soundPath);
Mekanism.logger.info("Invalid sound file: " + soundPath);
}
String s = getSoundSystem().quickPlay(false, url, soundPath, false, object.xCoord, object.yCoord, object.zCoord, 0, 16F);

View file

@ -38,7 +38,7 @@ public class VoiceClient extends Thread
@Override
public void run()
{
System.out.println("[Mekanism] VoiceServer: Starting client connection...");
Mekanism.logger.info("VoiceServer: Starting client connection...");
try {
socket = new Socket(ip, Mekanism.VOICE_PORT);
@ -50,18 +50,18 @@ public class VoiceClient extends Thread
(outputThread = new VoiceOutput(this)).start();
(inputThread = new VoiceInput(this)).start();
System.out.println("[Mekanism] VoiceServer: Successfully connected to server.");
Mekanism.logger.info("VoiceServer: Successfully connected to server.");
} catch(ConnectException e) {
System.err.println("[Mekanism] VoiceServer: Server's VoiceServer is disabled.");
Mekanism.logger.error("VoiceServer: Server's VoiceServer is disabled.");
} catch(Exception e) {
System.err.println("[Mekanism] VoiceServer: Error while starting client connection.");
Mekanism.logger.error("VoiceServer: Error while starting client connection.");
e.printStackTrace();
}
}
public void disconnect()
{
System.out.println("[Mekanism] VoiceServer: Stopping client connection...");
Mekanism.logger.info("VoiceServer: Stopping client connection...");
try {
try {
@ -97,7 +97,7 @@ public class VoiceClient extends Thread
running = false;
} catch(Exception e) {
System.err.println("[Mekanism] VoiceServer: Error while stopping client connection.");
Mekanism.logger.error("VoiceServer: Error while stopping client connection.");
e.printStackTrace();
}
}

View file

@ -6,6 +6,7 @@ import javax.sound.sampled.DataLine;
import javax.sound.sampled.TargetDataLine;
import mekanism.client.MekanismKeyHandler;
import mekanism.common.Mekanism;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -81,7 +82,7 @@ public class VoiceInput extends Thread
audioInput.close();
} catch(Exception e) {
System.err.println("[Mekanism] VoiceServer: Error while running client input thread.");
Mekanism.logger.error("VoiceServer: Error while running client input thread.");
e.printStackTrace();
}
}

View file

@ -4,6 +4,7 @@ import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.SourceDataLine;
import mekanism.common.Mekanism;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -44,7 +45,7 @@ public class VoiceOutput extends Thread
} catch(Exception e) {}
}
} catch(Exception e) {
System.err.println("[Mekanism] VoiceServer: Error while running client output thread.");
Mekanism.logger.error("VoiceServer: Error while running client output thread.");
e.printStackTrace();
}
}

View file

@ -68,7 +68,7 @@ public final class BoxBlacklistParser
if(split.length != 2 || !isInteger(split[0]) || !isInteger(split[1]))
{
System.err.println("[Mekanism] BoxBlacklist.txt: Couldn't parse blacklist data on line " + line);
Mekanism.logger.error("BoxBlacklist.txt: Couldn't parse blacklist data on line " + line);
}
MekanismAPI.addBoxBlacklist(Block.getBlockFromName(split[0]), Integer.parseInt(split[1]));
@ -77,7 +77,7 @@ public final class BoxBlacklistParser
reader.close();
System.out.println("[Mekanism] Finished loading Cardboard Box blacklist (loaded " + entries + " entries)");
Mekanism.logger.info("Finished loading Cardboard Box blacklist (loaded " + entries + " entries)");
}
private static void writeExamples() throws IOException

View file

@ -417,6 +417,6 @@ public class CommonProxy
MekanismAPI.addBoxBlacklist(Blocks.mob_spawner, 0);
}
System.out.println("[Mekanism] Received config from server.");
Mekanism.logger.info("Received config from server.");
}
}

View file

@ -161,7 +161,7 @@ public class Mekanism
public static final PacketPipeline packetPipeline = new PacketPipeline();
/** Mekanism logger instance */
public static Logger logger = LogManager.getLogger("");
public static Logger logger = LogManager.getLogger("Mekanism");
/** Mekanism proxy instance */
@SidedProxy(clientSide = "mekanism.client.ClientProxy", serverSide = "mekanism.common.CommonProxy")
@ -1278,7 +1278,7 @@ public class Mekanism
NetworkRegistry.INSTANCE.registerGuiHandler(this, new CoreGuiHandler());
//Initialization notification
logger.info("[Mekanism] Version " + versionNumber + " initializing...");
logger.info("Version " + versionNumber + " initializing...");
//Get data from server.
new ThreadGetData();

View file

@ -29,7 +29,7 @@ public class PacketHandler //implements IPacketHandler
if(packets.get(packetIndex) == null)
{
System.err.println("[Mekanism] Received unknown packet identifier '" + packetIndex + ".' Ignorning!");
Mekanism.logger.error("Received unknown packet identifier '" + packetIndex + ".' Ignorning!");
return;
}
@ -37,18 +37,18 @@ public class PacketHandler //implements IPacketHandler
if(packetType == null)
{
System.err.println("[Mekanism] Unable to create instance of packet type '" + packetIndex + ".' Ignoring!");
Mekanism.logger.error("Unable to create instance of packet type '" + packetIndex + ".' Ignoring!");
return;
}
try {
packetType.read(dataStream, entityplayer, entityplayer.worldObj);
} catch(Exception e) {
System.err.println("[Mekanism] Error while reading '" + packetType.getName() + "' packet.");
Mekanism.logger.error("Error while reading '" + packetType.getName() + "' packet.");
e.printStackTrace();
}
} catch(Exception e) {
System.err.println("[Mekanism] Error while handling packet.");
Mekanism.logger.error("Error while handling packet.");
e.printStackTrace();
}
}
@ -121,7 +121,7 @@ public class PacketHandler //implements IPacketHandler
}
}
} catch(Exception e) {
System.err.println("[Mekanism] Error while encoding packet data.");
Mekanism.logger.error("Error while encoding packet data.");
e.printStackTrace();
}
}
@ -147,13 +147,13 @@ public class PacketHandler //implements IPacketHandler
{
if(packetType == null)
{
System.err.println("[Mekanism] Attempted to send null packet, ignoring!");
Mekanism.logger.error("Attempted to send null packet, ignoring!");
return;
}
if(!packets.contains(packetType.getClass()))
{
System.err.println("[Mekanism] Attempted to send unregistered packet '" + packetType.getName() + ",' ignoring!");
Mekanism.logger.error("Attempted to send unregistered packet '" + packetType.getName() + ",' ignoring!");
return;
}
@ -164,7 +164,7 @@ public class PacketHandler //implements IPacketHandler
data.writeInt(packets.indexOf(packetType.getClass()));
packetType.write(data);
} catch(Exception e) {
System.err.println("[Mekanism] Error while encoding packet data.");
Mekanism.logger.error("Error while encoding packet data.");
e.printStackTrace();
}
@ -209,19 +209,19 @@ public class PacketHandler //implements IPacketHandler
switch(trans)
{
case SERVER:
System.out.println("[Mekanism] Sent '" + packetType.getName() + "' packet to server.");
Mekanism.logger.info("Sent '" + packetType.getName() + "' packet to server.");
break;
case ALL_CLIENTS:
System.out.println("[Mekanism] Sent '" + packetType.getName() + "' packet to all clients.");
Mekanism.logger.info("Sent '" + packetType.getName() + "' packet to all clients.");
break;
case CLIENTS_RANGE:
System.out.println("[Mekanism] Sent '" + packetType.getName() + "' packet to clients in a " + (Double)transParams[1] + " block range.");
Mekanism.logger.info("Sent '" + packetType.getName() + "' packet to clients in a " + (Double)transParams[1] + " block range.");
break;
case CLIENTS_DIM:
System.out.println("[Mekanism] Sent '" + packetType.getName() + "' packet to clients in dimension ID " + (Integer)transParams[0] + ".");
Mekanism.logger.info("Sent '" + packetType.getName() + "' packet to clients in dimension ID " + (Integer)transParams[0] + ".");
break;
case SINGLE_CLIENT:
System.out.println("[Mekanism] Sent '" + packetType.getName() + "' packet to " + ((EntityPlayer)transParams[0]).username);
Mekanism.logger.info("Sent '" + packetType.getName() + "' packet to " + ((EntityPlayer)transParams[0]).username);
break;
}
}

View file

@ -38,7 +38,7 @@ public final class Tier
}
}
System.out.println("[Mekanism] Invalid tier identifier when retrieving with name.");
Mekanism.logger.error("Invalid tier identifier when retrieving with name.");
return BASIC;
}
@ -76,7 +76,7 @@ public final class Tier
}
}
System.out.println("[Mekanism] Invalid tier identifier when retrieving with name.");
Mekanism.logger.error("Invalid tier identifier when retrieving with name.");
return BASIC;
}

View file

@ -1195,7 +1195,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
try {
return tileEntityClass.newInstance();
} catch(Exception e) {
System.err.println("[Mekanism] Unable to indirectly create tile entity.");
Mekanism.logger.error("Unable to indirectly create tile entity.");
e.printStackTrace();
return null;
}

View file

@ -8,6 +8,8 @@ import java.util.Enumeration;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import mekanism.common.Mekanism;
public class ClassEnumerator
{
private static Class<?> loadClass(String className)
@ -106,7 +108,7 @@ public class ClassEnumerator
processDir(new File(resource.getPath()), pkgname, classes);
}
} catch(Exception e) {
System.err.println("[Mekanism] Error while loading classes in package " + pkg);
Mekanism.logger.error("Error while loading classes in package " + pkg);
e.printStackTrace();
}

View file

@ -113,7 +113,7 @@ public final class MekanismHooks
Recipes.matterAmplifier.addRecipe(new RecipeInputItemStack(new ItemStack(Mekanism.EnrichedAlloy), 1), tag);
System.out.println("[Mekanism] Hooked into IC2 successfully.");
Mekanism.logger.info("Hooked into IC2 successfully.");
}
if(BasicComponentsLoaded)
@ -130,12 +130,12 @@ public final class MekanismHooks
MekanismUtils.removeRecipes(getBasicComponentsItem("itemBronzeIngot"));
}
System.out.println("[Mekanism] Hooked into BasicComponents successfully.");
Mekanism.logger.info("Hooked into BasicComponents successfully.");
}
if(BuildCraftLoaded)
{
System.out.println("[Mekanism] Hooked into BuildCraft successfully.");
Mekanism.logger.info("Hooked into BuildCraft successfully.");
}
if(CCLoaded)
@ -177,7 +177,7 @@ public final class MekanismHooks
throw new Exception("not instanceof ItemStack");
}
} catch(Exception e) {
System.out.println("[Mekanism] Unable to retrieve BuildCraft item " + name + ".");
Mekanism.logger.error("Unable to retrieve BuildCraft item " + name + ".");
return null;
}
}
@ -201,7 +201,7 @@ public final class MekanismHooks
throw new Exception("not instanceof ItemStack");
}
} catch(Exception e) {
System.out.println("[Mekanism] Unable to retrieve Basic Components item " + name + ".");
Mekanism.logger.error("Unable to retrieve Basic Components item " + name + ".");
return null;
}
}

View file

@ -4,6 +4,7 @@ import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import mekanism.api.ItemInfo;
import mekanism.api.MekanismAPI;
import mekanism.common.Mekanism;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
@ -33,7 +34,7 @@ public class PacketBoxBlacklist extends MekanismPacket
MekanismAPI.addBoxBlacklist(Block.getBlockById(dataStream.readInt()), dataStream.readInt());
}
System.out.println("[Mekanism] Received Cardboard Box blacklist entries from server (" + amount + " total)");
Mekanism.logger.info("Received Cardboard Box blacklist entries from server (" + amount + " total)");
}
@Override

View file

@ -183,7 +183,7 @@ public class PacketElectricChest extends MekanismPacket
}
}
} catch(Exception e) {
System.err.println("[Mekanism] Error while handling electric chest open packet.");
Mekanism.logger.error("Error while handling electric chest open packet.");
e.printStackTrace();
}
}
@ -207,7 +207,7 @@ public class PacketElectricChest extends MekanismPacket
Mekanism.proxy.openElectricChest(player, type, id, block, x, y, z);
} catch(Exception e) {
System.err.println("[Mekanism] Error while handling electric chest open packet.");
Mekanism.logger.error("Error while handling electric chest open packet.");
e.printStackTrace();
}
}
@ -237,7 +237,7 @@ public class PacketElectricChest extends MekanismPacket
}
}
} catch(Exception e) {
System.err.println("[Mekanism] Error while handling electric chest password packet.");
Mekanism.logger.error("Error while handling electric chest password packet.");
e.printStackTrace();
}
}
@ -265,7 +265,7 @@ public class PacketElectricChest extends MekanismPacket
}
}
} catch(Exception e) {
System.err.println("[Mekanism] Error while handling electric chest password packet.");
Mekanism.logger.error("Error while handling electric chest password packet.");
e.printStackTrace();
}
}

View file

@ -139,7 +139,7 @@ public class PacketPipeline extends MessageToMessageCodec<FMLProxyPacket, Mekani
// Method to call from FMLInitializationEvent
public void initialize()
{
channels = NetworkRegistry.INSTANCE.newChannel("Mekanism", this);
channels = NetworkRegistry.INSTANCE.newChannel("MEK", this);
registerPackets();
}

View file

@ -382,7 +382,7 @@ public abstract class TileEntityAdvancedElectricMachine extends TileEntityBasicM
case 7:
return new Object[] {(MekanismUtils.getMaxEnergy(getEnergyMultiplier(), getMaxEnergy())-getEnergy())};
default:
System.err.println("[Mekanism] Attempted to call unknown method with computer ID " + computer.getID());
Mekanism.logger.error("Attempted to call unknown method with computer ID " + computer.getID());
return new Object[] {"Unknown command."};
}
}

View file

@ -201,7 +201,7 @@ public abstract class TileEntityElectricMachine extends TileEntityBasicMachine
case 6:
return new Object[] {getMaxEnergy()-getEnergy()};
default:
System.err.println("[Mekanism] Attempted to call unknown method with computer ID " + computer.getID());
Mekanism.logger.error("Attempted to call unknown method with computer ID " + computer.getID());
return new Object[] {"Unknown command."};
}
}

View file

@ -536,7 +536,7 @@ public class TileEntityElectrolyticSeparator extends TileEntityElectricBlock imp
case 9:
return new Object[] {rightTank.getNeeded()};
default:
System.err.println("[Mekanism] Attempted to call unknown method with computer ID " + computer.getID());
Mekanism.logger.error("Attempted to call unknown method with computer ID " + computer.getID());
return new Object[] {"Unknown command."};
}
}

View file

@ -173,7 +173,7 @@ public class TileEntityEnergyCube extends TileEntityElectricBlock implements IPe
case 3:
return new Object[] {(getMaxEnergy()-getEnergy())};
default:
System.err.println("[Mekanism] Attempted to call unknown method with computer ID " + computer.getID());
Mekanism.logger.error("Attempted to call unknown method with computer ID " + computer.getID());
return null;
}
}

View file

@ -733,7 +733,7 @@ public class TileEntityFactory extends TileEntityElectricBlock implements IPerip
case 5:
return new Object[] {getMaxEnergy()-getEnergy()};
default:
System.err.println("[Mekanism] Attempted to call unknown method with computer ID " + computer.getID());
Mekanism.logger.error("Attempted to call unknown method with computer ID " + computer.getID());
return new Object[] {"Unknown command."};
}
}

View file

@ -467,7 +467,7 @@ public class TileEntityMetallurgicInfuser extends TileEntityElectricBlock implem
case 7:
return new Object[] {MAX_INFUSE-infuseStored};
default:
System.err.println("[Mekanism] Attempted to call unknown method with computer ID " + computer.getID());
Mekanism.logger.error("Attempted to call unknown method with computer ID " + computer.getID());
return new Object[] {"Unknown command."};
}
}

View file

@ -573,7 +573,7 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IPe
return new Object[] {"No digit found."};
}
default:
System.err.println("[Mekanism] Attempted to call unknown method with computer ID " + computer.getID());
Mekanism.logger.error("Attempted to call unknown method with computer ID " + computer.getID());
return new Object[] {"Unknown command."};
}
}

View file

@ -127,7 +127,7 @@ public final class MekanismUtils
}
}
else {
System.out.println("[Mekanism] Minecraft is in offline mode, could not check for updates.");
Mekanism.logger.info("Minecraft is in offline mode, could not check for updates.");
}
}
} catch(Exception e) {}
@ -196,7 +196,7 @@ public final class MekanismUtils
} catch(Exception e) {
result.clear();
result.add("null");
System.err.println("[Mekanism] An error occured while connecting to URL '" + urlToRead + ".'");
Mekanism.logger.error("An error occured while connecting to URL '" + urlToRead + ".'");
}
return result;

View file

@ -78,16 +78,16 @@ public class VoiceConnection extends Thread
if(username == null)
{
System.out.println("[Mekanism] VoiceServer: Unable to trace connection's IP address.");
Mekanism.logger.error("VoiceServer: Unable to trace connection's IP address.");
kill();
return;
}
else {
System.out.println("[Mekanism] VoiceServer: Traced IP in " + retryCount + " attempts.");
Mekanism.logger.info("VoiceServer: Traced IP in " + retryCount + " attempts.");
}
}
} catch(Exception e) {
System.err.println("[Mekanism] VoiceServer: Error while starting server-based connection.");
Mekanism.logger.error("VoiceServer: Error while starting server-based connection.");
e.printStackTrace();
open = false;
}
@ -131,7 +131,7 @@ public class VoiceConnection extends Thread
Mekanism.voiceManager.connections.remove(this);
} catch(Exception e) {
System.err.println("[Mekanism] VoiceServer: Error while stopping server-based connection.");
Mekanism.logger.error("VoiceServer: Error while stopping server-based connection.");
e.printStackTrace();
}
}
@ -149,7 +149,7 @@ public class VoiceConnection extends Thread
output.flush();
} catch(Exception e) {
System.err.println("[Mekanism] VoiceServer: Error while sending data to player.");
Mekanism.logger.error("VoiceServer: Error while sending data to player.");
e.printStackTrace();
}
}

View file

@ -22,7 +22,7 @@ public class VoiceServerManager
public void start()
{
System.out.println("[Mekanism] VoiceServer: Starting up server...");
Mekanism.logger.info("VoiceServer: Starting up server...");
try {
running = true;
@ -34,7 +34,7 @@ public class VoiceServerManager
public void stop()
{
try {
System.out.println("[Mekanism] VoiceServer: Shutting down server...");
Mekanism.logger.info("VoiceServer: Shutting down server...");
try {
listenThread.interrupt();
@ -47,7 +47,7 @@ public class VoiceServerManager
serverSocket = null;
} catch(Exception e) {}
} catch(Exception e) {
System.err.println("[Mekanism] VoiceServer: Error while shutting down server.");
Mekanism.logger.error("VoiceServer: Error while shutting down server.");
e.printStackTrace();
}
@ -98,11 +98,11 @@ public class VoiceServerManager
connection.start();
connections.add(connection);
System.out.println("[Mekanism] VoiceServer: Accepted new connection.");
Mekanism.logger.info("VoiceServer: Accepted new connection.");
} catch(SocketException e) {
} catch(NullPointerException e) {
} catch(Exception e) {
System.err.println("[Mekanism] VoiceServer: Error while accepting connection.");
Mekanism.logger.error("VoiceServer: Error while accepting connection.");
e.printStackTrace();
}
}

View file

@ -70,6 +70,7 @@ public class GeneratorsClientProxy extends GeneratorsCommonProxy
case 5:
return new GuiWindTurbine(player.inventory, (TileEntityWindTurbine)tileEntity);
}
return null;
}
}

View file

@ -96,7 +96,7 @@ public class MekanismGenerators implements IModule
addRecipes();
//Finalization
Mekanism.logger.info("[MekanismGenerators] Loaded module.");
Mekanism.logger.info("Loaded MekanismGenerators module.");
}
public void addRecipes()

View file

@ -562,7 +562,7 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds
try {
return tileEntityClass.newInstance();
} catch(Exception e) {
System.err.println("[Mekanism] Unable to indirectly create tile entity.");
Mekanism.logger.error("Unable to indirectly create tile entity.");
e.printStackTrace();
return null;
}

View file

@ -249,7 +249,7 @@ public class TileEntityBioGenerator extends TileEntityGenerator implements IFlui
case 5:
return new Object[] {bioFuelSlot.MAX_FLUID-bioFuelSlot.fluidStored};
default:
System.err.println("[Mekanism] Attempted to call unknown method with computer ID " + computer.getID());
Mekanism.logger.error("Attempted to call unknown method with computer ID " + computer.getID());
return null;
}
}

View file

@ -4,6 +4,7 @@ import io.netty.buffer.ByteBuf;
import java.util.ArrayList;
import mekanism.common.Mekanism;
import mekanism.common.util.ChargeUtils;
import mekanism.common.util.MekanismUtils;
import mekanism.generators.common.MekanismGenerators;
@ -277,7 +278,7 @@ public class TileEntityHeatGenerator extends TileEntityGenerator implements IFlu
case 5:
return new Object[] {lavaTank.getCapacity()-(lavaTank.getFluid() != null ? lavaTank.getFluid().amount : 0)};
default:
System.err.println("[Mekanism] Attempted to call unknown method with computer ID " + computer.getID());
Mekanism.logger.error("Attempted to call unknown method with computer ID " + computer.getID());
return null;
}
}

View file

@ -174,7 +174,7 @@ public class TileEntityHydrogenGenerator extends TileEntityGenerator implements
case 5:
return new Object[] {fuelTank.getNeeded()};
default:
System.err.println("[Mekanism] Attempted to call unknown method with computer ID " + computer.getID());
Mekanism.logger.error("Attempted to call unknown method with computer ID " + computer.getID());
return null;
}
}

View file

@ -5,6 +5,7 @@ import io.netty.buffer.ByteBuf;
import java.util.ArrayList;
import java.util.EnumSet;
import mekanism.common.Mekanism;
import mekanism.common.util.ChargeUtils;
import mekanism.common.util.MekanismUtils;
import mekanism.generators.common.MekanismGenerators;
@ -161,7 +162,7 @@ public class TileEntitySolarGenerator extends TileEntityGenerator
case 4:
return new Object[] {seesSun};
default:
System.err.println("[Mekanism] Attempted to call unknown method with computer ID " + computer.getID());
Mekanism.logger.error("Attempted to call unknown method with computer ID " + computer.getID());
return null;
}
}

View file

@ -2,6 +2,7 @@ package mekanism.generators.common.tile;
import mekanism.api.Coord4D;
import mekanism.common.IBoundingBlock;
import mekanism.common.Mekanism;
import mekanism.common.util.ChargeUtils;
import mekanism.common.util.MekanismUtils;
import mekanism.generators.common.MekanismGenerators;
@ -74,7 +75,7 @@ public class TileEntityWindTurbine extends TileEntityGenerator implements IBound
case 4:
return new Object[] {getMultiplier()};
default:
System.err.println("[Mekanism] Attempted to call unknown method with computer ID " + computer.getID());
Mekanism.logger.error("Attempted to call unknown method with computer ID " + computer.getID());
return null;
}
}

View file

@ -156,7 +156,7 @@ public class MekanismTools implements IModule
addRecipes();
//Finalization
Mekanism.logger.info("[MekanismTools] Loaded module.");
Mekanism.logger.info("Loaded MekanismTools module.");
}
public void addRecipes()

View file

@ -469,6 +469,8 @@ color.red=Red
color.pink=Pink
color.yellow=Yellow
color.white=White
color.brown=Brown
color.brightPink=Bright Pink
//Dyes
dye.black=Black

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB