aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/util
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-10-20 01:45:23 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-10-20 01:45:23 +1000
commitd53b08982a6d2be3cc0be4552520bfc500576f6f (patch)
tree00de3163f71981d8f2e928376dc000bdd459e683 /src/Java/gtPlusPlus/core/util
parent216da6223ec197c293d92a965b24a2c391a8b999 (diff)
downloadGT5-Unofficial-d53b08982a6d2be3cc0be4552520bfc500576f6f.tar.gz
GT5-Unofficial-d53b08982a6d2be3cc0be4552520bfc500576f6f.tar.bz2
GT5-Unofficial-d53b08982a6d2be3cc0be4552520bfc500576f6f.zip
+ Added a faster vent texture.
+ Slowed down the other vent texture to half speed. + Added code to allow the usage of the new custom textures. + Added some debug messages for furnace recipes. % Cleaned up the NetworkUtils class and added a nice internet availability check. $ Fixed an issue where Geothermal generators did not implement pollution values for GT 5.09. % Changed the textures on the Rocket Engine Generators, for hopefully the last time. % Cleaned up dual fuel code for Rocket Engine Generators. ^ Bumped the build version to 1.4.9-dev
Diffstat (limited to 'src/Java/gtPlusPlus/core/util')
-rw-r--r--src/Java/gtPlusPlus/core/util/gregtech/recipehandlers/GregtechRecipe.java2
-rw-r--r--src/Java/gtPlusPlus/core/util/networking/NetworkUtils.java63
2 files changed, 35 insertions, 30 deletions
diff --git a/src/Java/gtPlusPlus/core/util/gregtech/recipehandlers/GregtechRecipe.java b/src/Java/gtPlusPlus/core/util/gregtech/recipehandlers/GregtechRecipe.java
index d1857ffefc..b10e643831 100644
--- a/src/Java/gtPlusPlus/core/util/gregtech/recipehandlers/GregtechRecipe.java
+++ b/src/Java/gtPlusPlus/core/util/gregtech/recipehandlers/GregtechRecipe.java
@@ -28,7 +28,7 @@ public final class GregtechRecipe {
}
public boolean addSmeltingAndAlloySmeltingRecipe(ItemStack aInput, ItemStack aOutput) {
- Utils.LOG_INFO("Adding a GT Furnace/Alloy Smelter Recipe");
+ Utils.LOG_WARNING("Adding a GT Furnace/Alloy Smelter Recipe"+"| Input:"+aInput.getDisplayName()+" | Output:"+aOutput.getDisplayName()+" |");
return ourProxy.addSmeltingAndAlloySmeltingRecipe(aInput, aOutput);
}
diff --git a/src/Java/gtPlusPlus/core/util/networking/NetworkUtils.java b/src/Java/gtPlusPlus/core/util/networking/NetworkUtils.java
index 9e7e033bed..bcfce5a71b 100644
--- a/src/Java/gtPlusPlus/core/util/networking/NetworkUtils.java
+++ b/src/Java/gtPlusPlus/core/util/networking/NetworkUtils.java
@@ -10,36 +10,41 @@ import java.net.URLConnection;
public class NetworkUtils {
public static String getContentFromURL(String args) {
-
- URL url;
-
- try {
- // get URL content
- url = new URL(args);
- URLConnection conn = url.openConnection();
-
- // open the stream and put it into BufferedReader
- BufferedReader br = new BufferedReader(
- new InputStreamReader(conn.getInputStream()));
-
- String inputLine;
- String tempLine = null;
-
-
-
-
- while ((inputLine = br.readLine()) != null) {
- tempLine = inputLine;
+ if (netIsAvailable()){
+ try {
+ URL url;
+ // get URL content
+ url = new URL(args);
+ URLConnection conn = url.openConnection();
+ // open the stream and put it into BufferedReader
+ BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
+ String inputLine;
+ String tempLine = null;
+ while ((inputLine = br.readLine()) != null) {
+ tempLine = inputLine;
+ }
+ br.close();
+ return tempLine;
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
}
-
- br.close();
- return tempLine;
- } catch (MalformedURLException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
+ }
return null;
}
-
+
+ private static boolean netIsAvailable() {
+ try {
+ final URL url = new URL("http://www.google.com");
+ final URLConnection conn = url.openConnection();
+ conn.connect();
+ return true;
+ } catch (MalformedURLException e) {
+ throw new RuntimeException(e);
+ } catch (IOException e) {
+ return false;
+ }
+ }
+
}