Removed BusElement.dispose(), use scheduleScan() directly for clarity.

This commit is contained in:
Florian Nücke
2021-01-04 13:56:05 +01:00
parent c9b67b6452
commit 78ed259eef
3 changed files with 5 additions and 6 deletions

View File

@@ -120,10 +120,6 @@ public class TileEntityDeviceBusElement extends AbstractGroupingBlockDeviceBusEl
});
}
public void dispose() {
scheduleScan();
}
///////////////////////////////////////////////////////////////////
protected boolean canScanContinueTowards(@Nullable final Direction direction) {

View File

@@ -73,7 +73,7 @@ public final class BusCableTileEntity extends AbstractTileEntity {
// Bus element will usually be discovered via bus scan, not via capability request, so
// automatic invalidation via capability will *not* necessarily schedule a scan on the
// controller of our current bus. So we need to trigger that manually.
busElement.dispose();
busElement.scheduleScan();
}
///////////////////////////////////////////////////////////////////

View File

@@ -514,7 +514,10 @@ public final class ComputerTileEntity extends AbstractTileEntity implements ITic
virtualMachine.vmAdapter.suspend();
busController.dispose();
busElement.dispose();
// This is necessary in case some other controller found us before our controller
// did its scan, which can happen because the scan can happen with a delay.
busElement.scheduleScan();
}
///////////////////////////////////////////////////////////////////