aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/gregtech/loaders
diff options
context:
space:
mode:
authorAlexdoru <57050655+Alexdoru@users.noreply.github.com>2024-09-07 05:40:03 +0200
committerGitHub <noreply@github.com>2024-09-07 03:40:03 +0000
commit82604eadb847335e4b4ddf2e90a28b325786837b (patch)
treeb5c34fa3ab38181fc47ec20c8537a5db34e285e1 /src/main/java/gtPlusPlus/xmod/gregtech/loaders
parentba7a419aacf0b0eb33afbde5663640a0908b77ce (diff)
downloadGT5-Unofficial-82604eadb847335e4b4ddf2e90a28b325786837b.tar.gz
GT5-Unofficial-82604eadb847335e4b4ddf2e90a28b325786837b.tar.bz2
GT5-Unofficial-82604eadb847335e4b4ddf2e90a28b325786837b.zip
Remove a bunch more reflection (#3074)
Co-authored-by: boubou19 <miisterunknown@gmail.com>
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/loaders')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGenFluidCanning.java9
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGenRecycling.java13
2 files changed, 3 insertions, 19 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGenFluidCanning.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGenFluidCanning.java
index c9f627c0d5..a334fd7de4 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGenFluidCanning.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGenFluidCanning.java
@@ -13,7 +13,6 @@ import gtPlusPlus.api.interfaces.RunnableWithInfo;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.GTPPCore;
import gtPlusPlus.core.util.minecraft.ItemUtils;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
public class RecipeGenFluidCanning implements Runnable {
@@ -206,13 +205,7 @@ public class RecipeGenFluidCanning implements Runnable {
}
private void dumpStack() {
- int parents = 2;
- for (int i = 0; i < 6; i++) {
- Logger.INFO(
- (disableOptional ? "EXTRACTING" : "CANNING") + " DEBUG | "
- + (i == 0 ? "Called from: " : "Parent: ")
- + ReflectionUtils.getMethodName(i + parents));
- }
+ Logger.modLogger.info((disableOptional ? "EXTRACTING" : "CANNING") + " DEBUG ", new Exception());
}
private int getMapSize(RecipeMap<?> aMap) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGenRecycling.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGenRecycling.java
index 8fe051dd71..305422ccea 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGenRecycling.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGenRecycling.java
@@ -28,7 +28,6 @@ import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.material.state.MaterialState;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
public class RecipeGenRecycling implements Runnable {
@@ -252,11 +251,7 @@ public class RecipeGenRecycling implements Runnable {
public static ItemStack get(final Object aName, final ItemStack aReplacement, final long aAmount,
final boolean aMentionPossibleTypos, final boolean aNoInvalidAmounts) {
if (aNoInvalidAmounts && (aAmount < 1L)) {
- Logger.WARNING("Returning Null. Method: " + ReflectionUtils.getMethodName(0));
- Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(1));
- Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(2));
- Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(3));
- Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(4));
+ Logger.modLogger.warn("Returning Null. Method: ", new Exception());
return null;
}
if (!mNameMap.containsKey(aName.toString()) && aMentionPossibleTypos) {
@@ -269,11 +264,7 @@ public class RecipeGenRecycling implements Runnable {
public static ItemStack getFirstOre(final Object aName, final long aAmount) {
if (GTUtility.isStringInvalid(aName)) {
- Logger.WARNING("Returning Null. Method: " + ReflectionUtils.getMethodName(0));
- Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(1));
- Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(2));
- Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(3));
- Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(4));
+ Logger.modLogger.warn("Returning Null. Method: ", new Exception());
return null;
}
final ItemStack tStack = mNameMap.get(aName.toString());