diff --git a/me/cache/CraftingGridCache.java b/me/cache/CraftingGridCache.java index 075bf13bb..cc490f151 100644 --- a/me/cache/CraftingGridCache.java +++ b/me/cache/CraftingGridCache.java @@ -62,7 +62,6 @@ import com.google.common.collect.HashMultimap; import com.google.common.collect.ImmutableCollection; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import com.google.common.collect.ImmutableSortedSet; import com.google.common.collect.SetMultimap; public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper, ICellProvider, IMEInventoryHandler @@ -78,7 +77,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper IEnergyGrid eg; HashMap> craftingMethods = new HashMap(); - HashMap> craftableItems = new HashMap(); + HashMap> craftableItems = new HashMap(); HashSet emitableItems = new HashSet(); HashMap links = new HashMap(); @@ -92,7 +91,8 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper final Iterator i; CraftingCPUCluster c = null; - public ActiveCpuIterator(Collection o) { + public ActiveCpuIterator(Collection o) + { i = o.iterator(); } @@ -135,7 +135,8 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper return ImmutableSet.copyOf( new ActiveCpuIterator( cpuClusters ) ); } - public CraftingGridCache(IGrid g) { + public CraftingGridCache(IGrid g) + { grid = g; } @@ -287,7 +288,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper private void updatePatterns() { - HashMap> oldItems = craftableItems; + HashMap> oldItems = craftableItems; // erase list. craftingMethods.clear(); @@ -323,7 +324,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper // make them immutable for (Entry> e : tmpCraft.entrySet()) - craftableItems.put( e.getKey(), ImmutableSortedSet.copyOf( e.getValue() ) ); + craftableItems.put( e.getKey(), ImmutableList.copyOf( e.getValue() ) ); sg.postAlterationOfStoredItems( StorageChannel.ITEMS, craftableItems.keySet(), new BaseActionSource() ); } @@ -481,7 +482,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper @Override public ImmutableCollection getCraftingFor(IAEItemStack whatToCraft, ICraftingPatternDetails details, int slotIndex, World world) { - ImmutableSet res = craftableItems.get( whatToCraft ); + ImmutableList res = craftableItems.get( whatToCraft ); if ( res == null ) {