Did what I could with mj6
This commit is contained in:
@@ -109,7 +109,8 @@ public class BC extends BaseModule implements IBC
|
||||
{
|
||||
if ( is == null )
|
||||
return false;
|
||||
return is.getItem() instanceof ItemFacade;
|
||||
|
||||
return is.getItem() instanceof ItemFacade && ItemFacade.getType( is ) == ItemFacade.TYPE_BASIC;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -189,7 +190,7 @@ public class BC extends BaseModule implements IBC
|
||||
addFacade( b.blockQuartz.stack( 1 ) );
|
||||
addFacade( b.blockQuartzChiseled.stack( 1 ) );
|
||||
addFacade( b.blockQuartzPiller.stack( 1 ) );
|
||||
|
||||
|
||||
Block skyStone = b.blockSkyStone.block();
|
||||
if ( skyStone != null )
|
||||
{
|
||||
@@ -211,8 +212,27 @@ public class BC extends BaseModule implements IBC
|
||||
@Override
|
||||
public IFacadePart createFacadePart(Block blk, int meta, ForgeDirection side)
|
||||
{
|
||||
ItemStack fs = ItemFacade.getStack( blk, meta );
|
||||
return new FacadePart( fs, side );
|
||||
try
|
||||
{
|
||||
ItemStack fs = ItemFacade.getFacade( blk, meta );
|
||||
return new FacadePart( fs, side );
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
ItemStack fs = ItemFacade.getStack( blk, meta );
|
||||
return new FacadePart( fs, side );
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -224,8 +244,31 @@ public class BC extends BaseModule implements IBC
|
||||
@Override
|
||||
public ItemStack getTextureForFacade(ItemStack facade)
|
||||
{
|
||||
Block blk = ItemFacade.getBlock( facade );
|
||||
return new ItemStack( blk, 1, ItemFacade.getMetaData( facade ) );
|
||||
try
|
||||
{
|
||||
Block blk[] = ItemFacade.getBlocks( facade );
|
||||
int meta[] = ItemFacade.getMetaValues( facade );
|
||||
if ( blk == null || blk.length < 1 )
|
||||
return null;
|
||||
|
||||
return new ItemStack( blk[0], 1, meta[0] );
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Block blk = ItemFacade.getBlock( facade );
|
||||
return new ItemStack( blk, 1, ItemFacade.getMetaData( facade ) );
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
package appeng.integration.modules;
|
||||
|
||||
import appeng.integration.BaseModule;
|
||||
import appeng.integration.abstraction.IMJ;
|
||||
import appeng.integration.abstraction.IMJ5;
|
||||
import appeng.integration.modules.helpers.MJPerdition;
|
||||
import appeng.tile.powersink.MinecraftJoules;
|
||||
import appeng.tile.powersink.MinecraftJoules5;
|
||||
import buildcraft.api.power.IPowerReceptor;
|
||||
|
||||
public class MJ extends BaseModule implements IMJ
|
||||
public class MJ5 extends BaseModule implements IMJ5
|
||||
{
|
||||
|
||||
public static MJ instance;
|
||||
public static MJ5 instance;
|
||||
|
||||
public MJ() {
|
||||
public MJ5() {
|
||||
TestClass( IPowerReceptor.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object createPerdition(MinecraftJoules buildCraft)
|
||||
public Object createPerdition(MinecraftJoules5 buildCraft)
|
||||
{
|
||||
if ( buildCraft instanceof IPowerReceptor )
|
||||
return new MJPerdition( buildCraft );
|
||||
@@ -0,0 +1,26 @@
|
||||
package appeng.integration.modules;
|
||||
|
||||
import appeng.integration.BaseModule;
|
||||
import appeng.integration.abstraction.IMJ6;
|
||||
import buildcraft.api.mj.IBatteryObject;
|
||||
|
||||
public class MJ6 extends BaseModule implements IMJ6
|
||||
{
|
||||
|
||||
public static MJ6 instance;
|
||||
|
||||
public MJ6() {
|
||||
TestClass( IBatteryObject.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Init() throws Throwable
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void PostInit() throws Throwable
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package appeng.integration.modules.helpers;
|
||||
|
||||
|
||||
public class MJBattery
|
||||
{
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user