Further StorageChannel refactoring (#3152)
Updated Drives to support more than Item and Fluid cells. Use Collections.emptyList() instead of creating empty ArrayLists. Fixes a NPE with uninitialized ME Chests. Fixes #3150
This commit is contained in:
@@ -643,14 +643,19 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, ITerminal
|
||||
{
|
||||
try
|
||||
{
|
||||
return Collections.singletonList( this.getHandler( channel ) );
|
||||
final IMEInventoryHandler handler = this.getHandler( channel );
|
||||
|
||||
if( handler != null )
|
||||
{
|
||||
return Collections.singletonList( handler );
|
||||
}
|
||||
}
|
||||
catch( final ChestNoHandler e )
|
||||
{
|
||||
// :P
|
||||
}
|
||||
}
|
||||
return new ArrayList<>();
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user