aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/util/GTUtility.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/api/util/GTUtility.java')
-rw-r--r--src/main/java/gregtech/api/util/GTUtility.java42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/main/java/gregtech/api/util/GTUtility.java b/src/main/java/gregtech/api/util/GTUtility.java
index 3294b0523d..bb31b86ef0 100644
--- a/src/main/java/gregtech/api/util/GTUtility.java
+++ b/src/main/java/gregtech/api/util/GTUtility.java
@@ -1643,7 +1643,7 @@ public class GTUtility {
/**
* Move up to maxAmount amount of fluid from source to dest, with optional filtering via allowMove. note that this
* filter cannot bypass filtering done by IFluidHandlers themselves.
- *
+ * <p>
* this overload will assume the fill side is the opposite of drainSide
*
* @param source tank to drain from. method become noop if this is null
@@ -1892,7 +1892,7 @@ public class GTUtility {
tmp = aFluid.getFluid()
.getID();
} catch (Exception e) {
- System.err.println(e);
+ e.printStackTrace();
}
ItemStack rStack = ItemList.Display_Fluid.getWithDamage(1, tmp);
NBTTagCompound tNBT = new NBTTagCompound();
@@ -2903,7 +2903,7 @@ public class GTUtility {
ItemStack rStack = copy(aStack);
if (isStackInvalid(rStack)) return null;
else if (aAmount < 0) aAmount = 0;
- rStack.stackSize = (int) aAmount;
+ rStack.stackSize = aAmount;
return rStack;
}
@@ -3344,7 +3344,7 @@ public class GTUtility {
EnumChatFormatting.GOLD + GTUtility.trans("166", "Is valid Beacon Pyramid Material")
+ EnumChatFormatting.RESET);
} catch (Throwable e) {
- tList.add(String.format("§cAn exception was thrown while fetching this block's info.§r"));
+ tList.add("§cAn exception was thrown while fetching this block's info.§r");
if (D1) e.printStackTrace(GTLog.err);
}
}
@@ -3373,7 +3373,7 @@ public class GTUtility {
}
}
} catch (Throwable e) {
- tList.add(String.format("§cAn exception was thrown while fetching this tile's fluid tank info.§r"));
+ tList.add("§cAn exception was thrown while fetching this tile's fluid tank info.§r");
if (D1) e.printStackTrace(GTLog.err);
}
return rEUAmount;
@@ -3389,7 +3389,7 @@ public class GTUtility {
if (temp != null) tList.addAll(temp);
}
} catch (Throwable e) {
- tList.add(String.format("§cAn exception was thrown while fetching this block's debug info.§r"));
+ tList.add("§cAn exception was thrown while fetching this block's debug info.§r");
if (D1) e.printStackTrace(GTLog.err);
}
return rEUAmount;
@@ -3444,7 +3444,7 @@ public class GTUtility {
}
}
} catch (Throwable e) {
- tList.add(String.format("§cAn exception was thrown while fetching this leaves' info.§r"));
+ tList.add("§cAn exception was thrown while fetching this leaves' info.§r");
if (D1) e.printStackTrace(GTLog.err);
}
return rEUAmount;
@@ -3496,7 +3496,7 @@ public class GTUtility {
}
}
} catch (Throwable e) {
- tList.add(String.format("§cAn exception was thrown while fetching this crop's info.§r"));
+ tList.add("§cAn exception was thrown while fetching this crop's info.§r");
if (D1) e.printStackTrace(GTLog.err);
}
return rEUAmount;
@@ -3508,7 +3508,7 @@ public class GTUtility {
tList.addAll(Arrays.asList(info.getInfoData()));
}
} catch (Throwable e) {
- tList.add(String.format("§cAn exception was thrown while fetching this device's info.§r"));
+ tList.add("§cAn exception was thrown while fetching this device's info.§r");
if (D1) e.printStackTrace(GTLog.err);
}
}
@@ -3522,7 +3522,7 @@ public class GTUtility {
+ EnumChatFormatting.RESET);
}
} catch (Throwable e) {
- tList.add(String.format("§cAn exception was thrown while fetching this device's owner.§r"));
+ tList.add("§cAn exception was thrown while fetching this device's owner.§r");
if (D1) e.printStackTrace(GTLog.err);
}
}
@@ -3565,7 +3565,7 @@ public class GTUtility {
+ " EU");
}
} catch (Throwable e) {
- tList.add(String.format("§cAn exception was thrown while fetching this device's energy info.§r"));
+ tList.add("§cAn exception was thrown while fetching this device's energy info.§r");
if (D1) e.printStackTrace(GTLog.err);
}
}
@@ -3580,7 +3580,7 @@ public class GTUtility {
if (tString != null && !tString.equals(E)) tList.add(tString);
}
} catch (Throwable e) {
- tList.add(String.format("§cAn exception was thrown while fetching this device's covers.§r"));
+ tList.add("§cAn exception was thrown while fetching this device's covers.§r");
if (D1) e.printStackTrace(GTLog.err);
}
return rEUAmount;
@@ -3612,7 +3612,7 @@ public class GTUtility {
+ EnumChatFormatting.RESET);
}
} catch (Throwable e) {
- tList.add(String.format("§cAn exception was thrown while fetching this device's progress.§r"));
+ tList.add("§cAn exception was thrown while fetching this device's progress.§r");
if (D1) e.printStackTrace(GTLog.err);
}
return rEUAmount;
@@ -3628,7 +3628,7 @@ public class GTUtility {
+ EnumChatFormatting.RESET);
}
} catch (Throwable e) {
- tList.add(String.format("§cAn exception was thrown while fetching this device's upgrades.§r"));
+ tList.add("§cAn exception was thrown while fetching this device's upgrades.§r");
if (D1) e.printStackTrace(GTLog.err);
}
return rEUAmount;
@@ -3650,7 +3650,7 @@ public class GTUtility {
+ " EU");
}
} catch (Throwable e) {
- tList.add(String.format("§cAn exception was thrown while fetching this device's IC2 energy info.§r"));
+ tList.add("§cAn exception was thrown while fetching this device's IC2 energy info.§r");
if (D1) e.printStackTrace(GTLog.err);
}
return rEUAmount;
@@ -3667,7 +3667,7 @@ public class GTUtility {
+ EnumChatFormatting.RESET);
}
} catch (Throwable e) {
- tList.add(String.format("§cAn exception was thrown while fetching this device's EU conduction info.§r"));
+ tList.add("§cAn exception was thrown while fetching this device's EU conduction info.§r");
if (D1) e.printStackTrace(GTLog.err);
}
return rEUAmount;
@@ -3695,7 +3695,7 @@ public class GTUtility {
+ EnumChatFormatting.RESET);
}
} catch (Throwable e) {
- tList.add(String.format("§cAn exception was thrown while fetching this device's IC@ wrenchability.§r"));
+ tList.add("§cAn exception was thrown while fetching this device's IC@ wrenchability.§r");
if (D1) e.printStackTrace(GTLog.err);
}
return rEUAmount;
@@ -3715,7 +3715,7 @@ public class GTUtility {
}
}
} catch (Throwable e) {
- tList.add(String.format("§cAn exception was thrown while fetching this device's alignment info.§r"));
+ tList.add("§cAn exception was thrown while fetching this device's alignment info.§r");
if (D1) e.printStackTrace(GTLog.err);
}
return rEUAmount;
@@ -3740,7 +3740,7 @@ public class GTUtility {
+ EnumChatFormatting.RESET);
}
} catch (Throwable e) {
- tList.add(String.format("§cAn exception was thrown while fetching this reactor's info.§r"));
+ tList.add("§cAn exception was thrown while fetching this reactor's info.§r");
if (D1) e.printStackTrace(GTLog.err);
}
return rEUAmount;
@@ -4266,14 +4266,14 @@ public class GTUtility {
tPageText.append((tPageText.length() == 0) ? "" : aListDelimiter)
.append(list[i]);
- if (tPageText.length() > 0) {
+ if (tPageText.length() != 0) {
String tPageCounter = tTotalPages > 1 ? String.format(aPageFormatter, tPage + 1, tTotalPages) : "";
NBTTagString tPageTag = new NBTTagString(String.format(aPageHeader, tPageCounter) + tPageText);
aBook.appendTag(tPageTag);
}
++tPage;
- } while (tPageText.length() > 0);
+ } while (tPageText.length() != 0);
}
public static void addEnchantment(ItemStack aStack, Enchantment aEnchantment, int aLevel) {