Make computer not detecting devices explicit.
This commit is contained in:
@@ -133,7 +133,7 @@ public final class ComputerBlock extends HorizontalDirectionalBlock implements E
|
||||
public void neighborChanged(final BlockState state, final Level level, final BlockPos pos, final Block changedBlock, final BlockPos changedBlockPos, final boolean isMoving) {
|
||||
final BlockEntity blockEntity = level.getBlockEntity(pos);
|
||||
if (blockEntity instanceof final ComputerBlockEntity computer) {
|
||||
computer.handleNeighborChanged();
|
||||
computer.handleNeighborChanged(changedBlockPos);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -132,9 +132,10 @@ public final class ComputerBlockEntity extends ModBlockEntity implements Termina
|
||||
return terminalUsers;
|
||||
}
|
||||
|
||||
public void handleNeighborChanged() {
|
||||
public void handleNeighborChanged(final BlockPos pos) {
|
||||
if (level != null && !level.isClientSide()) {
|
||||
virtualMachine.busController.scheduleBusScan();
|
||||
busElement.handleNeighborChanged(pos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -382,6 +383,11 @@ public final class ComputerBlockEntity extends ModBlockEntity implements Termina
|
||||
return getBlockState().getValue(ComputerBlock.FACING) != direction;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canDetectDevicesTowards(@Nullable final Direction direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<UUID> getDeviceIdentifier(final Device device) {
|
||||
if (devices.contains(device)) {
|
||||
|
||||
Reference in New Issue
Block a user