Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,15 @@ public void rebuildShapes() {
public void rebuild() {
this.itemHandlers = new ArrayList<>();
this.fluidHandlers = new ArrayList<>();
this.extensions = 0;
if (level != null && !level.isClientSide()) {
for (Long connectedDrawer : this.connectedDrawers) {
BlockPos pos = BlockPos.of(connectedDrawer);
BlockEntity entity = level.getBlockEntity(pos);
if (entity instanceof DrawerControllerTile) continue;
if (entity instanceof ControllerExtensionTile) {
++extensions;
continue;
}
if (entity instanceof ItemControllableDrawerTile<?> itemControllableDrawerTile) {
this.itemHandlers.add(itemControllableDrawerTile.getStorage());
Expand Down