aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api
diff options
context:
space:
mode:
authorAlexdoru <57050655+Alexdoru@users.noreply.github.com>2024-09-05 01:11:15 +0200
committerGitHub <noreply@github.com>2024-09-04 23:11:15 +0000
commiteb25cb901172dfa4d68f44de8f61d52958f53cfa (patch)
tree199829c571b38d36d91d330c1b7529acf0682090 /src/main/java/gregtech/api
parentb0364a9c8630d217daf1d9b8379253d4eeeb0b76 (diff)
downloadGT5-Unofficial-eb25cb901172dfa4d68f44de8f61d52958f53cfa.tar.gz
GT5-Unofficial-eb25cb901172dfa4d68f44de8f61d52958f53cfa.tar.bz2
GT5-Unofficial-eb25cb901172dfa4d68f44de8f61d52958f53cfa.zip
Delete/modify some reflection + more renaming (#3037)
Diffstat (limited to 'src/main/java/gregtech/api')
-rw-r--r--src/main/java/gregtech/api/GregTechAPI.java296
-rw-r--r--src/main/java/gregtech/api/objects/GTChunkManager.java18
-rw-r--r--src/main/java/gregtech/api/objects/GTRenderedTexture.java2
-rw-r--r--src/main/java/gregtech/api/threads/RunnableMachineUpdate.java6
-rw-r--r--src/main/java/gregtech/api/util/GTChunkAssociatedData.java2
-rw-r--r--src/main/java/gregtech/api/util/GTModHandler.java65
6 files changed, 31 insertions, 358 deletions
diff --git a/src/main/java/gregtech/api/GregTechAPI.java b/src/main/java/gregtech/api/GregTechAPI.java
index 6cabb8e04c..e10c773579 100644
--- a/src/main/java/gregtech/api/GregTechAPI.java
+++ b/src/main/java/gregtech/api/GregTechAPI.java
@@ -26,7 +26,6 @@ import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
@@ -47,10 +46,6 @@ import gregtech.api.interfaces.internal.IGTRecipeAdder;
import gregtech.api.interfaces.internal.IThaumcraftCompat;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IMachineBlockUpdateable;
-import gregtech.api.items.GTGenericItem;
-import gregtech.api.items.ItemCoolantCell;
-import gregtech.api.items.ItemCoolantCellIC;
-import gregtech.api.items.ItemTool;
import gregtech.api.metatileentity.BaseMetaTileEntity;
import gregtech.api.objects.GTCoverDefault;
import gregtech.api.objects.GTCoverNone;
@@ -287,20 +282,7 @@ public class GregTechAPI {
static {
sItemStackMappings.add(sCovers);
sItemStackMappings.add(sCoverBehaviors);
-
dummyWorlds.add(GTDummyWorld.class);
- tryAddDummyWorld("blockrenderer6343.client.world.DummyWorld");
- }
-
- private static void tryAddDummyWorld(String className) {
- ClassLoader cl = GregTechAPI.class.getClassLoader();
- Class<?> clazz;
- try {
- clazz = Class.forName(className, false, cl);
- } catch (ReflectiveOperationException ex) {
- return;
- }
- dummyWorlds.add(clazz);
}
public static void addDummyWorld(Class<?> clazz) {
@@ -408,284 +390,6 @@ public class GregTechAPI {
}
/**
- * Creates a new Coolant Cell Item for your Nuclear Reactor
- */
- public static Item constructCoolantCellItem(String aUnlocalized, String aEnglish, int aMaxStore) {
- try {
- return new ItemCoolantCellIC(aUnlocalized, aEnglish, aMaxStore);
- } catch (Throwable e) {
- /* Do nothing */
- }
- try {
- return new ItemCoolantCell(aUnlocalized, aEnglish, aMaxStore);
- } catch (Throwable e) {
- /* Do nothing */
- }
- return new GTGenericItem(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug");
- }
-
- /**
- * Creates a new Energy Armor Item
- */
- public static Item constructElectricArmorItem(String aUnlocalized, String aEnglish, int aCharge, int aTransfer,
- int aTier, int aDamageEnergyCost, int aSpecials, double aArmorAbsorbtionPercentage, boolean aChargeProvider,
- int aType, int aArmorIndex) {
- try {
- return (Item) Class.forName("gregtechmod.api.items.GT_EnergyArmorIC_Item")
- .getConstructors()[0].newInstance(
- aUnlocalized,
- aEnglish,
- aCharge,
- aTransfer,
- aTier,
- aDamageEnergyCost,
- aSpecials,
- aArmorAbsorbtionPercentage,
- aChargeProvider,
- aType,
- aArmorIndex);
- } catch (Throwable e) {
- /* Do nothing */
- }
- try {
- return (Item) Class.forName("gregtechmod.api.items.GT_EnergyArmor_Item")
- .getConstructors()[0].newInstance(
- aUnlocalized,
- aEnglish,
- aCharge,
- aTransfer,
- aTier,
- aDamageEnergyCost,
- aSpecials,
- aArmorAbsorbtionPercentage,
- aChargeProvider,
- aType,
- aArmorIndex);
- } catch (Throwable e) {
- /* Do nothing */
- }
- return new GTGenericItem(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug");
- }
-
- /**
- * Creates a new Energy Battery Item
- */
- public static Item constructElectricEnergyStorageItem(String aUnlocalized, String aEnglish, int aCharge,
- int aTransfer, int aTier, int aEmptyID, int aFullID) {
- try {
- return (Item) Class.forName("gregtechmod.api.items.GT_EnergyStoreIC_Item")
- .getConstructors()[0].newInstance(aUnlocalized, aEnglish, aCharge, aTransfer, aTier, aEmptyID, aFullID);
- } catch (Throwable e) {
- /* Do nothing */
- }
- try {
- return (Item) Class.forName("gregtechmod.api.items.GT_EnergyStore_Item")
- .getConstructors()[0].newInstance(aUnlocalized, aEnglish, aCharge, aTransfer, aTier, aEmptyID, aFullID);
- } catch (Throwable e) {
- /* Do nothing */
- }
- return new GTGenericItem(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug");
- }
-
- /**
- * Creates a new Hard Hammer Item
- */
- public static ItemTool constructHardHammerItem(String aUnlocalized, String aEnglish, int aMaxDamage,
- int aEntityDamage) {
- try {
- return (ItemTool) Class.forName("gregtechmod.api.items.GT_HardHammer_Item")
- .getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage);
- } catch (Throwable e) {
- /* Do nothing */
- }
- return new ItemTool(
- aUnlocalized,
- aEnglish,
- "Doesn't work as intended, this is a Bug",
- aMaxDamage,
- aEntityDamage,
- false);
- }
-
- /**
- * Creates a new Crowbar Item
- */
- public static ItemTool constructCrowbarItem(String aUnlocalized, String aEnglish, int aMaxDamage,
- int aEntityDamage) {
- try {
- return (ItemTool) Class.forName("gregtechmod.api.items.GT_CrowbarRC_Item")
- .getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage);
- } catch (Throwable e) {
- /* Do nothing */
- }
- try {
- return (ItemTool) Class.forName("gregtechmod.api.items.GT_Crowbar_Item")
- .getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage);
- } catch (Throwable e) {
- /* Do nothing */
- }
- return new ItemTool(
- aUnlocalized,
- aEnglish,
- "Doesn't work as intended, this is a Bug",
- aMaxDamage,
- aEntityDamage,
- false);
- }
-
- /**
- * Creates a new Wrench Item
- */
- public static ItemTool constructWrenchItem(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage,
- int aDisChargedGTID) {
- try {
- return (ItemTool) Class.forName("gregtechmod.api.items.GT_Wrench_Item")
- .getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage, aDisChargedGTID);
- } catch (Throwable e) {
- /* Do nothing */
- }
- return new ItemTool(
- aUnlocalized,
- aEnglish,
- "Doesn't work as intended, this is a Bug",
- aMaxDamage,
- aEntityDamage,
- false);
- }
-
- /**
- * Creates a new electric Screwdriver Item
- */
- public static ItemTool constructElectricScrewdriverItem(String aUnlocalized, String aEnglish, int aMaxDamage,
- int aEntityDamage, int aDisChargedGTID) {
- try {
- return (ItemTool) Class.forName("gregtechmod.api.items.GT_ScrewdriverIC_Item")
- .getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage, aDisChargedGTID);
- } catch (Throwable e) {
- /* Do nothing */
- }
- return new ItemTool(
- aUnlocalized,
- aEnglish,
- "Doesn't work as intended, this is a Bug",
- aMaxDamage,
- aEntityDamage,
- false);
- }
-
- /**
- * Creates a new electric Wrench Item
- */
- public static ItemTool constructElectricWrenchItem(String aUnlocalized, String aEnglish, int aMaxDamage,
- int aEntityDamage, int aDisChargedGTID) {
- try {
- return (ItemTool) Class.forName("gregtechmod.api.items.GT_WrenchIC_Item")
- .getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage, aDisChargedGTID);
- } catch (Throwable e) {
- /* Do nothing */
- }
- return new ItemTool(
- aUnlocalized,
- aEnglish,
- "Doesn't work as intended, this is a Bug",
- aMaxDamage,
- aEntityDamage,
- false);
- }
-
- /**
- * Creates a new electric Saw Item
- */
- public static ItemTool constructElectricSawItem(String aUnlocalized, String aEnglish, int aMaxDamage,
- int aEntityDamage, int aToolQuality, float aToolStrength, int aEnergyConsumptionPerBlockBreak,
- int aDisChargedGTID) {
- try {
- return (ItemTool) Class.forName("gregtechmod.api.items.GT_SawIC_Item")
- .getConstructors()[0].newInstance(
- aUnlocalized,
- aEnglish,
- aMaxDamage,
- aEntityDamage,
- aToolQuality,
- aToolStrength,
- aEnergyConsumptionPerBlockBreak,
- aDisChargedGTID);
- } catch (Throwable e) {
- /* Do nothing */
- }
- return new ItemTool(
- aUnlocalized,
- aEnglish,
- "Doesn't work as intended, this is a Bug",
- aMaxDamage,
- aEntityDamage,
- false);
- }
-
- /**
- * Creates a new electric Drill Item
- */
- public static ItemTool constructElectricDrillItem(String aUnlocalized, String aEnglish, int aMaxDamage,
- int aEntityDamage, int aToolQuality, float aToolStrength, int aEnergyConsumptionPerBlockBreak,
- int aDisChargedGTID) {
- try {
- return (ItemTool) Class.forName("gregtechmod.api.items.GT_DrillIC_Item")
- .getConstructors()[0].newInstance(
- aUnlocalized,
- aEnglish,
- aMaxDamage,
- aEntityDamage,
- aToolQuality,
- aToolStrength,
- aEnergyConsumptionPerBlockBreak,
- aDisChargedGTID);
- } catch (Throwable e) {
- /* Do nothing */
- }
- return new ItemTool(
- aUnlocalized,
- aEnglish,
- "Doesn't work as intended, this is a Bug",
- aMaxDamage,
- aEntityDamage,
- false);
- }
-
- /**
- * Creates a new electric Soldering Tool
- */
- public static ItemTool constructElectricSolderingToolItem(String aUnlocalized, String aEnglish, int aMaxDamage,
- int aEntityDamage, int aDisChargedGTID) {
- try {
- return (ItemTool) Class.forName("gregtechmod.api.items.GT_SolderingToolIC_Item")
- .getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage, aDisChargedGTID);
- } catch (Throwable e) {
- /* Do nothing */
- }
- return new ItemTool(
- aUnlocalized,
- aEnglish,
- "Doesn't work as intended, this is a Bug",
- aMaxDamage,
- aEntityDamage,
- false);
- }
-
- /**
- * Creates a new empty electric Tool
- */
- public static ItemTool constructEmptyElectricToolItem(String aUnlocalized, String aEnglish, int aMaxDamage,
- int aChargedGTID) {
- try {
- return (ItemTool) Class.forName("gregtechmod.api.items.GT_EmptyToolIC_Item")
- .getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aChargedGTID);
- } catch (Throwable e) {
- /* Do nothing */
- }
- return new ItemTool(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, 0, false);
- }
-
- /**
* Provides a new BaseMetaTileEntity. Because some interfaces are not always loaded (Buildcraft, Universal
* Electricity) we have to use invocation at the constructor of the BaseMetaTileEntity.
*/
diff --git a/src/main/java/gregtech/api/objects/GTChunkManager.java b/src/main/java/gregtech/api/objects/GTChunkManager.java
index 59bc90aa1c..436fd0d7d8 100644
--- a/src/main/java/gregtech/api/objects/GTChunkManager.java
+++ b/src/main/java/gregtech/api/objects/GTChunkManager.java
@@ -111,7 +111,7 @@ public class GTChunkManager
if (!GTValues.enableChunkloaders) return false;
if (!GTValues.alwaysReloadChunkloaders && chunkXZ == null) return false;
if (GTValues.debugChunkloaders && chunkXZ != null)
- GTLog.out.println("GT_ChunkManager: Chunk request: (" + chunkXZ.chunkXPos + ", " + chunkXZ.chunkZPos + ")");
+ GTLog.out.println("GTChunkManager: Chunk request: (" + chunkXZ.chunkXPos + ", " + chunkXZ.chunkZPos + ")");
if (instance.registeredTickets.containsKey(owner)) {
ForgeChunkManager.forceChunk(instance.registeredTickets.get(owner), chunkXZ);
} else {
@@ -122,11 +122,11 @@ public class GTChunkManager
.requestPlayerTicket(GTMod.instance, player, owner.getWorldObj(), ForgeChunkManager.Type.NORMAL);
if (ticket == null) {
if (GTValues.debugChunkloaders)
- GTLog.out.println("GT_ChunkManager: ForgeChunkManager.requestTicket failed");
+ GTLog.out.println("GTChunkManager: ForgeChunkManager.requestTicket failed");
return false;
}
if (GTValues.debugChunkloaders) GTLog.out.println(
- "GT_ChunkManager: ticket issued for machine at: (" + owner.xCoord
+ "GTChunkManager: ticket issued for machine at: (" + owner.xCoord
+ ", "
+ owner.yCoord
+ ", "
@@ -154,7 +154,7 @@ public class GTChunkManager
Ticket ticket = instance.registeredTickets.get(owner);
if (ticket != null) {
if (GTValues.debugChunkloaders) GTLog.out
- .println("GT_ChunkManager: Chunk release: (" + chunkXZ.chunkXPos + ", " + chunkXZ.chunkZPos + ")");
+ .println("GTChunkManager: Chunk release: (" + chunkXZ.chunkXPos + ", " + chunkXZ.chunkZPos + ")");
ForgeChunkManager.unforceChunk(ticket, chunkXZ);
}
}
@@ -165,14 +165,14 @@ public class GTChunkManager
if (ticket != null) {
if (GTValues.debugChunkloaders) {
GTLog.out.println(
- "GT_ChunkManager: ticket released by machine at: (" + owner.xCoord
+ "GTChunkManager: ticket released by machine at: (" + owner.xCoord
+ ", "
+ owner.yCoord
+ ", "
+ owner.zCoord
+ ")");
for (ChunkCoordIntPair chunk : ticket.getChunkList()) GTLog.out
- .println("GT_ChunkManager: Chunk release: (" + chunk.chunkXPos + ", " + chunk.chunkZPos + ")");
+ .println("GTChunkManager: Chunk release: (" + chunk.chunkXPos + ", " + chunk.chunkZPos + ")");
}
ForgeChunkManager.releaseTicket(ticket);
instance.registeredTickets.remove(owner);
@@ -180,10 +180,10 @@ public class GTChunkManager
}
public static void printTickets() {
- GTLog.out.println("GT_ChunkManager: Start forced chunks dump:");
+ GTLog.out.println("GTChunkManager: Start forced chunks dump:");
instance.registeredTickets.forEach((machine, ticket) -> {
GTLog.out.print(
- "GT_ChunkManager: Chunks forced by the machine at (" + machine.xCoord
+ "GTChunkManager: Chunks forced by the machine at (" + machine.xCoord
+ ", "
+ machine.yCoord
+ ", "
@@ -199,6 +199,6 @@ public class GTChunkManager
GTLog.out.print("), ");
}
});
- GTLog.out.println("GT_ChunkManager: End forced chunks dump:");
+ GTLog.out.println("GTChunkManager: End forced chunks dump:");
}
}
diff --git a/src/main/java/gregtech/api/objects/GTRenderedTexture.java b/src/main/java/gregtech/api/objects/GTRenderedTexture.java
index a4d0a064ff..abb2e28051 100644
--- a/src/main/java/gregtech/api/objects/GTRenderedTexture.java
+++ b/src/main/java/gregtech/api/objects/GTRenderedTexture.java
@@ -14,7 +14,7 @@ public class GTRenderedTexture extends gregtech.common.render.GTRenderedTexture
public GTRenderedTexture(IIconContainer aIcon, short[] aRGBa, boolean aAllowAlpha) {
super(aIcon, aRGBa, aAllowAlpha, false, true, false);
- if (aRGBa.length != 4) throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GT_RenderedTexture");
+ if (aRGBa.length != 4) throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GTRenderedTexture");
mRGBa = aRGBa;
}
diff --git a/src/main/java/gregtech/api/threads/RunnableMachineUpdate.java b/src/main/java/gregtech/api/threads/RunnableMachineUpdate.java
index d11e176f3d..7b0af48085 100644
--- a/src/main/java/gregtech/api/threads/RunnableMachineUpdate.java
+++ b/src/main/java/gregtech/api/threads/RunnableMachineUpdate.java
@@ -98,8 +98,8 @@ public class RunnableMachineUpdate implements Runnable {
EXECUTOR_SERVICE.shutdownNow(); // Cancel currently executing tasks
// Wait a while for tasks to respond to being cancelled
if (!EXECUTOR_SERVICE.awaitTermination(60, TimeUnit.SECONDS)) {
- GTMod.GT_FML_LOGGER.error(
- "Well this didn't terminated well... GT_Runnable_MachineBlockUpdate.shutdownExecutorService");
+ GTMod.GT_FML_LOGGER
+ .error("Well this didn't terminated well... RunnableMachineUpdate.shutdownExecutorService");
}
}
} catch (InterruptedException ie) {
@@ -114,7 +114,7 @@ public class RunnableMachineUpdate implements Runnable {
// (Re-)Cancel in case
EXECUTOR_SERVICE.shutdownNow();
} finally {
- GTMod.GT_FML_LOGGER.info("Leaving... GT_Runnable_MachineBlockUpdate.shutdownExecutorService");
+ GTMod.GT_FML_LOGGER.info("Leaving... RunnableMachineUpdate.shutdownExecutorService");
}
}
diff --git a/src/main/java/gregtech/api/util/GTChunkAssociatedData.java b/src/main/java/gregtech/api/util/GTChunkAssociatedData.java
index 7a81c715cb..c87697b80d 100644
--- a/src/main/java/gregtech/api/util/GTChunkAssociatedData.java
+++ b/src/main/java/gregtech/api/util/GTChunkAssociatedData.java
@@ -114,7 +114,7 @@ public abstract class GTChunkAssociatedData<T extends GTChunkAssociatedData.IDat
this.version = version;
this.saveDefaults = saveDefaults;
if (instances.putIfAbsent(aId, this) != null)
- throw new IllegalArgumentException("Duplicate GT_ChunkAssociatedData: " + aId);
+ throw new IllegalArgumentException("Duplicate GTChunkAssociatedData: " + aId);
}
private ChunkCoordIntPair getRegionID(int aChunkX, int aChunkZ) {
diff --git a/src/main/java/gregtech/api/util/GTModHandler.java b/src/main/java/gregtech/api/util/GTModHandler.java
index 23cddf2eb1..af7ddb82ea 100644
--- a/src/main/java/gregtech/api/util/GTModHandler.java
+++ b/src/main/java/gregtech/api/util/GTModHandler.java
@@ -82,6 +82,8 @@ import ic2.api.reactor.IReactorComponent;
import ic2.api.recipe.IRecipeInput;
import ic2.api.recipe.RecipeInputItemStack;
import ic2.api.recipe.RecipeOutput;
+import ic2.api.recipe.Recipes;
+import ic2.core.IC2;
import ic2.core.item.ItemToolbox;
/**
@@ -459,11 +461,11 @@ public class GTModHandler {
public static boolean addValuableOre(Block aBlock, int aMeta, int aValue) {
if (aValue <= 0) return false;
try {
- Class.forName("ic2.core.IC2")
- .getMethod("addValuableOre", IRecipeInput.class, int.class)
- .invoke(null, new RecipeInputItemStack(new ItemStack(aBlock, 1, aMeta)), aValue);
- } catch (Throwable e) {
- /* Do nothing */
+ IC2.addValuableOre(new RecipeInputItemStack(new ItemStack(aBlock, 1, aMeta)), aValue);
+ } catch (Exception e) {
+ // TODO remove try catch
+ // TODO fix : why is bartworks registering items stacks with .getItem() == null
+ GTLog.err.println("Caught exception when calling IC2.addValuableOre");
}
return true;
}
@@ -476,11 +478,7 @@ public class GTModHandler {
if (aOutput == null || aChance <= 0) return false;
aOutput.stackSize = 1;
if (GTConfig.troll && !GTUtility.areStacksEqual(aOutput, new ItemStack(Items.wooden_hoe, 1, 0))) return false;
- try {
- ic2.api.recipe.Recipes.scrapboxDrops.addDrop(GTUtility.copyOrNull(aOutput), aChance);
- } catch (Throwable e) {
- /* Do nothing */
- }
+ Recipes.scrapboxDrops.addDrop(GTUtility.copyOrNull(aOutput), aChance);
return true;
}
@@ -489,11 +487,7 @@ public class GTModHandler {
*/
public static boolean addToRecyclerBlackList(ItemStack aRecycledStack) {
if (aRecycledStack == null) return false;
- try {
- ic2.api.recipe.Recipes.recyclerBlacklist.add(new RecipeInputItemStack(aRecycledStack));
- } catch (Throwable e) {
- /* Do nothing */
- }
+ Recipes.recyclerBlacklist.add(new RecipeInputItemStack(aRecycledStack));
return true;
}
@@ -626,48 +620,23 @@ public class GTModHandler {
}
public static Map<IRecipeInput, RecipeOutput> getExtractorRecipeList() {
- try {
- return ic2.api.recipe.Recipes.extractor.getRecipes();
- } catch (Throwable e) {
- /* Do nothing */
- }
- return emptyRecipeMap;
+ return Recipes.extractor.getRecipes();
}
public static Map<IRecipeInput, RecipeOutput> getCompressorRecipeList() {
- try {
- return ic2.api.recipe.Recipes.compressor.getRecipes();
- } catch (Throwable e) {
- /* Do nothing */
- }
- return emptyRecipeMap;
+ return Recipes.compressor.getRecipes();
}
public static Map<IRecipeInput, RecipeOutput> getMaceratorRecipeList() {
- try {
- return ic2.api.recipe.Recipes.macerator.getRecipes();
- } catch (Throwable e) {
- /* Do nothing */
- }
- return emptyRecipeMap;
+ return Recipes.macerator.getRecipes();
}
public static Map<IRecipeInput, RecipeOutput> getThermalCentrifugeRecipeList() {
- try {
- return ic2.api.recipe.Recipes.centrifuge.getRecipes();
- } catch (Throwable e) {
- /* Do nothing */
- }
- return emptyRecipeMap;
+ return Recipes.centrifuge.getRecipes();
}
public static Map<IRecipeInput, RecipeOutput> getOreWashingRecipeList() {
- try {
- return ic2.api.recipe.Recipes.oreWashing.getRecipes();
- } catch (Throwable e) {
- /* Do nothing */
- }
- return emptyRecipeMap;
+ return Recipes.oreWashing.getRecipes();
}
/**
@@ -1997,13 +1966,13 @@ public class GTModHandler {
private static void generateRecyclerCache() {
recyclerWhitelist = new HashSet<>();
- for (IRecipeInput input : ic2.api.recipe.Recipes.recyclerWhitelist) {
+ for (IRecipeInput input : Recipes.recyclerWhitelist) {
for (ItemStack stack : input.getInputs()) {
recyclerWhitelist.add(GTUtility.ItemId.create(stack.getItem(), stack.getItemDamage(), null));
}
}
recyclerBlacklist = new HashSet<>();
- for (IRecipeInput input : ic2.api.recipe.Recipes.recyclerBlacklist) {
+ for (IRecipeInput input : Recipes.recyclerBlacklist) {
for (ItemStack stack : input.getInputs()) {
recyclerBlacklist.add(GTUtility.ItemId.create(stack.getItem(), stack.getItemDamage(), null));
}
@@ -2022,7 +1991,7 @@ public class GTModHandler {
* For the Scrapboxinator
*/
public static ItemStack getRandomScrapboxDrop() {
- return ic2.api.recipe.Recipes.scrapboxDrops.getDrop(ItemList.IC2_Scrapbox.get(1), false);
+ return Recipes.scrapboxDrops.getDrop(ItemList.IC2_Scrapbox.get(1), false);
}
/**