Non-Configured Level Emitters no longer prevent crafting recipes from registering.

This commit is contained in:
AlgorithmX2
2014-08-17 03:58:42 -05:00
parent 339709bed9
commit 4338caa782
+7 -8
View File
@@ -287,18 +287,17 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
private void updatePatterns() private void updatePatterns()
{ {
// update the stuff that was in the list... HashMap<IAEItemStack, ImmutableSet<ICraftingPatternDetails>> oldItems = craftableItems;
for (IAEItemStack out : craftableItems.keySet())
{
out.reset();
sg.postAlterationOfStoredItems( StorageChannel.ITEMS, out, new BaseActionSource() );
}
// erase list. // erase list.
craftingMethods.clear(); craftingMethods.clear();
craftableItems.clear(); craftableItems = new HashMap();
emitableItems.clear(); emitableItems.clear();
// update the stuff that was in the list...
for (IAEItemStack out : oldItems.keySet())
sg.postAlterationOfStoredItems( StorageChannel.ITEMS, out, new BaseActionSource() );
// re-create list.. // re-create list..
for (ICraftingProvider cp : providers) for (ICraftingProvider cp : providers)
cp.provideCrafting( this ); cp.provideCrafting( this );
@@ -320,7 +319,6 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
tmpCraft.put( out, methods = new HashSet() ); tmpCraft.put( out, methods = new HashSet() );
methods.add( details ); methods.add( details );
sg.postAlterationOfStoredItems( StorageChannel.ITEMS, out, new BaseActionSource() );
} }
} }
@@ -328,6 +326,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
for (Entry<IAEItemStack, Set<ICraftingPatternDetails>> e : tmpCraft.entrySet()) for (Entry<IAEItemStack, Set<ICraftingPatternDetails>> e : tmpCraft.entrySet())
{ {
craftableItems.put( e.getKey(), ImmutableSortedSet.copyOf( e.getValue() ) ); craftableItems.put( e.getKey(), ImmutableSortedSet.copyOf( e.getValue() ) );
sg.postAlterationOfStoredItems( StorageChannel.ITEMS, e.getKey(), new BaseActionSource() );
} }
} }