aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Java/gregtech/api/util/Recipe_GT.java3
-rw-r--r--src/Java/gtPlusPlus/GTplusplus.java3
-rw-r--r--src/Java/gtPlusPlus/api/objects/data/AutoMap.java10
-rw-r--r--src/Java/gtPlusPlus/api/objects/minecraft/NoConflictGTRecipeMap.java94
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java11
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_LFTR.java8
8 files changed, 121 insertions, 16 deletions
diff --git a/src/Java/gregtech/api/util/Recipe_GT.java b/src/Java/gregtech/api/util/Recipe_GT.java
index 77d2315836..4cee30a44a 100644
--- a/src/Java/gregtech/api/util/Recipe_GT.java
+++ b/src/Java/gregtech/api/util/Recipe_GT.java
@@ -17,6 +17,7 @@ import codechicken.nei.PositionedStack;
import gtPlusPlus.api.interfaces.IComparableRecipe;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.api.objects.data.AutoMap;
+import gtPlusPlus.api.objects.minecraft.NoConflictGTRecipeMap;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.RecipeUtils;
import gtPlusPlus.nei.GT_NEI_MultiBlockHandler;
@@ -250,6 +251,8 @@ public class Recipe_GT extends GT_Recipe implements IComparableRecipe{
//LFTR recipes
public static final GT_Recipe_Map sLiquidFluorineThoriumReactorRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(50), "gt.recipe.lftr", "Liquid Fluoride Thorium Reactor", null, RES_PATH_GUI + "basicmachines/LFTR", 0, 0, 0, 2, 1, "Start: ", 1, " EU", true, true);
+ public static final GT_Recipe_Map sLiquidFluorineThoriumReactorRecipesEx = new GT_Recipe_Map(new NoConflictGTRecipeMap(), "gt.recipe.lftr.2", "Liquid Fluoride Thorium Reactor", null, RES_PATH_GUI + "basicmachines/LFTR", 0, 0, 0, 2, 1, "Start: ", 1, " EU", true, true);
+
//Fission Fuel Plant Recipes
//public static final GT_Recipe_Map sFissionFuelProcessing = new GT_Recipe_Map(new HashSet<GT_Recipe>(50), "gt.recipe.fissionfuel", "Fission Fuel Processing", null, RES_PATH_GUI + "basicmachines/LFTR", 0, 0, 0, 9, 1, E, 1, E, true, true);
diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java
index 373396f9d5..f80e316b9d 100644
--- a/src/Java/gtPlusPlus/GTplusplus.java
+++ b/src/Java/gtPlusPlus/GTplusplus.java
@@ -45,7 +45,6 @@ import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools;
import gtPlusPlus.xmod.gregtech.loaders.GT_Material_Loader;
import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_BlastSmelterGT_GTNH;
-import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Recycling;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.oredict.OreDictionary;
@@ -324,7 +323,7 @@ public class GTplusplus implements ActionListener {
//GTNH Beta Testers
mBetaTestCapes.put(new Pair<String, String>("bartimaeusnek", "578c2d13-9358-4ae8-95e7-a30ab9f9f3c7"));
- //mBetaTestCapes.put(new Pair<String, String>("cantankerousrex", ""));
+ mBetaTestCapes.put(new Pair<String, String>("Prewf", "634433ec-6256-44aa-97b3-a615be18ce23"));
//mBetaTestCapes.put(new Pair<String, String>("cantankerousrex", ""));
//mBetaTestCapes.put(new Pair<String, String>("cantankerousrex", ""));
//mBetaTestCapes.put(new Pair<String, String>("cantankerousrex", ""));
diff --git a/src/Java/gtPlusPlus/api/objects/data/AutoMap.java b/src/Java/gtPlusPlus/api/objects/data/AutoMap.java
index 7ffa2deb42..b3762dd243 100644
--- a/src/Java/gtPlusPlus/api/objects/data/AutoMap.java
+++ b/src/Java/gtPlusPlus/api/objects/data/AutoMap.java
@@ -9,6 +9,7 @@ public class AutoMap<V> implements Iterable<V>, Cloneable, Serializable {
* The Internal Map
*/
protected final Map<Integer, V> mInternalMap;
+ protected final Map<String, Integer> mInternalNameMap;
/**
* The Internal ID
@@ -23,6 +24,7 @@ public class AutoMap<V> implements Iterable<V>, Cloneable, Serializable {
public AutoMap(Map<Integer, V> defaultMapType) {
mInternalMap = defaultMapType;
+ mInternalNameMap = new HashMap<String, Integer>();
}
@Override
@@ -46,6 +48,7 @@ public class AutoMap<V> implements Iterable<V>, Cloneable, Serializable {
}
public synchronized V set(V object){
+ mInternalNameMap.put(""+object.hashCode(), (mInternalID+1));
return mInternalMap.put(mInternalID++, object);
}
@@ -93,5 +96,12 @@ public class AutoMap<V> implements Iterable<V>, Cloneable, Serializable {
public synchronized final int getInternalID() {
return mInternalID;
}
+
+ public synchronized final boolean remove(V value) {
+ if (this.mInternalMap.containsValue(value)) {
+ return this.mInternalMap.remove(mInternalNameMap.get(""+value.hashCode()), value);
+ }
+ return false;
+ }
}
diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/NoConflictGTRecipeMap.java b/src/Java/gtPlusPlus/api/objects/minecraft/NoConflictGTRecipeMap.java
index 0aeaedb01d..78e925fe04 100644
--- a/src/Java/gtPlusPlus/api/objects/minecraft/NoConflictGTRecipeMap.java
+++ b/src/Java/gtPlusPlus/api/objects/minecraft/NoConflictGTRecipeMap.java
@@ -1,13 +1,14 @@
package gtPlusPlus.api.objects.minecraft;
import java.util.Collection;
+import java.util.Iterator;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.util.GT_Recipe;
import gtPlusPlus.api.objects.data.AutoMap;
-public class NoConflictGTRecipeMap {
+public class NoConflictGTRecipeMap implements Collection<GT_Recipe> {
private AutoMap<GT_Recipe> mRecipeCache = new AutoMap<GT_Recipe>();
private final IGregTechTileEntity mMachineType;
@@ -15,25 +16,108 @@ public class NoConflictGTRecipeMap {
public NoConflictGTRecipeMap () {
this(null);
}
-
+
public NoConflictGTRecipeMap (IGregTechTileEntity tile0) {
this.mMachineType = tile0;
}
public boolean put(GT_Recipe recipe) {
return add(recipe);
}
-
+
public boolean add(GT_Recipe recipe) {
return mRecipeCache.setValue(recipe);
}
-
+
public Collection<GT_Recipe> getRecipeMap() {
return mRecipeCache.values();
}
-
+
public boolean isMapValidForMachine(IGregTechTileEntity tile) {
return tile == mMachineType;
}
+ @Override
+ public boolean addAll(Collection<? extends GT_Recipe> arg0) {
+ int a = 0;
+ for (Object v : arg0) {
+ if (!this.mRecipeCache.containsValue((GT_Recipe) v)) {
+ this.mRecipeCache.put((GT_Recipe) v);
+ a++;
+ }
+ }
+ return a > 0;
+ }
+
+ @Override
+ public void clear() {
+ mRecipeCache.clear();
+ }
+
+ @Override
+ public boolean contains(Object arg0) {
+ return mRecipeCache.containsValue((GT_Recipe) arg0);
+ }
+
+ @Override
+ public boolean containsAll(Collection<?> arg0) {
+ int a = 0;
+ for (Object v : arg0) {
+ if (this.mRecipeCache.containsValue((GT_Recipe) v)) {
+ a++;
+ }
+ }
+ return a == arg0.size();
+ }
+
+ @Override
+ public boolean isEmpty() {
+ return mRecipeCache.isEmpty();
+ }
+
+ @Override
+ public Iterator<GT_Recipe> iterator() {
+ return mRecipeCache.iterator();
+ }
+
+ @Override
+ public boolean remove(Object arg0) {
+ return mRecipeCache.remove((GT_Recipe) arg0);
+ }
+
+ @Override
+ public boolean removeAll(Collection<?> arg0) {
+ int a = 0;
+ for (Object v : arg0) {
+ if (this.mRecipeCache.containsValue((GT_Recipe) v)) {
+ this.mRecipeCache.remove((GT_Recipe) v);
+ a++;
+ }
+ }
+ return a > 0;
+ }
+
+ @Override
+ public boolean retainAll(Collection<?> arg0) {
+ int mStartSize = this.mRecipeCache.size();
+ this.mRecipeCache = (AutoMap<GT_Recipe>) arg0;
+ int mEndsize = this.mRecipeCache.size();
+ return mStartSize != mEndsize;
+ }
+
+ @Override
+ public int size() {
+ return this.mRecipeCache.size();
+ }
+
+ @Override
+ public Object[] toArray() {
+ return this.mRecipeCache.toArray();
+ }
+
+ @Override
+ public <T> T[] toArray(T[] arg0) {
+ return (T[]) this.mRecipeCache.toArray();
+ }
+
}
diff --git a/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java
index f3b40a7214..aac26418b0 100644
--- a/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java
+++ b/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java
@@ -15,6 +15,7 @@ import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.util.math.MathUtils;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
import net.minecraftforge.event.entity.living.LivingDropsEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.world.BlockEvent;
@@ -114,13 +115,17 @@ public class BlockEventHandler {
ArrayList<Block> mBlockTypes = new ArrayList<Block>();
if (!oreLimestone.isEmpty()){
for (int i=0;i<oreLimestone.size();i++){
- mBlockTypes.add(Block.getBlockFromItem(oreLimestone.get(i).getItem()));
+ if (!ItemUtils.getModId(oreLimestone.get(i)).toLowerCase().contains("biomesoplenty")) {
+ mBlockTypes.add(Block.getBlockFromItem(oreLimestone.get(i).getItem()));
+ }
}
}
if (!blockLimestone.isEmpty()){
for (int i=0;i<blockLimestone.size();i++){
- if (!mBlockTypes.contains(Block.getBlockFromItem(blockLimestone.get(i).getItem()))){
- mBlockTypes.add(Block.getBlockFromItem(blockLimestone.get(i).getItem()));
+ if (!ItemUtils.getModId(oreLimestone.get(i)).toLowerCase().contains("biomesoplenty")) {
+ if (!mBlockTypes.contains(Block.getBlockFromItem(blockLimestone.get(i).getItem()))){
+ mBlockTypes.add(Block.getBlockFromItem(blockLimestone.get(i).getItem()));
+ }
}
}
}
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
index d4eadedc48..1cdc08c1db 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
@@ -1039,11 +1039,11 @@ public class RECIPES_GREGTECH {
new int[] { 2000, 1000, 250, 250, 250, 250, 500 }, 0);
HotFuel.addNewHotFuel(FluidUtils.getFluidStack("ic2pahoehoelava", 83), GT_Values.NF,
- new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("nuggetCopper", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("nuggetTin", 1),
+ new ItemStack[] {
+ ItemUtils.getItemStackOfAmountFromOreDict("nuggetBronze", 1),
ItemUtils.getItemStackOfAmountFromOreDict("nuggetElectrum", 1),
ItemUtils.getSimpleStack(Blocks.obsidian) },
- new int[] { 1000, 500, 125, 1850 }, 0);
+ new int[] { 750, 250, 1850 }, 0);
/*
* HotFuel.addNewHotFuel( FluidUtils.getFluidStack("ic2hotcoolant",
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java
index 098529818e..93d84404a9 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java
@@ -233,7 +233,7 @@ extends GregtechMeta_MultiBlockBase {
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 1, zDir + j) != 14) {
return false;
}
- if (!this.addFluidInputToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 3, zDir + j), 11)) {
+ if (!this.addFluidInputToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 3, zDir + j), TAE.GTPP_INDEX(15))) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 3, zDir + j) != ModBlocks.blockCasingsMisc) {
return false;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_LFTR.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_LFTR.java
index 5b897a0ad0..768bfec3d3 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_LFTR.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_LFTR.java
@@ -86,9 +86,13 @@ public class RecipeLoader_LFTR {
4096//fuel value
);
- mRecipesLFTR.add(LFTR1);
+ /*mRecipesLFTR.add(LFTR1);
mRecipesLFTR.add(LFTR2);
- mRecipesLFTR.add(LFTR3);
+ mRecipesLFTR.add(LFTR3);*/
+ Recipe_GT.Gregtech_Recipe_Map.sLiquidFluorineThoriumReactorRecipesEx.add(LFTR1);
+ Recipe_GT.Gregtech_Recipe_Map.sLiquidFluorineThoriumReactorRecipesEx.add(LFTR2);
+ Recipe_GT.Gregtech_Recipe_Map.sLiquidFluorineThoriumReactorRecipesEx.add(LFTR3);
+
}
}