Fixed Bug: #0165 - DSU Crash.
This commit is contained in:
parent
f6a7e01d7f
commit
c50535ab21
6 changed files with 26 additions and 10 deletions
10
integration/BaseModule.java
Normal file
10
integration/BaseModule.java
Normal file
|
@ -0,0 +1,10 @@
|
|||
package appeng.integration;
|
||||
|
||||
public class BaseModule {
|
||||
|
||||
protected void TestClass( Class clz )
|
||||
{
|
||||
clz.isInstance(this);
|
||||
}
|
||||
|
||||
}
|
|
@ -12,12 +12,15 @@ import appeng.api.config.TunnelType;
|
|||
import appeng.api.features.IP2PTunnelRegistry;
|
||||
import appeng.api.parts.IFacadePart;
|
||||
import appeng.facade.FacadePart;
|
||||
import appeng.integration.BaseModule;
|
||||
import appeng.integration.IIntegrationModule;
|
||||
import appeng.integration.abstraction.IBC;
|
||||
import appeng.integration.modules.helpers.BCPipeHandler;
|
||||
import appeng.integration.modules.helpers.MJPerdition;
|
||||
import buildcraft.BuildCraftEnergy;
|
||||
import buildcraft.BuildCraftTransport;
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
import buildcraft.api.transport.IPipeConnection;
|
||||
import buildcraft.api.transport.IPipeTile;
|
||||
import buildcraft.api.transport.IPipeTile.PipeType;
|
||||
import buildcraft.transport.ItemFacade;
|
||||
|
@ -25,7 +28,7 @@ import buildcraft.transport.PipeIconProvider;
|
|||
import buildcraft.transport.TileGenericPipe;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
|
||||
public class BC implements IIntegrationModule, IBC
|
||||
public class BC extends BaseModule implements IIntegrationModule, IBC
|
||||
{
|
||||
|
||||
public static BC instance;
|
||||
|
@ -173,6 +176,10 @@ public class BC implements IIntegrationModule, IBC
|
|||
@Override
|
||||
public void Init()
|
||||
{
|
||||
TestClass(IPipeConnection.class);
|
||||
TestClass(ItemFacade.class);
|
||||
TestClass(IToolWrench.class);
|
||||
|
||||
AEApi.instance().partHelper().registerNewLayer( "appeng.api.parts.layers.LayerIPipeConnection", "buildcraft.api.transport.IPipeConnection" );
|
||||
AEApi.instance().registries().externalStorage().addExternalStorageInterface( new BCPipeHandler() );
|
||||
}
|
||||
|
|
|
@ -4,12 +4,13 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import powercrystals.minefactoryreloaded.api.IDeepStorageUnit;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.integration.BaseModule;
|
||||
import appeng.integration.IIntegrationModule;
|
||||
import appeng.integration.abstraction.IDSU;
|
||||
import appeng.integration.modules.helpers.MFRDSU;
|
||||
import appeng.integration.modules.helpers.MFRDSUHandler;
|
||||
|
||||
public class DSU implements IIntegrationModule, IDSU
|
||||
public class DSU extends BaseModule implements IIntegrationModule, IDSU
|
||||
{
|
||||
|
||||
public static DSU instance;
|
||||
|
@ -31,7 +32,7 @@ public class DSU implements IIntegrationModule, IDSU
|
|||
@Override
|
||||
public void Init()
|
||||
{
|
||||
|
||||
TestClass(IDeepStorageUnit.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package appeng.integration.modules;
|
||||
|
||||
import appeng.integration.BaseModule;
|
||||
import appeng.integration.IIntegrationModule;
|
||||
import appeng.integration.abstraction.IMJ;
|
||||
import appeng.integration.abstraction.helpers.BaseMJperdition;
|
||||
|
@ -7,7 +8,7 @@ import appeng.integration.modules.helpers.MJPerdition;
|
|||
import appeng.tile.powersink.BuildCraft;
|
||||
import buildcraft.api.power.IPowerReceptor;
|
||||
|
||||
public class MJ implements IIntegrationModule, IMJ
|
||||
public class MJ extends BaseModule implements IIntegrationModule, IMJ
|
||||
{
|
||||
|
||||
public static MJ instance;
|
||||
|
@ -23,10 +24,7 @@ public class MJ implements IIntegrationModule, IMJ
|
|||
@Override
|
||||
public void Init() throws Throwable
|
||||
{
|
||||
if ( ((Object) this) instanceof MJPerdition )
|
||||
{
|
||||
|
||||
}
|
||||
TestClass(MJPerdition.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -49,7 +49,7 @@ public class BCPipeInventory implements IMEInventory<IAEItemStack>
|
|||
}
|
||||
|
||||
@Override
|
||||
public IItemList<IAEItemStack> getAvailableItems(IItemList out)
|
||||
public IItemList<IAEItemStack> getAvailableItems(IItemList<IAEItemStack> out)
|
||||
{
|
||||
return out;
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ public class MFRDSU implements IMEInventory<IAEItemStack>
|
|||
}
|
||||
|
||||
@Override
|
||||
public IItemList<IAEItemStack> getAvailableItems(IItemList out)
|
||||
public IItemList<IAEItemStack> getAvailableItems(IItemList<IAEItemStack> out)
|
||||
{
|
||||
ItemStack is = dsu.getStoredItemType();
|
||||
if ( is != null )
|
||||
|
|
Loading…
Reference in a new issue