Use Cable from EiO to attune redstone flux.

This commit is contained in:
AlgorithmX2 2014-05-02 00:22:22 -05:00
parent cd5e4caf7b
commit da764470a4
2 changed files with 20 additions and 0 deletions

View file

@ -6,6 +6,7 @@ import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.oredict.OreDictionary;
import appeng.api.AEApi;
import appeng.api.config.TunnelType;
import appeng.api.definitions.Parts;
@ -84,6 +85,9 @@ public class P2PTunnelRegistry implements IP2PTunnelRegistry
for (ItemStack is : Tunnels.keySet())
{
if ( is.getItem() == trigger.getItem() && is.getItemDamage() == OreDictionary.WILDCARD_VALUE )
return Tunnels.get( is );
if ( Platform.isSameItem( is, trigger ) )
return Tunnels.get( is );
}

View file

@ -1,7 +1,13 @@
package appeng.integration.modules;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import appeng.api.AEApi;
import appeng.api.config.TunnelType;
import appeng.api.features.IP2PTunnelRegistry;
import appeng.integration.BaseModule;
import appeng.integration.IIntegrationModule;
import cpw.mods.fml.common.registry.GameRegistry;
public class RF extends BaseModule implements IIntegrationModule
{
@ -15,7 +21,17 @@ public class RF extends BaseModule implements IIntegrationModule
@Override
public void Init()
{
IP2PTunnelRegistry reg = AEApi.instance().registries().p2pTunnel();
ItemStack energyConduit = GameRegistry.findItemStack( "EnderIO", "itemPowerConduit", 1 );
if ( energyConduit != null )
{
energyConduit.setItemDamage( OreDictionary.WILDCARD_VALUE );
reg.addNewAttunement( energyConduit, TunnelType.RF_POWER );
}
reg.addNewAttunement( GameRegistry.findItemStack( "EnderIO", "blockCapacitorBank", 1 ), TunnelType.RF_POWER );
reg.addNewAttunement( GameRegistry.findItemStack( "EnderIO", "blockPowerMonitor", 1 ), TunnelType.RF_POWER );
}
@Override