Fixed side being used in block device queries being flipped.

This commit is contained in:
Florian Nücke
2022-01-23 11:56:10 +01:00
parent 520323e7e1
commit 0f9eb58a9e
2 changed files with 2 additions and 2 deletions

View File

@@ -96,7 +96,7 @@ public class BlockEntityDeviceBusElement extends AbstractGroupingDeviceBusElemen
return;
}
final HashSet<BlockEntry> newDevices = collectDevices(level, pos, direction);
final HashSet<BlockEntry> newDevices = collectDevices(level, pos, direction.getOpposite());
final int index = direction.get3DDataValue();
setEntriesForGroup(index, newDevices);

View File

@@ -17,7 +17,7 @@ public final class DiskDriveDeviceProvider extends AbstractBlockEntityDeviceProv
protected Invalidatable<Device> getBlockDevice(final BlockDeviceQuery query, final DiskDriveBlockEntity blockEntity) {
// We only allow connecting to exactly one face of the disk drive to ensure only one
// bus (and thus, one VM) will access the device at any single time.
if (query.getQuerySide() != blockEntity.getBlockState().getValue(HorizontalDirectionalBlock.FACING)) {
if (query.getQuerySide() == blockEntity.getBlockState().getValue(HorizontalDirectionalBlock.FACING)) {
return Invalidatable.empty();
}