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:
@@ -20,6 +20,7 @@ package appeng.parts.automation;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -400,11 +401,11 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine
|
||||
{
|
||||
if( this.getProxy().isActive() && channel == AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) )
|
||||
{
|
||||
final List<IMEInventoryHandler> Handler = new ArrayList<>( 1 );
|
||||
Handler.add( this.myHandler );
|
||||
return Handler;
|
||||
final List<IMEInventoryHandler> handler = new ArrayList<>( 1 );
|
||||
handler.add( this.myHandler );
|
||||
return handler;
|
||||
}
|
||||
return new ArrayList<>();
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user