diff --git a/src/main/java/mekanism/api/reactor/INeutronCapture.java b/src/main/java/mekanism/api/reactor/INeutronCapture.java deleted file mode 100644 index 6171a7f74..000000000 --- a/src/main/java/mekanism/api/reactor/INeutronCapture.java +++ /dev/null @@ -1,6 +0,0 @@ -package mekanism.api.reactor; - -public interface INeutronCapture extends IReactorBlock -{ - public int absorbNeutrons(int neutrons); -} diff --git a/src/main/java/mekanism/api/reactor/IReactorBlock.java b/src/main/java/mekanism/api/reactor/IReactorBlock.java deleted file mode 100644 index 4c494ce13..000000000 --- a/src/main/java/mekanism/api/reactor/IReactorBlock.java +++ /dev/null @@ -1,7 +0,0 @@ -package mekanism.api.reactor; - -public interface IReactorBlock -{ - public boolean isFrame(); - -} diff --git a/src/main/java/mekanism/generators/common/FusionReactor.java b/src/main/java/mekanism/generators/common/FusionReactor.java deleted file mode 100644 index 833d7af67..000000000 --- a/src/main/java/mekanism/generators/common/FusionReactor.java +++ /dev/null @@ -1,119 +0,0 @@ -package mekanism.generators.common; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import mekanism.api.gas.GasRegistry; -import mekanism.api.gas.GasStack; -import mekanism.api.gas.GasTank; -import mekanism.api.reactor.INeutronCapture; -import mekanism.api.reactor.IReactorBlock; -import mekanism.generators.common.tile.TileEntityReactorController; - -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidTank; - -import static java.lang.Math.min; -import static java.lang.Math.max; - -public class FusionReactor -{ - public static final int MAX_WATER = 100 * FluidContainerRegistry.BUCKET_VOLUME; - - public static final int MAX_FUEL = 100 * FluidContainerRegistry.BUCKET_VOLUME; - - public FluidTank waterTank = new FluidTank(MAX_WATER); - public GasTank steamTank = new GasTank(MAX_WATER*1000); - - public GasTank deuteriumTank = new GasTank(MAX_FUEL); - public GasTank tritiumTank = new GasTank(MAX_FUEL); - - public GasTank fuelTank = new GasTank(MAX_FUEL); - - public TileEntityReactorController controller; - public Set reactorBlocks = new HashSet(); - public Set neutronCaptors = new HashSet(); - - public double temperature; - public double ignitionTemperature = 10^7; - - public double burnRatio = 1; - public double tempPerFuel = 100000; - public int injectionRate; - - public boolean burning = false; - public boolean hasHohlraum = false; - - public void simulate() - { - if(temperature >= ignitionTemperature) - { - if(!burning && hasHohlraum) - { - vaporiseHohlraum(); - } - injectFuel(); - - int fuelBurned = burnFuel(); - neutronFlux(fuelBurned); - } - else { - burning = false; - } - boilWater(); - ambientLoss(); - } - - public void vaporiseHohlraum() - { - fuelTank.receive(new GasStack(GasRegistry.getGas("fusionFuel"), 1000), true); - burning = true; - } - - public void injectFuel() - { - int amountNeeded = fuelTank.getNeeded(); - int amountAvailable = 2*min(deuteriumTank.getStored(), tritiumTank.getStored()); - int amountToInject = min(amountNeeded, min(amountAvailable, injectionRate)); - amountToInject -= amountToInject % 2; - deuteriumTank.draw(amountToInject/2, true); - tritiumTank.draw(amountToInject/2, true); - fuelTank.receive(new GasStack(GasRegistry.getGas("fusionFuel"), amountToInject), true); - } - - public int burnFuel() - { - int fuelBurned = (int)min(fuelTank.getStored(), max(0, temperature-ignitionTemperature)*burnRatio); - fuelTank.draw(fuelBurned, true); - temperature += tempPerFuel * fuelBurned; - return fuelBurned; - } - - public void neutronFlux(int fuelBurned) - { - int neutronsRemaining = fuelBurned; - List list = new ArrayList(neutronCaptors); - Collections.shuffle(list); - for(INeutronCapture captor: neutronCaptors) - { - if(neutronsRemaining <= 0) - break; - - neutronsRemaining = captor.absorbNeutrons(neutronsRemaining); - } - controller.radiateNeutrons(neutronsRemaining); - } - - public void boilWater() - { - int waterToBoil = (int)min(waterTank.getFluidAmount(), temperature/1000); - } - - public void ambientLoss() - { - temperature -= 0.1*temperature; - } -} diff --git a/src/main/java/mekanism/generators/common/block/BlockReactor.java b/src/main/java/mekanism/generators/common/block/BlockReactor.java deleted file mode 100644 index 16b2d32a9..000000000 --- a/src/main/java/mekanism/generators/common/block/BlockReactor.java +++ /dev/null @@ -1,12 +0,0 @@ -package mekanism.generators.common.block; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; - -public class BlockReactor extends Block -{ - protected BlockReactor() - { - super(Material.iron); - } -} diff --git a/src/main/java/mekanism/generators/common/tile/TileEntityReactorBlock.java b/src/main/java/mekanism/generators/common/tile/TileEntityReactorBlock.java deleted file mode 100644 index ada0c9bef..000000000 --- a/src/main/java/mekanism/generators/common/tile/TileEntityReactorBlock.java +++ /dev/null @@ -1,10 +0,0 @@ -package mekanism.generators.common.tile; - -import mekanism.api.reactor.IReactorBlock; - -/** - * Created by ben on 10/07/14. - */ -public abstract class TileEntityReactorBlock implements IReactorBlock -{ -} diff --git a/src/main/java/mekanism/generators/common/tile/TileEntityReactorController.java b/src/main/java/mekanism/generators/common/tile/TileEntityReactorController.java deleted file mode 100644 index 48fb6191c..000000000 --- a/src/main/java/mekanism/generators/common/tile/TileEntityReactorController.java +++ /dev/null @@ -1,15 +0,0 @@ -package mekanism.generators.common.tile; - -public class TileEntityReactorController extends TileEntityReactorBlock -{ - @Override - public boolean isFrame() - { - return false; - } - - public void radiateNeutrons(int neutrons) - { - - } -}