File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/main/java/de/srendi/advancedperipherals/common/addons/appliedenergistics Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -562,11 +562,11 @@ public static List<Object> listCells(IGridNode node) {
562
562
563
563
if (!iterator .hasNext ()) return items ;
564
564
while (iterator .hasNext ()) {
565
- DriveBlockEntity entity = ( DriveBlockEntity ) iterator .next ().getService (IStorageProvider .class );
566
- if (entity == null )
565
+ IStorageProvider entity = iterator .next ().getService (IStorageProvider .class );
566
+ if (entity == null || !( entity instanceof DriveBlockEntity drive ) )
567
567
continue ;
568
568
569
- InternalInventory inventory = entity .getInternalInventory ();
569
+ InternalInventory inventory = drive .getInternalInventory ();
570
570
571
571
for (int i = 0 ; i < inventory .size (); i ++) {
572
572
ItemStack stack = inventory .getStackInSlot (i );
You can’t perform that action at this time.
0 commit comments