aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2018-05-24 08:12:44 +1000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2018-05-24 08:12:44 +1000
commit4af770de7faa9f6816d0cfd51858c5c5b77e758a (patch)
treeaca46e963bf84c4e38bf3f043158fdbcac9f5e38 /src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java
parentb44d061f6ca95236a873bb0835d0e2fd77b96851 (diff)
downloadGT5-Unofficial-4af770de7faa9f6816d0cfd51858c5c5b77e758a.tar.gz
GT5-Unofficial-4af770de7faa9f6816d0cfd51858c5c5b77e758a.tar.bz2
GT5-Unofficial-4af770de7faa9f6816d0cfd51858c5c5b77e758a.zip
+ Added a new interface RunnableWithInfo.java. Allows passing through type V and an object, for extra manipulation during runnable events where required.
$ Further improvements to the recipe generation system. Added safety catches in case a particular material is having issues, so as not to corrupt the whole map. $ Added extra maps for recipes that get added from auto-generation elsewhere. Cached maps should also register to be run upon creation.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java
index 369178abd0..1b392a5d10 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java
@@ -8,8 +8,10 @@ import net.minecraft.item.ItemStack;
import gregtech.api.enums.GT_Values;
import gregtech.api.util.GT_ModHandler;
+import gtPlusPlus.api.interfaces.RunnableWithInfo;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.material.Material;
+import gtPlusPlus.core.material.MaterialGenerator;
import gtPlusPlus.core.material.MaterialStack;
import gtPlusPlus.core.material.state.MaterialState;
import gtPlusPlus.core.recipe.common.CI;
@@ -17,12 +19,12 @@ import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.RecipeUtils;
import net.minecraftforge.fluids.FluidStack;
-public class RecipeGen_DustGeneration implements Runnable{
+public class RecipeGen_DustGeneration extends RecipeGen_Base {
- public static final Set<Runnable> mRecipeGenMap = new HashSet<Runnable>();
-
- final Material toGenerate;
- final boolean disableOptional;
+ public final static Set<RunnableWithInfo<Material>> mRecipeGenMap = new HashSet<RunnableWithInfo<Material>>();
+ static {
+ MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap);
+ }
public RecipeGen_DustGeneration(final Material M){
this(M, false);
@@ -307,5 +309,6 @@ public class RecipeGen_DustGeneration implements Runnable{
}
return false;
}
+
}