aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/RoadMap.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/RoadMap.java')
-rw-r--r--src/Java/gtPlusPlus/RoadMap.java47
1 files changed, 43 insertions, 4 deletions
diff --git a/src/Java/gtPlusPlus/RoadMap.java b/src/Java/gtPlusPlus/RoadMap.java
index bbd602cab4..11714ef2cb 100644
--- a/src/Java/gtPlusPlus/RoadMap.java
+++ b/src/Java/gtPlusPlus/RoadMap.java
@@ -1,5 +1,12 @@
package gtPlusPlus;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+
+import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.data.ObjMap;
+import net.minecraft.item.ItemStack;
+
/**
* This Class purely exists to note down ideas and or plans to (re)implement things.
*
@@ -14,7 +21,7 @@ public class RoadMap {
* Issues occur where Classes like CI.java try access the GregtechItemList.java objects before they're actually set.
* A plan should be created to organize the best scheme to load things in the best order.
*/
-
+
//Recreation of GUIs for all Multiblocks
/*
* Most Multi's use generic or straight out wrong GUI's on the controller.
@@ -23,7 +30,7 @@ public class RoadMap {
* Some could even benefit from a totally new type of UI (Instead of Text issues, just change a 2x2px area between red and green for status lights)
* These advanced GUIs are probably out of my capability, but if anyone thinks they're a good idea, I'll give them a go.
*/
-
+
//Better Integration with GTNH
/*
* Refactor things to be more common, refactor things to automatically switch between GTNH and standard variants
@@ -31,6 +38,38 @@ public class RoadMap {
* Most of this can be done via expanding CI.java, so that we have automated handlers for everything
* (IE. getX(5) will get 5x of the correct version of X)
*/
-
-
+
+
+ /*private static final LinkedHashMap<String, ObjMap<Integer, Boolean>>mCachedResults = new LinkedHashMap<String, ObjMap<Integer, Boolean>>();
+ public boolean contains(ItemStack aStack) {
+ if (aStack == null){
+ return false;
+ }
+ ObjMap<Integer, Boolean> aCurrentSet;
+ if (mCachedResults.get(this.toString()) != null){
+ aCurrentSet = mCachedResults.get(this.toString());
+ }
+
+ else {
+ aCurrentSet = new ObjMap<Integer, Boolean>(mPrefixedItems.size(), 0.5f);
+ mCachedResults.put(this.toString(), aCurrentSet);
+ }
+
+ if (aCurrentSet.get(aStack.hashCode()) != null){
+ return aCurrentSet.get(aStack.hashCode());
+ }
+ else {
+ for (ItemStack tStack : mPrefixedItems){
+ if (GT_Utility.areStacksEqual(aStack, tStack, !tStack.hasTagCompound())){
+ aCurrentSet.put(aStack.hashCode(), true);
+ return true;
+ }
+ }
+ }
+ aCurrentSet.put(aStack.hashCode(), false);
+ return false;
+ }*/
+
+
+
}