undo partially pattern cache rebuild optimization

This commit is contained in:
PrototypeTrousers
2022-03-01 13:02:56 -03:00
parent 71ffcfb839
commit d414c458ae
2 changed files with 1 additions and 29 deletions
@@ -464,14 +464,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
}
try
{
if( removed )
{
this.gridProxy.getGrid().postEvent( new MENetworkCraftingPatternChange( this, this.gridProxy.getNode() ) );
}
else if( newPattern )
{
this.provideCrafting( (ICraftingProviderHelper) this.gridProxy.getCrafting() );
}
this.gridProxy.getGrid().postEvent( new MENetworkCraftingPatternChange( this, this.gridProxy.getNode() ) );
}
catch( GridAccessException e )
{
-21
View File
@@ -411,27 +411,6 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
{
details.add( medium );
}
if( !updatePatterns )
{
List<IAEItemStack> newCraftables = new ArrayList<>();
ObjectSet<ICraftingPatternDetails> b = new ObjectRBTreeSet<>( COMPARATOR );
ImmutableList<ICraftingPatternDetails> a = this.craftableItems.get( api.getCondensedOutputs()[0] );
if( a != null )
{
b.addAll( this.craftableItems.get( api.getOutputs()[0] ) );
}
b.add( api );
for( IAEItemStack stack : api.getCondensedOutputs() )
{
IAEItemStack i = stack.copy().reset().setCraftable( true );
this.craftableItems.put( i, ImmutableList.copyOf( b ) );
newCraftables.add( i );
}
this.storageGrid.postCraftablesChanges( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ), newCraftables, new BaseActionSource() );
}
}
@Override