Skip to content

Commit

Permalink
Quick cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
aidancbrady committed Aug 9, 2014
1 parent 4d4926d commit a0b8ab0
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/main/java/mekanism/common/util/CableUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,12 @@
import buildcraft.api.mj.IBatteryObject;
import buildcraft.api.mj.MjAPI;
import buildcraft.api.power.IPowerEmitter;
import buildcraft.api.power.IPowerReceptor;
import cofh.api.energy.IEnergyConnection;
import cofh.api.energy.IEnergyHandler;

public final class CableUtils
{
private static Set<ForgeDirection> allSides;

static
{
allSides = EnumSet.allOf(ForgeDirection.class);
allSides.remove(ForgeDirection.UNKNOWN);
}
private static Set<ForgeDirection> allSides = EnumSet.complementOf(EnumSet.of(ForgeDirection.UNKNOWN));

/**
* Gets all the connected energy acceptors, whether IC2-based or BuildCraft-based, surrounding a specific tile entity.
Expand Down Expand Up @@ -152,6 +146,7 @@ public static boolean isOutputter(TileEntity tileEntity, ForgeDirection side)
return (tileEntity instanceof ICableOutputter && ((ICableOutputter)tileEntity).canOutputTo(side.getOpposite())) ||
(MekanismUtils.useIC2() && tileEntity instanceof IEnergySource && ((IEnergySource)tileEntity).emitsEnergyTo(null, side.getOpposite())) ||
(MekanismUtils.useRF() && tileEntity instanceof IEnergyHandler && ((IEnergyHandler)tileEntity).canConnectEnergy(side.getOpposite())) ||
(MekanismUtils.useRF() && tileEntity instanceof IEnergyConnection && ((IEnergyConnection)tileEntity).canConnectEnergy(side.getOpposite())) ||
(MekanismUtils.useBuildCraft() && tileEntity instanceof IPowerEmitter && ((IPowerEmitter)tileEntity).canEmitPowerFrom(side.getOpposite()));
}

Expand Down

0 comments on commit a0b8ab0

Please sign in to comment.