Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 76ae078d24 |
@@ -149,6 +149,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
|||||||
private int isWorking = -1;
|
private int isWorking = -1;
|
||||||
private final Accessor accessor = new Accessor();
|
private final Accessor accessor = new Accessor();
|
||||||
private GTCEInventoryAdaptor GTad;
|
private GTCEInventoryAdaptor GTad;
|
||||||
|
EnumSet<EnumFacing> visitedFaces = EnumSet.noneOf( EnumFacing.class );
|
||||||
|
|
||||||
public DualityInterface( final AENetworkProxy networkProxy, final IInterfaceHost ih )
|
public DualityInterface( final AENetworkProxy networkProxy, final IInterfaceHost ih )
|
||||||
{
|
{
|
||||||
@@ -939,8 +940,12 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
|||||||
final World w = tile.getWorld();
|
final World w = tile.getWorld();
|
||||||
|
|
||||||
final EnumSet<EnumFacing> possibleDirections = this.iHost.getTargets();
|
final EnumSet<EnumFacing> possibleDirections = this.iHost.getTargets();
|
||||||
|
|
||||||
for( final EnumFacing s : possibleDirections )
|
for( final EnumFacing s : possibleDirections )
|
||||||
{
|
{
|
||||||
|
if (visitedFaces.contains( s ))
|
||||||
|
continue;
|
||||||
|
|
||||||
final TileEntity te = w.getTileEntity( tile.getPos().offset( s ) );
|
final TileEntity te = w.getTileEntity( tile.getPos().offset( s ) );
|
||||||
if( te instanceof IInterfaceHost )
|
if( te instanceof IInterfaceHost )
|
||||||
{
|
{
|
||||||
@@ -964,6 +969,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
|||||||
{
|
{
|
||||||
if( cm.pushPattern( patternDetails, table, s.getOpposite() ) )
|
if( cm.pushPattern( patternDetails, table, s.getOpposite() ) )
|
||||||
{
|
{
|
||||||
|
visitedFaces.add( s );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
@@ -1004,10 +1010,12 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.pushItemsOut( possibleDirections );
|
this.pushItemsOut( possibleDirections );
|
||||||
|
visitedFaces.add( s );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
visitedFaces.clear();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU
|
|||||||
private final List<TileCraftingTile> storage = new ArrayList<>();
|
private final List<TileCraftingTile> storage = new ArrayList<>();
|
||||||
private final List<TileCraftingMonitorTile> status = new ArrayList<>();
|
private final List<TileCraftingMonitorTile> status = new ArrayList<>();
|
||||||
private final HashMap<IMEMonitorHandlerReceiver<IAEItemStack>, Object> listeners = new HashMap<>();
|
private final HashMap<IMEMonitorHandlerReceiver<IAEItemStack>, Object> listeners = new HashMap<>();
|
||||||
|
private final Map<ICraftingPatternDetails,List<ICraftingMedium>> visitedMediums = new HashMap<>();
|
||||||
private ICraftingLink myLastLink;
|
private ICraftingLink myLastLink;
|
||||||
private String myName = "";
|
private String myName = "";
|
||||||
private boolean isDestroyed = false;
|
private boolean isDestroyed = false;
|
||||||
@@ -653,6 +654,23 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (visitedMediums.containsKey( details ))
|
||||||
|
{
|
||||||
|
if( visitedMediums.get( details ).containsAll( cc.getMediums( e.getKey() ) ) )
|
||||||
|
{
|
||||||
|
visitedMediums.clear();
|
||||||
|
visitedMediums.put( details, new ArrayList<>() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
visitedMediums.putIfAbsent( details, new ArrayList<>() );
|
||||||
|
|
||||||
|
if( visitedMediums.get( details ).contains( m ) )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
visitedMediums.get( details ).add( m );
|
||||||
|
|
||||||
if( !m.isBusy() )
|
if( !m.isBusy() )
|
||||||
{
|
{
|
||||||
if( ic == null )
|
if( ic == null )
|
||||||
|
|||||||
Reference in New Issue
Block a user