diff options
| author | Alexdoru <57050655+Alexdoru@users.noreply.github.com> | 2024-09-07 05:40:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-07 03:40:03 +0000 |
| commit | 82604eadb847335e4b4ddf2e90a28b325786837b (patch) | |
| tree | b5c34fa3ab38181fc47ec20c8537a5db34e285e1 /src/main/java/gtPlusPlus/core/lib | |
| parent | ba7a419aacf0b0eb33afbde5663640a0908b77ce (diff) | |
| download | GT5-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/core/lib')
| -rw-r--r-- | src/main/java/gtPlusPlus/core/lib/GTPPCore.java | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/src/main/java/gtPlusPlus/core/lib/GTPPCore.java b/src/main/java/gtPlusPlus/core/lib/GTPPCore.java index c78d734cb6..af6bedfa61 100644 --- a/src/main/java/gtPlusPlus/core/lib/GTPPCore.java +++ b/src/main/java/gtPlusPlus/core/lib/GTPPCore.java @@ -6,23 +6,17 @@ import java.util.List; import java.util.Map; import java.util.Random; import java.util.UUID; -import java.util.WeakHashMap; import java.util.concurrent.ConcurrentHashMap; import java.util.function.Supplier; -import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.util.StatCollector; -import net.minecraft.world.World; - -import com.mojang.authlib.GameProfile; import cpw.mods.fml.common.FMLCommonHandler; import gregtech.GT_Version; import gregtech.api.objects.XSTR; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.util.reflect.ReflectionUtils; import gtPlusPlus.preloader.PreloaderCore; import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; import gtPlusPlus.xmod.gregtech.common.tileentities.automation.MTETesseractGenerator; @@ -30,8 +24,6 @@ import gtPlusPlus.xmod.gregtech.common.tileentities.automation.MTETesseractTermi public class GTPPCore { - public static Map PlayerCache; - // Math Related public static final float PI = (float) Math.PI; public static volatile Random RANDOM = new XSTR(); @@ -48,11 +40,6 @@ public class GTPPCore { public static int turbineCutoffBase = 75000; - // GT++ Fake Player Profile - public static final GameProfile gameProfile = new GameProfile( - UUID.nameUUIDFromBytes("gtplusplus.core".getBytes()), - "[GT++]"); - public static final WeakHashMap<World, EntityPlayerMP> fakePlayerCache = new WeakHashMap<>(); // Tooltips; public static final Supplier<String> GT_Tooltip = () -> StatCollector.translateToLocal("GTPP.core.GT_Tooltip"); public static final Supplier<String> GT_Tooltip_Builder = () -> StatCollector @@ -202,34 +189,19 @@ public class GTPPCore { public static final String VERSION = GT_Version.VERSION; } - public static final void crash() { + public static void crash() { crash("Generic Crash"); } - public static final void crash(String aReason) { + public static void crash(String aReason) { try { Logger.INFO("=========================================================="); Logger.INFO("[GT++ CRASH]"); Logger.INFO("=========================================================="); Logger.INFO("Oooops..."); - Logger.INFO("This should only happy in a development environment or when something really bad happens."); + Logger.INFO("This should only happen in a development environment or when something really bad happens."); Logger.INFO("Reason: " + aReason); Logger.INFO("=========================================================="); - Logger.INFO("Called from: " + ReflectionUtils.getMethodName(1)); - Logger.INFO(ReflectionUtils.getMethodName(2)); - Logger.INFO(ReflectionUtils.getMethodName(3)); - Logger.INFO(ReflectionUtils.getMethodName(4)); - Logger.INFO(ReflectionUtils.getMethodName(5)); - Logger.INFO(ReflectionUtils.getMethodName(6)); - Logger.INFO(ReflectionUtils.getMethodName(7)); - Logger.INFO(ReflectionUtils.getMethodName(8)); - Logger.INFO(ReflectionUtils.getMethodName(9)); - Logger.INFO(ReflectionUtils.getMethodName(10)); - Logger.INFO(ReflectionUtils.getMethodName(11)); - Logger.INFO(ReflectionUtils.getMethodName(12)); - Logger.INFO(ReflectionUtils.getMethodName(13)); - Logger.INFO(ReflectionUtils.getMethodName(14)); - Logger.INFO(ReflectionUtils.getMethodName(15)); } catch (Throwable t) { t.printStackTrace(); } |
