diff --git a/src/main/java/cr0s/warpdrive/machines/TileEntityAirGenerator.java b/src/main/java/cr0s/warpdrive/machines/TileEntityAirGenerator.java index d221d0dc..ad54c10e 100644 --- a/src/main/java/cr0s/warpdrive/machines/TileEntityAirGenerator.java +++ b/src/main/java/cr0s/warpdrive/machines/TileEntityAirGenerator.java @@ -116,16 +116,4 @@ public class TileEntityAirGenerator extends WarpEnergyTE { public boolean canInputEnergy(ForgeDirection from) { return true; } - - @Override - public int getSinkTier() { - // TODO Auto-generated method stub - return 3; - } - - @Override - public int getSourceTier() { - // TODO Auto-generated method stub - return 3; - } } diff --git a/src/main/java/cr0s/warpdrive/machines/TileEntityChunkLoader.java b/src/main/java/cr0s/warpdrive/machines/TileEntityChunkLoader.java index b1dd5673..8001d7e7 100644 --- a/src/main/java/cr0s/warpdrive/machines/TileEntityChunkLoader.java +++ b/src/main/java/cr0s/warpdrive/machines/TileEntityChunkLoader.java @@ -25,6 +25,8 @@ public class TileEntityChunkLoader extends WarpChunkTE implements IUpgradable public TileEntityChunkLoader() { super(); + IC2_sinkTier = 2; + IC2_sourceTier = 2; negDX = 0; negDZ = 0; posDX = 0; @@ -227,17 +229,4 @@ public class TileEntityChunkLoader extends WarpChunkTE implements IUpgradable { return upgrades; } - - @Override - public int getSinkTier() { - // TODO Auto-generated method stub - return 2; - } - - @Override - public int getSourceTier() { - // TODO Auto-generated method stub - return 2; - } - } diff --git a/src/main/java/cr0s/warpdrive/machines/TileEntityLaserReactorMonitor.java b/src/main/java/cr0s/warpdrive/machines/TileEntityLaserReactorMonitor.java index 868db8f2..5354a5f4 100644 --- a/src/main/java/cr0s/warpdrive/machines/TileEntityLaserReactorMonitor.java +++ b/src/main/java/cr0s/warpdrive/machines/TileEntityLaserReactorMonitor.java @@ -21,6 +21,12 @@ public class TileEntityLaserReactorMonitor extends TileEntityAbstractLaser { private final int workRate = 10; private int ticks = 0; + public TileEntityLaserReactorMonitor() { + super(); + IC2_sinkTier = 2; + IC2_sourceTier = 2; + } + private Set findReactors() {//returns either IReactor or IReactorChamber tile entity int[] xD = {-2, 2, 0, 0, 0, 0}; int[] yD = { 0, 0,-2, 2, 0, 0}; @@ -133,16 +139,4 @@ public class TileEntityLaserReactorMonitor extends TileEntityAbstractLaser { public boolean canInputEnergy(ForgeDirection from) { return true; } - - @Override - public int getSinkTier() { - // TODO Auto-generated method stub - return 2; - } - - @Override - public int getSourceTier() { - // TODO Auto-generated method stub - return 2; - } } diff --git a/src/main/java/cr0s/warpdrive/machines/TileEntityLaserTreeFarm.java b/src/main/java/cr0s/warpdrive/machines/TileEntityLaserTreeFarm.java index 8bdbe37f..cc863780 100644 --- a/src/main/java/cr0s/warpdrive/machines/TileEntityLaserTreeFarm.java +++ b/src/main/java/cr0s/warpdrive/machines/TileEntityLaserTreeFarm.java @@ -35,6 +35,8 @@ public class TileEntityLaserTreeFarm extends TileEntityAbstractMiner { public TileEntityLaserTreeFarm() { super(); + IC2_sinkTier = 2; + IC2_sourceTier = 2; peripheralName = "treefarmLaser"; methodsArray = new String[] { "start", @@ -341,16 +343,4 @@ public class TileEntityLaserTreeFarm extends TileEntityAbstractMiner { protected float getColorB() { return 0.4f; } - - @Override - public int getSinkTier() { - // TODO Auto-generated method stub - return 2; - } - - @Override - public int getSourceTier() { - // TODO Auto-generated method stub - return 2; - } } diff --git a/src/main/java/cr0s/warpdrive/machines/TileEntityLift.java b/src/main/java/cr0s/warpdrive/machines/TileEntityLift.java index 4c479b82..94f8716c 100644 --- a/src/main/java/cr0s/warpdrive/machines/TileEntityLift.java +++ b/src/main/java/cr0s/warpdrive/machines/TileEntityLift.java @@ -36,6 +36,8 @@ public class TileEntityLift extends WarpEnergyTE { public TileEntityLift() { super(); + IC2_sinkTier = 2; + IC2_sourceTier = 2; peripheralName = "warpdriveLaserLift"; methodsArray = new String[] { "getEnergyLevel", "mode", "active", "help" }; @@ -272,16 +274,4 @@ public class TileEntityLift extends WarpEnergyTE { } return null; } - - @Override - public int getSinkTier() { - // TODO Arbitrarily chosen value - return 2; - } - - @Override - public int getSourceTier() { - // TODO Arbitrarily chosen value - return 2; - } } diff --git a/src/main/java/cr0s/warpdrive/machines/TileEntityParticleBooster.java b/src/main/java/cr0s/warpdrive/machines/TileEntityParticleBooster.java index 54a90558..a88f7778 100644 --- a/src/main/java/cr0s/warpdrive/machines/TileEntityParticleBooster.java +++ b/src/main/java/cr0s/warpdrive/machines/TileEntityParticleBooster.java @@ -46,16 +46,4 @@ public class TileEntityParticleBooster extends WarpEnergyTE { public boolean canInputEnergy(ForgeDirection from) { return true; } - - @Override - public int getSinkTier() { - // TODO Auto-generated method stub - return 3; - } - - @Override - public int getSourceTier() { - // TODO Auto-generated method stub - return 3; - } } diff --git a/src/main/java/cr0s/warpdrive/machines/TileEntityPowerLaser.java b/src/main/java/cr0s/warpdrive/machines/TileEntityPowerLaser.java index 6460e2ba..cf01ae0b 100644 --- a/src/main/java/cr0s/warpdrive/machines/TileEntityPowerLaser.java +++ b/src/main/java/cr0s/warpdrive/machines/TileEntityPowerLaser.java @@ -192,17 +192,4 @@ public class TileEntityPowerLaser extends TileEntityAbstractLaser implements IBl } return null; } - - // IC2 methods - @Override - public int getSinkTier() { - // TODO Auto-generated method stub - return 3; - } - - @Override - public int getSourceTier() { - // TODO Auto-generated method stub - return 3; - } } \ No newline at end of file diff --git a/src/main/java/cr0s/warpdrive/machines/TileEntityPowerReactor.java b/src/main/java/cr0s/warpdrive/machines/TileEntityPowerReactor.java index 5b60b474..02a6e5cb 100644 --- a/src/main/java/cr0s/warpdrive/machines/TileEntityPowerReactor.java +++ b/src/main/java/cr0s/warpdrive/machines/TileEntityPowerReactor.java @@ -535,16 +535,4 @@ public class TileEntityPowerReactor extends WarpEnergyTE implements IBlockUpdate worldObj == null ? "~NULL~" : worldObj.getWorldInfo().getWorldName(), Double.valueOf(xCoord), Double.valueOf(yCoord), Double.valueOf(zCoord) }); } - - @Override - public int getSinkTier() { - // TODO Auto-generated method stub - return 3; - } - - @Override - public int getSourceTier() { - // TODO Auto-generated method stub - return 3; - } } \ No newline at end of file diff --git a/src/main/java/cr0s/warpdrive/machines/TileEntityPowerStore.java b/src/main/java/cr0s/warpdrive/machines/TileEntityPowerStore.java index b06b0e4b..3881daf1 100644 --- a/src/main/java/cr0s/warpdrive/machines/TileEntityPowerStore.java +++ b/src/main/java/cr0s/warpdrive/machines/TileEntityPowerStore.java @@ -9,6 +9,8 @@ public class TileEntityPowerStore extends WarpEnergyTE { public TileEntityPowerStore() { super(); + IC2_sinkTier = 0; + IC2_sourceTier = 0; peripheralName = "warpdrivePowerStore"; methodsArray = new String[] { "getEnergyLevel" @@ -59,16 +61,4 @@ public class TileEntityPowerStore extends WarpEnergyTE { public void detach(IComputerAccess computer) { // nothing to see here } - - @Override - public int getSinkTier() { - // TODO Auto-generated method stub - return 0; - } - - @Override - public int getSourceTier() { - // TODO Auto-generated method stub - return 0; - } } \ No newline at end of file diff --git a/src/main/java/cr0s/warpdrive/machines/TileEntityRadar.java b/src/main/java/cr0s/warpdrive/machines/TileEntityRadar.java index 87f88464..452c906b 100644 --- a/src/main/java/cr0s/warpdrive/machines/TileEntityRadar.java +++ b/src/main/java/cr0s/warpdrive/machines/TileEntityRadar.java @@ -203,16 +203,4 @@ public class TileEntityRadar extends WarpEnergyTE { public boolean canInputEnergy(ForgeDirection from) { return true; } - - @Override - public int getSinkTier() { - // TODO Arbitrarily chosen value - return 3; - } - - @Override - public int getSourceTier() { - // TODO Arbitrarily chosen value - return 3; - } } diff --git a/src/main/java/cr0s/warpdrive/machines/TileEntityReactor.java b/src/main/java/cr0s/warpdrive/machines/TileEntityReactor.java index 36ac2f9b..65bc0052 100644 --- a/src/main/java/cr0s/warpdrive/machines/TileEntityReactor.java +++ b/src/main/java/cr0s/warpdrive/machines/TileEntityReactor.java @@ -1090,16 +1090,4 @@ public class TileEntityReactor extends WarpEnergyTE { new Object[] { getClass().getSimpleName(), coreFrequency, worldObj == null ? "~NULL~" : worldObj.getWorldInfo().getWorldName(), Integer.valueOf(xCoord), Integer.valueOf(yCoord), Integer.valueOf(zCoord) }); } - - @Override - public int getSinkTier() { - // TODO Auto-generated method stub - return 3; - } - - @Override - public int getSourceTier() { - // TODO Auto-generated method stub - return 3; - } } diff --git a/src/main/java/cr0s/warpdrive/machines/TileEntityShipScanner.java b/src/main/java/cr0s/warpdrive/machines/TileEntityShipScanner.java index 4a1666e5..4011ef3c 100644 --- a/src/main/java/cr0s/warpdrive/machines/TileEntityShipScanner.java +++ b/src/main/java/cr0s/warpdrive/machines/TileEntityShipScanner.java @@ -616,14 +616,4 @@ public class TileEntityShipScanner extends WarpEnergyTE { public boolean canInputEnergy(ForgeDirection from) { return true; } - - @Override - public int getSinkTier() { - return 3; - } - - @Override - public int getSourceTier() { - return 3; - } } diff --git a/src/main/java/cr0s/warpdrive/machines/TileEntityTransporter.java b/src/main/java/cr0s/warpdrive/machines/TileEntityTransporter.java index 3e3880ee..bd79f931 100644 --- a/src/main/java/cr0s/warpdrive/machines/TileEntityTransporter.java +++ b/src/main/java/cr0s/warpdrive/machines/TileEntityTransporter.java @@ -40,7 +40,9 @@ public class TileEntityTransporter extends WarpEnergyTE implements IUpgradable { public TileEntityTransporter() { super(); - peripheralName = "transporter"; + IC2_sinkTier = 2; + IC2_sourceTier = 2; + peripheralName = "warpdriveTransporter"; methodsArray = new String[] { "source", "dest", "lock", "release", "lockStrength", "energize", "getEnergyLevel", "powerBoost", "energyCost", "upgrades", "help" }; } @@ -454,16 +456,4 @@ public class TileEntityTransporter extends WarpEnergyTE implements IUpgradable { public Map getInstalledUpgrades() { return upgrades; } - - @Override - public int getSinkTier() { - // TODO Auto-generated method stub - return 2; - } - - @Override - public int getSourceTier() { - // TODO Auto-generated method stub - return 2; - } } diff --git a/src/main/java/cr0s/warpdrive/machines/WarpEnergyTE.java b/src/main/java/cr0s/warpdrive/machines/WarpEnergyTE.java index 7d3f1944..65a0371c 100644 --- a/src/main/java/cr0s/warpdrive/machines/WarpEnergyTE.java +++ b/src/main/java/cr0s/warpdrive/machines/WarpEnergyTE.java @@ -7,7 +7,6 @@ import ic2.api.energy.event.EnergyTileUnloadEvent; import ic2.api.energy.tile.IEnergySink; import ic2.api.energy.tile.IEnergySource; import cofh.api.energy.IEnergyHandler; - import li.cil.oc.api.machine.Arguments; import li.cil.oc.api.machine.Callback; import li.cil.oc.api.machine.Context; @@ -31,6 +30,8 @@ public abstract class WarpEnergyTE extends WarpInterfacedTE implements IEnergyHa protected int energyStored_internal = 0; private static final double EU_PER_INTERNAL = 1.0D; private static final double RF_PER_INTERNAL = 1800.0D / 437.5D; + protected int IC2_sinkTier = 3; + protected int IC2_sourceTier = 3; private int scanTickCount = -1; @@ -280,6 +281,18 @@ public abstract class WarpEnergyTE extends WarpInterfacedTE implements IEnergyHa } } + @Override + @Optional.Method(modid = "IC2") + public int getSinkTier() { + return IC2_sinkTier; + } + + @Override + @Optional.Method(modid = "IC2") + public int getSourceTier() { + return IC2_sourceTier; + } + // ThermalExpansion IEnergyHandler interface