aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTechnus <daniel112092@gmail.com>2017-12-16 20:42:37 +0100
committerTechnus <daniel112092@gmail.com>2017-12-16 20:42:37 +0100
commitd8eac975a1247ecd33e6a763c822d14d885d3bb3 (patch)
treed13dbff0077bda6a6ac926b8c2ac2883adfe955e /src
parent60cf1813b1cd0490b42793b6ccbf2eb86709f97f (diff)
downloadGT5-Unofficial-d8eac975a1247ecd33e6a763c822d14d885d3bb3.tar.gz
GT5-Unofficial-d8eac975a1247ecd33e6a763c822d14d885d3bb3.tar.bz2
GT5-Unofficial-d8eac975a1247ecd33e6a763c822d14d885d3bb3.zip
Lokks moear redbl
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/github/technus/tectech/Util.java17
-rw-r--r--src/main/java/com/github/technus/tectech/thing/item/ParametrizerMemoryCard.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Param.java8
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Param.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_ParamAdv.java4
5 files changed, 11 insertions, 26 deletions
diff --git a/src/main/java/com/github/technus/tectech/Util.java b/src/main/java/com/github/technus/tectech/Util.java
index b1b7135298..aa3f8eee1d 100644
--- a/src/main/java/com/github/technus/tectech/Util.java
+++ b/src/main/java/com/github/technus/tectech/Util.java
@@ -46,7 +46,7 @@ public class Util {
return result.toString();
}
- public static String intBitsToShortString0(int number) {
+ public static String intBitsToShortString(int number) {
StringBuilder result = new StringBuilder();
for (int i = 31; i >= 0; i--) {
@@ -61,21 +61,6 @@ public class Util {
return result.toString();
}
- public static String intBitsToShortString1(int number) {
- StringBuilder result = new StringBuilder();
-
- for (int i = 31; i >= 0; i--) {
- int mask = 1 << i;
- result.append((number & mask) != 0 ? ";" : ",");
-
- if (i % 8 == 0)
- result.append("|");
- }
- result.replace(result.length() - 1, result.length(), "");
-
- return result.toString();
- }
-
//Check Machine Structure based on string[][] (effectively char[][][]), ond offset of the controller
//This only checks for REGULAR BLOCKS!
public static boolean StructureChecker(String[][] structure,//0-9 casing, +- air no air, A... ignore 'A'-CHAR-1 blocks
diff --git a/src/main/java/com/github/technus/tectech/thing/item/ParametrizerMemoryCard.java b/src/main/java/com/github/technus/tectech/thing/item/ParametrizerMemoryCard.java
index d055997109..ce6d23ddbd 100644
--- a/src/main/java/com/github/technus/tectech/thing/item/ParametrizerMemoryCard.java
+++ b/src/main/java/com/github/technus/tectech/thing/item/ParametrizerMemoryCard.java
@@ -107,11 +107,11 @@ public class ParametrizerMemoryCard extends Item {
temp=tNBT.getInteger("value0i");
aList.add("Value 0|I: "+EnumChatFormatting.AQUA + temp);
aList.add("Value 0|F: "+EnumChatFormatting.AQUA + Float.intBitsToFloat(temp));
- aList.add("Value 0|B: "+EnumChatFormatting.AQUA + Util.intBitsToShortString0(temp));
+ aList.add("Value 0|B: "+EnumChatFormatting.AQUA + Util.intBitsToShortString(temp));
temp=tNBT.getInteger("value1i");
aList.add("Value 1|I: "+EnumChatFormatting.AQUA + temp);
aList.add("Value 1|F: "+EnumChatFormatting.AQUA + Float.intBitsToFloat(temp));
- aList.add("Value 1|B: "+EnumChatFormatting.AQUA + Util.intBitsToShortString1(temp));
+ aList.add("Value 1|B: "+EnumChatFormatting.AQUA + Util.intBitsToShortString(temp));
aList.add("Uses Floats: "+(tNBT.getBoolean("usesFloats")?EnumChatFormatting.GREEN+"TRUE":EnumChatFormatting.RED+"FALSE"));
}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Param.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Param.java
index 214c7c754d..6f79722ea6 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Param.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Param.java
@@ -104,13 +104,13 @@ public class GT_MetaTileEntity_Hatch_Param extends GT_MetaTileEntity_Hatch {
return new String[]{
"Parametrizer ID: " + EnumChatFormatting.GREEN + param,
"Value 0I: " + EnumChatFormatting.AQUA + value0i,
- "Value 0FB: " + EnumChatFormatting.AQUA + Float.intBitsToFloat(value0i)+" "+ Util.intBitsToShortString0(value0i),
+ "Value 0FB: " + EnumChatFormatting.AQUA + Float.intBitsToFloat(value0i)+" "+ Util.intBitsToShortString(value0i),
"Value 1I: " + EnumChatFormatting.BLUE + value1i,
- "Value 1FB: " + EnumChatFormatting.BLUE + Float.intBitsToFloat(value1i)+" "+ Util.intBitsToShortString1(value1i),
+ "Value 1FB: " + EnumChatFormatting.BLUE + Float.intBitsToFloat(value1i)+" "+ Util.intBitsToShortString(value1i),
"Input 0I: " + EnumChatFormatting.GOLD + input0i,
- "Input 0FB: " + EnumChatFormatting.GOLD + Float.intBitsToFloat(input0i)+" "+ Util.intBitsToShortString0(input0i),
+ "Input 0FB: " + EnumChatFormatting.GOLD + Float.intBitsToFloat(input0i)+" "+ Util.intBitsToShortString(input0i),
"Input 1I: " + EnumChatFormatting.YELLOW + input1i,
- "Input 1FB: " + EnumChatFormatting.YELLOW + Float.intBitsToFloat(input1i)+" "+ Util.intBitsToShortString1(input1i),
+ "Input 1FB: " + EnumChatFormatting.YELLOW + Float.intBitsToFloat(input1i)+" "+ Util.intBitsToShortString(input1i),
};
return new String[]{
"Parametrizer ID: " + EnumChatFormatting.GREEN + param,
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Param.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Param.java
index 87111a9108..4a7d25c95a 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Param.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Param.java
@@ -23,8 +23,8 @@ public class GT_GUIContainer_Param extends GT_GUIContainerMetaTile_Machine {
proxy.renderUnicodeString("\u2460\u2b07" + String.format(locale, "%+d", ((GT_Container_Param) this.mContainer).input1f), 46, 24, 167, 0x00ffff);
proxy.renderUnicodeString("\u24EA\u2b06" + String.format(locale, "%+d", ((GT_Container_Param) this.mContainer).value0f), 46, 33, 167, 0x00bbff);
proxy.renderUnicodeString("\u2460\u2b06" + String.format(locale, "%+d", ((GT_Container_Param) this.mContainer).value1f), 46, 41, 167, 0x0077ff);
- proxy.renderUnicodeString("\u24EA\u2b06" + Util.intBitsToShortString0(((GT_Container_Param) this.mContainer).value0f), 46, 50, 167, 0x00bbff);
- proxy.renderUnicodeString("\u2460\u2b06" + Util.intBitsToShortString1(((GT_Container_Param) this.mContainer).value1f), 46, 58, 167, 0x0077ff);
+ proxy.renderUnicodeString("\u24EA\u2b06" + Util.intBitsToShortString(((GT_Container_Param) this.mContainer).value0f), 46, 50, 167, 0x00bbff);
+ proxy.renderUnicodeString("\u2460\u2b06" + Util.intBitsToShortString(((GT_Container_Param) this.mContainer).value1f), 46, 58, 167, 0x0077ff);
} else {
proxy.renderUnicodeString("Parameters", 46, 7, 167, 0xffffff);
}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_ParamAdv.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_ParamAdv.java
index 8f146f5ed2..8e34664919 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_ParamAdv.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_ParamAdv.java
@@ -30,8 +30,8 @@ public class GT_GUIContainer_ParamAdv extends GT_GUIContainerMetaTile_Machine {
proxy.renderUnicodeString("\u24EA\u2b06" + String.format(locale, "%+d", ((GT_Container_ParamAdv) this.mContainer).value0f), 46, 33, 167, 0x00bbff);
proxy.renderUnicodeString("\u2460\u2b06" + String.format(locale, "%+d", ((GT_Container_ParamAdv) this.mContainer).value1f), 46, 41, 167, 0x0077ff);
}
- proxy.renderUnicodeString("\u24EA\u2b06" + Util.intBitsToShortString0(((GT_Container_ParamAdv) this.mContainer).value0f), 46, 50, 167, 0x00bbff);
- proxy.renderUnicodeString("\u2460\u2b06" + Util.intBitsToShortString1(((GT_Container_ParamAdv) this.mContainer).value1f), 46, 58, 167, 0x0077ff);
+ proxy.renderUnicodeString("\u24EA\u2b06" + Util.intBitsToShortString(((GT_Container_ParamAdv) this.mContainer).value0f), 46, 50, 167, 0x00bbff);
+ proxy.renderUnicodeString("\u2460\u2b06" + Util.intBitsToShortString(((GT_Container_ParamAdv) this.mContainer).value1f), 46, 58, 167, 0x0077ff);
proxy.renderUnicodeString("Pointer " + Integer.toHexString(((GT_Container_ParamAdv) this.mContainer).pointer | 0x10000).substring(1), 46, 66, 167, 0x0033ff);
} else {
proxy.renderUnicodeString("Parameters X", 46, 7, 167, 0xffffff);