Added BetterStorage Integration for Storage Crates
Also some old integration clean up.
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
package appeng.integration.modules.dead;
|
||||
package appeng.integration.modules;
|
||||
|
||||
import net.mcft.copy.betterstorage.api.ICrateStorage;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.integration.IIntegrationModule;
|
||||
import appeng.integration.abstraction.IBS;
|
||||
import appeng.integration.modules.helpers.dead.BSCrateHandler;
|
||||
import appeng.integration.modules.helpers.dead.BSCrateStorageAdaptor;
|
||||
import appeng.integration.abstraction.IBetterStorage;
|
||||
import appeng.integration.modules.helpers.BSCrateHandler;
|
||||
import appeng.integration.modules.helpers.BSCrateStorageAdaptor;
|
||||
import appeng.util.InventoryAdaptor;
|
||||
|
||||
public class BS implements IIntegrationModule, IBS
|
||||
public class BetterStorage implements IIntegrationModule, IBetterStorage
|
||||
{
|
||||
|
||||
public static BS instance;
|
||||
public static BetterStorage instance;
|
||||
|
||||
@Override
|
||||
public boolean isStorageCrate(Object te)
|
||||
@@ -1,41 +0,0 @@
|
||||
package appeng.integration.modules.dead;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.integration.IIntegrationModule;
|
||||
|
||||
public class Mekanism implements IIntegrationModule
|
||||
{
|
||||
|
||||
public static Mekanism instance;
|
||||
|
||||
@Override
|
||||
public void Init()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void PostInit()
|
||||
{
|
||||
// certus quartz
|
||||
crusher( AEApi.instance().materials().materialCertusQuartzCrystal.stack( 1 ),
|
||||
AEApi.instance().materials().materialCertusQuartzDust.stack( 1 ) );
|
||||
|
||||
crusher( AEApi.instance().materials().materialCertusQuartzCrystalCharged.stack( 1 ),
|
||||
AEApi.instance().materials().materialCertusQuartzDust.stack( 1 ) );
|
||||
|
||||
// fluix
|
||||
crusher( AEApi.instance().materials().materialFluixCrystal.stack( 1 ), AEApi.instance().materials().materialFluixDust.stack( 1 ) );
|
||||
|
||||
// nether quartz
|
||||
crusher( new ItemStack( Item.netherQuartz ), AEApi.instance().materials().materialNetherQuartzDust.stack( 1 ) );
|
||||
}
|
||||
|
||||
private void crusher(ItemStack input, ItemStack output)
|
||||
{
|
||||
mekanism.api.RecipeHelper.addCrusherRecipe( input, output );
|
||||
}
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
package appeng.integration.modules;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.integration.BaseModule;
|
||||
import appeng.integration.IIntegrationModule;
|
||||
import appeng.integration.abstraction.ITE;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
|
||||
public class TE extends BaseModule implements IIntegrationModule, ITE
|
||||
{
|
||||
|
||||
public static TE instance;
|
||||
|
||||
@Override
|
||||
public void Init()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void PostInit()
|
||||
{
|
||||
// certus quartz
|
||||
pulverizer( AEApi.instance().materials().materialCertusQuartzCrystal.stack( 1 ), AEApi.instance().materials().materialCertusQuartzDust.stack( 1 ) );
|
||||
|
||||
pulverizer( AEApi.instance().materials().materialCertusQuartzCrystalCharged.stack( 1 ), AEApi.instance().materials().materialCertusQuartzDust.stack( 1 ) );
|
||||
|
||||
// fluix
|
||||
pulverizer( AEApi.instance().materials().materialFluixCrystal.stack( 1 ), AEApi.instance().materials().materialFluixDust.stack( 1 ) );
|
||||
|
||||
// nether quartz
|
||||
pulverizer( new ItemStack( Item.netherQuartz ), AEApi.instance().materials().materialNetherQuartzDust.stack( 1 ) );
|
||||
}
|
||||
|
||||
private void pulverizer(ItemStack in, ItemStack out)
|
||||
{
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
toSend.setInteger( "energy", 3200 );
|
||||
toSend.setTag( "input", new NBTTagCompound() );
|
||||
toSend.setTag( "primaryOutput", new NBTTagCompound() );
|
||||
|
||||
in.writeToNBT( toSend.getCompoundTag( "input" ) );
|
||||
out.writeToNBT( toSend.getCompoundTag( "primaryOutput" ) );
|
||||
FMLInterModComms.sendMessage( "ThermalExpansion", "PulverizerRecipe", toSend );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack addItemsToPipe(TileEntity ad, ItemStack itemstack, ForgeDirection dir)
|
||||
{
|
||||
return ((IItemConduit) ad).insertItem( dir, itemstack );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addPulverizerRecipe(int i, ItemStack blkQuartz, ItemStack blockDust)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addPulverizerRecipe(int i, ItemStack blkQuartzOre, ItemStack matQuartz, ItemStack matQuartzDust)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPipe(TileEntity te, ForgeDirection opposite)
|
||||
{
|
||||
return te instanceof IItemConduit;
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package appeng.integration.modules.helpers.dead;
|
||||
package appeng.integration.modules.helpers;
|
||||
|
||||
import net.mcft.copy.betterstorage.api.ICrateStorage;
|
||||
import net.minecraft.item.ItemStack;
|
||||
+6
-5
@@ -1,8 +1,9 @@
|
||||
package appeng.integration.modules.helpers.dead;
|
||||
package appeng.integration.modules.helpers;
|
||||
|
||||
import net.mcft.copy.betterstorage.api.ICrateStorage;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
import appeng.api.storage.IExternalStorageHandler;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.api.storage.StorageChannel;
|
||||
@@ -11,15 +12,15 @@ public class BSCrateHandler implements IExternalStorageHandler
|
||||
{
|
||||
|
||||
@Override
|
||||
public boolean canHandle(TileEntity te, ForgeDirection d, StorageChannel chan)
|
||||
public boolean canHandle(TileEntity te, ForgeDirection d, StorageChannel channel, BaseActionSource mySrc)
|
||||
{
|
||||
return chan == StorageChannel.ITEMS && te instanceof ICrateStorage;
|
||||
return channel == StorageChannel.ITEMS && te instanceof ICrateStorage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMEInventory getInventory(TileEntity te, ForgeDirection d, StorageChannel chan)
|
||||
public IMEInventory getInventory(TileEntity te, ForgeDirection d, StorageChannel channel, BaseActionSource src)
|
||||
{
|
||||
if ( chan == StorageChannel.ITEMS )
|
||||
if ( channel == StorageChannel.ITEMS )
|
||||
return new BSCrate( te, ForgeDirection.UNKNOWN );
|
||||
return null;
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package appeng.integration.modules.helpers.dead;
|
||||
package appeng.integration.modules.helpers;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
Reference in New Issue
Block a user