One level of indirection for capabilities for tests.

This commit is contained in:
Florian Nücke
2022-02-09 17:31:48 +01:00
parent 2495d98aef
commit 24e837192a
30 changed files with 118 additions and 70 deletions

View File

@@ -102,10 +102,10 @@ public final class DiskDriveBlockEntity extends ModBlockEntity implements DiskDr
@Override
protected void collectCapabilities(final CapabilityCollector collector, @Nullable final Direction direction) {
collector.offer(Capabilities.ITEM_HANDLER, itemHandler);
collector.offer(Capabilities.itemHandler(), itemHandler);
if (direction == getBlockState().getValue(DiskDriveBlock.FACING).getOpposite()) {
collector.offer(Capabilities.DEVICE, device);
collector.offer(Capabilities.device(), device);
}
}