Quick cleanup
This commit is contained in:
parent
4d4926d0df
commit
a0b8ab0331
1 changed files with 3 additions and 8 deletions
|
@ -22,18 +22,12 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||
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.
|
||||
|
@ -152,6 +146,7 @@ public final class CableUtils
|
|||
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()));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue