2014-02-23 02:28:52 +01:00
|
|
|
package appeng.integration.modules;
|
2014-02-15 07:40:02 +01:00
|
|
|
|
|
|
|
import ic2.api.energy.tile.IEnergyTile;
|
|
|
|
import ic2.api.recipe.RecipeInputItemStack;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraft.tileentity.TileEntity;
|
|
|
|
import net.minecraftforge.common.MinecraftForge;
|
|
|
|
import appeng.api.AEApi;
|
2014-02-23 23:50:53 +01:00
|
|
|
import appeng.api.config.TunnelType;
|
|
|
|
import appeng.api.features.IP2PTunnelRegistry;
|
2014-04-06 08:55:24 +02:00
|
|
|
import appeng.integration.BaseModule;
|
2014-02-15 07:40:02 +01:00
|
|
|
import appeng.integration.IIntegrationModule;
|
|
|
|
import appeng.integration.abstraction.IIC2;
|
|
|
|
|
2014-04-06 08:55:24 +02:00
|
|
|
public class IC2 extends BaseModule implements IIntegrationModule, IIC2
|
2014-02-15 07:40:02 +01:00
|
|
|
{
|
|
|
|
|
|
|
|
public static IC2 instance;
|
|
|
|
|
2014-04-06 08:55:24 +02:00
|
|
|
public IC2() {
|
|
|
|
TestClass( IEnergyTile.class );
|
|
|
|
}
|
|
|
|
|
2014-02-15 07:40:02 +01:00
|
|
|
@Override
|
|
|
|
public void Init()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void PostInit()
|
|
|
|
{
|
2014-02-23 23:50:53 +01:00
|
|
|
IP2PTunnelRegistry reg = AEApi.instance().registries().p2pTunnel();
|
|
|
|
reg.addNewAttunement( getItem( "copperCableItem" ), TunnelType.IC2_POWER );
|
|
|
|
reg.addNewAttunement( getItem( "insulatedCopperCableItem" ), TunnelType.IC2_POWER );
|
|
|
|
reg.addNewAttunement( getItem( "goldCableItem" ), TunnelType.IC2_POWER );
|
|
|
|
reg.addNewAttunement( getItem( "insulatedGoldCableItem" ), TunnelType.IC2_POWER );
|
|
|
|
reg.addNewAttunement( getItem( "ironCableItem" ), TunnelType.IC2_POWER );
|
|
|
|
reg.addNewAttunement( getItem( "insulatedIronCableItem" ), TunnelType.IC2_POWER );
|
|
|
|
reg.addNewAttunement( getItem( "insulatedTinCableItem" ), TunnelType.IC2_POWER );
|
|
|
|
reg.addNewAttunement( getItem( "glassFiberCableItem" ), TunnelType.IC2_POWER );
|
|
|
|
reg.addNewAttunement( getItem( "tinCableItem" ), TunnelType.IC2_POWER );
|
|
|
|
reg.addNewAttunement( getItem( "detectorCableItem" ), TunnelType.IC2_POWER );
|
|
|
|
reg.addNewAttunement( getItem( "splitterCableItem" ), TunnelType.IC2_POWER );
|
|
|
|
|
2014-02-25 04:55:09 +01:00
|
|
|
// this is gone?
|
|
|
|
// AEApi.instance().registries().matterCannon().registerAmmo( getItem( "uraniumDrop" ), 238.0289 );
|
2014-02-15 07:40:02 +01:00
|
|
|
}
|
|
|
|
|
2014-02-23 07:55:46 +01:00
|
|
|
@Override
|
|
|
|
public void maceratorRecipe(ItemStack in, ItemStack out)
|
2014-02-15 07:40:02 +01:00
|
|
|
{
|
|
|
|
ic2.api.recipe.Recipes.macerator.addRecipe( new RecipeInputItemStack( in, in.stackSize ), null, out );
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void addToEnergyNet(TileEntity appEngTile)
|
|
|
|
{
|
|
|
|
MinecraftForge.EVENT_BUS.post( new ic2.api.energy.event.EnergyTileLoadEvent( (IEnergyTile) appEngTile ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void removeFromEnergyNet(TileEntity appEngTile)
|
|
|
|
{
|
|
|
|
MinecraftForge.EVENT_BUS.post( new ic2.api.energy.event.EnergyTileUnloadEvent( (IEnergyTile) appEngTile ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ItemStack getItem(String name)
|
|
|
|
{
|
2014-02-23 02:28:52 +01:00
|
|
|
return ic2.api.item.IC2Items.getItem( name );
|
2014-02-15 07:40:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|