Refactored IC2 tiers so API remains to base class
This commit is contained in:
parent
c2f2259d82
commit
a97e0ccf6c
14 changed files with 31 additions and 158 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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<Object> 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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<EnumUpgradeTypes, Integer> 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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue