aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/bartworks
diff options
context:
space:
mode:
authorJason Mitchell <mitchej@gmail.com>2023-01-28 19:32:44 -0800
committerJason Mitchell <mitchej@gmail.com>2023-01-28 19:32:44 -0800
commit55f64675b42ac8d3c557cc850f78664bee006f6f (patch)
tree2afd26dd3d5e6f763119bc192b57c66a1a075922 /src/main/java/gtPlusPlus/xmod/bartworks
parent0f5dfd01b877b6a1019e0671b88d07974aae68c0 (diff)
downloadGT5-Unofficial-55f64675b42ac8d3c557cc850f78664bee006f6f.tar.gz
GT5-Unofficial-55f64675b42ac8d3c557cc850f78664bee006f6f.tar.bz2
GT5-Unofficial-55f64675b42ac8d3c557cc850f78664bee006f6f.zip
[ci skip] spotlessApply with the new settings
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/bartworks')
-rw-r--r--src/main/java/gtPlusPlus/xmod/bartworks/BW_Utils.java29
1 files changed, 16 insertions, 13 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/bartworks/BW_Utils.java b/src/main/java/gtPlusPlus/xmod/bartworks/BW_Utils.java
index dba2976758..fabcc2b6c8 100644
--- a/src/main/java/gtPlusPlus/xmod/bartworks/BW_Utils.java
+++ b/src/main/java/gtPlusPlus/xmod/bartworks/BW_Utils.java
@@ -1,14 +1,16 @@
package gtPlusPlus.xmod.bartworks;
-import gregtech.api.enums.OrePrefixes;
-import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Map;
+
import net.minecraft.item.ItemStack;
+import gregtech.api.enums.OrePrefixes;
+import gtPlusPlus.core.lib.LoadedMods;
+import gtPlusPlus.core.util.reflect.ReflectionUtils;
+
public class BW_Utils {
private static final Method sName;
@@ -21,16 +23,16 @@ public class BW_Utils {
static {
sName = ReflectionUtils.getMethod(Enum.class, "name");
- sClassBW_NonMeta_MaterialItems =
- ReflectionUtils.getClass("com.github.bartimaeusnek.bartworks.system.material.BW_NonMeta_MaterialItems");
+ sClassBW_NonMeta_MaterialItems = ReflectionUtils
+ .getClass("com.github.bartimaeusnek.bartworks.system.material.BW_NonMeta_MaterialItems");
sGet = ReflectionUtils.getMethod(sClassBW_NonMeta_MaterialItems, "get", long.class, Object[].class);
Werkstoff = ReflectionUtils.getClass("com.github.bartimaeusnek.bartworks.system.material.Werkstoff");
- WerkstoffLoader =
- ReflectionUtils.getClass("com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader");
+ WerkstoffLoader = ReflectionUtils
+ .getClass("com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader");
Field fieldWerkstoffHashMap = ReflectionUtils.getField(Werkstoff, "werkstoffHashMap");
werkstoffHashMap = ReflectionUtils.getFieldValue(fieldWerkstoffHashMap);
- getCorrespondingItemStackUnsafe = ReflectionUtils.getMethod(
- WerkstoffLoader, "getCorrespondingItemStackUnsafe", OrePrefixes.class, Werkstoff, int.class);
+ getCorrespondingItemStackUnsafe = ReflectionUtils
+ .getMethod(WerkstoffLoader, "getCorrespondingItemStackUnsafe", OrePrefixes.class, Werkstoff, int.class);
}
public enum NonMeta_MaterialItem {
@@ -49,9 +51,8 @@ public class BW_Utils {
for (Object obj : sClassBW_NonMeta_MaterialItems.getEnumConstants()) {
try {
if (aItem.name().equals(ReflectionUtils.invokeNonBool(obj, sName, new Object[] {}))) {
- return ((ItemStack) ReflectionUtils.invokeNonBool(
- obj, sGet, new Object[] {aAmount, new Object[] {}}))
- .copy();
+ return ((ItemStack) ReflectionUtils
+ .invokeNonBool(obj, sGet, new Object[] { aAmount, new Object[] {} })).copy();
}
} catch (Throwable t) {
t.printStackTrace();
@@ -76,7 +77,9 @@ public class BW_Utils {
Object werkstoff = werkstoffHashMap.get(werkstoffID);
if (werkstoff != null) {
return (ItemStack) ReflectionUtils.invokeNonBool(
- null, getCorrespondingItemStackUnsafe, new Object[] {orePrefixes, werkstoff, amount});
+ null,
+ getCorrespondingItemStackUnsafe,
+ new Object[] { orePrefixes, werkstoff, amount });
}
}
}