Make computer emit block update after bus scan finishes.
Necessary because this may lead to newly available capabilities from new devices.
This commit is contained in:
@@ -311,12 +311,19 @@ public final class ComputerTileEntity extends AbstractTileEntity implements ITic
|
||||
world.notifyNeighborsOfStateChange(getPos(), getBlockState().getBlock());
|
||||
}
|
||||
|
||||
final AbstractDeviceBusController.BusState oldBusState = busController.getState();
|
||||
busController.scan();
|
||||
setBusState(busController.getState());
|
||||
if (busState != AbstractDeviceBusController.BusState.READY) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (oldBusState != AbstractDeviceBusController.BusState.READY) {
|
||||
// Bus just became ready, meaning new devices may be available, meaning new
|
||||
// capabilities may be available, so we need to tell our neighbors.
|
||||
world.notifyNeighborsOfStateChange(getPos(), getBlockState().getBlock());
|
||||
}
|
||||
|
||||
switch (runState) {
|
||||
case STOPPED:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user