This commit is contained in:
Aidan C. Brady 2014-08-17 21:36:23 -04:00
commit b408154e63
9 changed files with 13 additions and 105 deletions

View file

@ -421,31 +421,6 @@ public class GasNetwork extends DynamicNetwork<IGasHandler, GasNetwork>
return true;
}
@Override
protected GasNetwork create(IGridTransmitter<GasNetwork>... varTransmitters)
{
GasNetwork network = new GasNetwork(varTransmitters);
network.refGas = refGas;
if(gasStored != null)
{
if(network.gasStored == null)
{
network.gasStored = gasStored;
}
else {
network.gasStored.amount += gasStored.amount;
}
}
network.gasScale = network.getScale();
gasScale = 0;
refGas = null;
gasStored = null;
return network;
}
@Override
protected GasNetwork create(Collection<IGridTransmitter<GasNetwork>> collection)
{
@ -464,16 +439,10 @@ public class GasNetwork extends DynamicNetwork<IGasHandler, GasNetwork>
}
network.gasScale = network.getScale();
network.updateCapacity();
return network;
}
@Override
protected GasNetwork create(Set<GasNetwork> networks)
{
return new GasNetwork(networks);
}
@Override
public TransmissionType getTransmissionType()
{

View file

@ -42,12 +42,8 @@ public abstract class DynamicNetwork<A, N extends DynamicNetwork<A, N>> implemen
protected boolean needsUpdate = false;
protected abstract ITransmitterNetwork<A, N> create(IGridTransmitter<N>... varTransmitters);
protected abstract ITransmitterNetwork<A, N> create(Collection<IGridTransmitter<N>> collection);
protected abstract ITransmitterNetwork<A, N> create(Set<N> networks);
protected void clearAround(IGridTransmitter<N> transmitter)
{
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)

View file

@ -237,7 +237,7 @@ public class RenderPartTransmitter implements IIconSelfRegister
return;
}
GL11.glPushMatrix();
push();
CCRenderState.reset();
CCRenderState.useNormals = true;
CCRenderState.startDrawing();
@ -256,7 +256,7 @@ public class RenderPartTransmitter implements IIconSelfRegister
MekanismRenderer.disableCullFace();
MekanismRenderer.glowOff();
GL11.glPopMatrix();
pop();
}
public void renderContents(PartMechanicalPipe pipe, Vector3 pos)
@ -468,7 +468,7 @@ public class RenderPartTransmitter implements IIconSelfRegister
return;
}
GL11.glPushMatrix();
push();
CCRenderState.reset();
CCRenderState.useNormals = true;
CCRenderState.startDrawing();
@ -486,7 +486,7 @@ public class RenderPartTransmitter implements IIconSelfRegister
MekanismRenderer.disableCullFace();
MekanismRenderer.glowOff();
GL11.glPopMatrix();
pop();
}
public void renderStatic(PartSidedPipe transmitter)

View file

@ -429,18 +429,6 @@ public class EnergyNetwork extends DynamicNetwork<TileEntity, EnergyNetwork>
return jouleBufferLastTick * 20;
}
@Override
protected EnergyNetwork create(IGridTransmitter<EnergyNetwork>... varTransmitters)
{
EnergyNetwork network = new EnergyNetwork(varTransmitters);
network.clientEnergyScale = clientEnergyScale;
network.jouleBufferLastTick = jouleBufferLastTick;
network.joulesTransmitted = joulesTransmitted;
network.lastPowerScale = lastPowerScale;
network.electricityStored += electricityStored;
return network;
}
@Override
protected EnergyNetwork create(Collection<IGridTransmitter<EnergyNetwork>> collection)
{
@ -454,12 +442,6 @@ public class EnergyNetwork extends DynamicNetwork<TileEntity, EnergyNetwork>
return network;
}
@Override
protected EnergyNetwork create(Set<EnergyNetwork> networks)
{
return new EnergyNetwork(networks);
}
@Override
public TransmissionType getTransmissionType()
{

View file

@ -405,32 +405,6 @@ public class FluidNetwork extends DynamicNetwork<IFluidHandler, FluidNetwork>
return "[FluidNetwork] " + transmitters.size() + " transmitters, " + possibleAcceptors.size() + " acceptors.";
}
@Override
protected FluidNetwork create(IGridTransmitter<FluidNetwork>... varTransmitters)
{
FluidNetwork network = new FluidNetwork(varTransmitters);
network.refFluid = refFluid;
if(fluidStored != null)
{
if(network.fluidStored == null)
{
network.fluidStored = fluidStored;
}
else {
network.fluidStored.amount += fluidStored.amount;
}
}
network.fluidScale = network.getScale();
fluidScale = 0;
refFluid = null;
fluidStored = null;
return network;
}
@Override
protected FluidNetwork create(Collection<IGridTransmitter<FluidNetwork>> collection)
{
@ -480,12 +454,6 @@ public class FluidNetwork extends DynamicNetwork<IFluidHandler, FluidNetwork>
return true;
}
@Override
protected FluidNetwork create(Set<FluidNetwork> networks)
{
return new FluidNetwork(networks);
}
@Override
public TransmissionType getTransmissionType()
{

View file

@ -157,24 +157,12 @@ public class InventoryNetwork extends DynamicNetwork<IInventory, InventoryNetwor
return "[FluidNetwork] " + transmitters.size() + " transmitters, " + possibleAcceptors.size() + " acceptors.";
}
@Override
protected InventoryNetwork create(IGridTransmitter<InventoryNetwork>... varTransmitters)
{
return new InventoryNetwork(varTransmitters);
}
@Override
protected InventoryNetwork create(Collection<IGridTransmitter<InventoryNetwork>> collection)
{
return new InventoryNetwork(collection);
}
@Override
protected InventoryNetwork create(Set<InventoryNetwork> networks)
{
return new InventoryNetwork(networks);
}
@Override
public TransmissionType getTransmissionType()
{

View file

@ -59,7 +59,7 @@ public class TileEntityChemicalDissolutionChamber extends TileEntityElectricBloc
public final double ENERGY_USAGE = usage.chemicalDissolutionChamberUsage;
public TileComponentUpgrade upgradeComponent = new TileComponentUpgrade(this, 3);
public TileComponentUpgrade upgradeComponent = new TileComponentUpgrade(this, 4);
public RedstoneControl controlType = RedstoneControl.DISABLED;

View file

@ -110,7 +110,12 @@ public class FusionReactor implements IFusionReactor
if(burning)
{
injectFuel();
neutronFlux(burnFuel());
int fuelBurned = burnFuel();
neutronFlux(fuelBurned);
if(fuelBurned == 0)
{
burning = false;
}
}
}
else {

View file

@ -39,7 +39,7 @@ public class TileEntityReactorPort extends TileEntityReactorBlock implements IFl
{
if(changed)
{
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockType());
worldObj.func_147453_f(xCoord, yCoord, zCoord, getBlockType());
}
super.onUpdate();