mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 12:59:41 +00:00
Only use the EnergyNet-related interfaces if IC2 itself is loaded.
Also add some extra safety to useIC2(). Conflicts: src/main/java/mekanism/common/util/MekanismUtils.java
This commit is contained in:
1 parent
26dadfe176
commit
b25d8f673b
4 files changed
+23
-22
No files matched your search
@@ -27,7 +27,7 @@ import dan200.computercraft.api.peripheral.IPeripheral;
|
||||
|
||||
@InterfaceList({
|
||||
@Interface(iface = "buildcraft.api.power.IPowerReceptor", modid = "BuildCraftAPI|power"),
|
||||
@Interface(iface = "ic2.api.energy.tile.IEnergySink", modid = "IC2API", striprefs = true),
|
||||
@Interface(iface = "ic2.api.energy.tile.IEnergySink", modid = "IC2"),
|
||||
@Interface(iface = "cofh.api.energy.IEnergyHandler", modid = "CoFHAPI|energy"),
|
||||
@Interface(iface = "dan200.computercraft.api.peripheral.IPeripheral", modid = "ComputerCraft")
|
||||
})
|
||||
@@ -194,7 +194,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "IC2API")
|
||||
@Method(modid = "IC2")
|
||||
public boolean acceptsEnergyFrom(TileEntity emitter, ForgeDirection direction)
|
||||
{
|
||||
if(getInv() == null)
|
||||
@@ -357,7 +357,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "IC2API")
|
||||
@Method(modid = "IC2")
|
||||
public double getDemandedEnergy()
|
||||
{
|
||||
if(getInv() == null)
|
||||
@@ -369,7 +369,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "IC2API")
|
||||
@Method(modid = "IC2")
|
||||
public double injectEnergy(ForgeDirection directionFrom, double amount, double voltage)
|
||||
{
|
||||
if(getInv() == null)
|
||||
@@ -381,7 +381,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "IC2API")
|
||||
@Method(modid = "IC2")
|
||||
public int getSinkTier()
|
||||
{
|
||||
if(getInv() == null)
|
||||
|
||||
Reference in new issue
Block a user