aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/enums
diff options
context:
space:
mode:
authorAlexdoru <57050655+Alexdoru@users.noreply.github.com>2024-09-21 01:38:28 +0200
committerGitHub <noreply@github.com>2024-09-21 01:38:28 +0200
commitc10272e0e358a233ed0ce7d591e9e43ca7ffa26c (patch)
treea097f2307d43a5c3d77a698b3c01eae801d35c6c /src/main/java/gregtech/api/enums
parente567c18792be9fe623ec777b40f3cbc36572b78e (diff)
downloadGT5-Unofficial-c10272e0e358a233ed0ce7d591e9e43ca7ffa26c.tar.gz
GT5-Unofficial-c10272e0e358a233ed0ce7d591e9e43ca7ffa26c.tar.bz2
GT5-Unofficial-c10272e0e358a233ed0ce7d591e9e43ca7ffa26c.zip
Delete more reflection (#3233)
Diffstat (limited to 'src/main/java/gregtech/api/enums')
-rw-r--r--src/main/java/gregtech/api/enums/TAE.java34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/main/java/gregtech/api/enums/TAE.java b/src/main/java/gregtech/api/enums/TAE.java
index 48a39da036..edc0e5123c 100644
--- a/src/main/java/gregtech/api/enums/TAE.java
+++ b/src/main/java/gregtech/api/enums/TAE.java
@@ -1,6 +1,5 @@
package gregtech.api.enums;
-import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.HashSet;
@@ -8,7 +7,6 @@ import gregtech.api.interfaces.ITexture;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.GTPPCore;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.xmod.gregtech.api.objects.GTPPCopiedBlockTexture;
public class TAE {
@@ -77,38 +75,6 @@ public class TAE {
Logger.INFO("Finalised TAE.");
}
- private static boolean registerTextures(GTPPCopiedBlockTexture GTPPCopiedBlockTexture) {
- try {
- // Handle page 2.
- Logger.INFO("[TAE} Registering Texture, Last used casing ID is " + gtPPLastUsedIndex + ".");
- if (gtPPLastUsedIndex >= 128) {
- Field x = ReflectionUtils.getField(Textures.BlockIcons.class, "casingTexturePages");
- if (x != null) {
- ITexture[][] h = (ITexture[][]) x.get(null);
- if (h != null) {
- h[64][secondaryIndex++] = GTPPCopiedBlockTexture;
- x.set(null, h);
- Logger
- .INFO("[TAE} Registered Texture with ID " + (secondaryIndex - 1) + " in secondary index.");
- return true;
- }
- }
- }
-
- // set to page 1.
- else {
- Textures.BlockIcons.setCasingTextureForId(gtPPLastUsedIndex, GTPPCopiedBlockTexture);
- Logger.INFO("[TAE} Registered Texture with ID " + (gtPPLastUsedIndex) + " in main index.");
- gtPPLastUsedIndex++;
- return true;
- }
- } catch (Throwable t) {
- t.printStackTrace();
- }
- Logger.INFO("[TAE} Failed to register texture, Last used casing ID is " + gtPPLastUsedIndex + ".");
- return false;
- }
-
public static ITexture getTexture(int index) {
if (gtPPLastUsedIndex >= 128) {
return Textures.BlockIcons.getCasingTextureForId(((64 * 128) + index));