Skip to content

Commit

Permalink
Fixed class cast exception with me bridge's listCells
Browse files Browse the repository at this point in the history
  • Loading branch information
SirEndii committed Oct 4, 2024
1 parent 833e5df commit 23d3b91
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -570,11 +570,11 @@ public static List<Object> listCells(IGridNode node) {

if (!iterator.hasNext()) return items;
while (iterator.hasNext()) {
DriveBlockEntity entity = (DriveBlockEntity) iterator.next().getService(IStorageProvider.class);
if (entity == null)
IStorageProvider entity = iterator.next().getService(IStorageProvider.class);
if (!(entity instanceof DriveBlockEntity driveEntity))
continue;

InternalInventory inventory = entity.getInternalInventory();
InternalInventory inventory = driveEntity.getInternalInventory();

for (int i = 0; i < inventory.size(); i++) {
ItemStack stack = inventory.getStackInSlot(i);
Expand Down

0 comments on commit 23d3b91

Please sign in to comment.