Fixes an issue when starting without IC2 being enabled.

This commit is contained in:
Sebastian Hartte 2016-10-28 20:45:58 +02:00 committed by shartte
parent 6e6e51dc20
commit f598fb3cc4

View file

@ -37,7 +37,7 @@ public class IC2 implements IIntegrationModule
@Reflected @Reflected
public static IC2 instance; public static IC2 instance;
private BiFunction<TileEntity, IExternalPowerSink, IC2PowerSink> powerSinkFactory = ( ( te, sink ) -> IC2PowerSinkStub.INSTANCE ); private static BiFunction<TileEntity, IExternalPowerSink, IC2PowerSink> powerSinkFactory = ( ( te, sink ) -> IC2PowerSinkStub.INSTANCE );
@Override @Override
public void init() throws Throwable public void init() throws Throwable
@ -55,6 +55,6 @@ public class IC2 implements IIntegrationModule
*/ */
public static IC2PowerSink createPowerSink( TileEntity tileEntity, IExternalPowerSink externalSink ) public static IC2PowerSink createPowerSink( TileEntity tileEntity, IExternalPowerSink externalSink )
{ {
return instance.powerSinkFactory.apply( tileEntity, externalSink ); return powerSinkFactory.apply( tileEntity, externalSink );
} }
} }