A few fixes, temporary x10 energy scale up to allow for higher energy production

This commit is contained in:
Aidan C. Brady 2015-02-27 18:19:13 -06:00
parent 439a734ce0
commit b51aa0ee83
4 changed files with 16 additions and 17 deletions

View file

@ -1,5 +1,7 @@
package mekanism.common.tile; package mekanism.common.tile;
import io.netty.buffer.ByteBuf;
import java.util.ArrayList; import java.util.ArrayList;
import mekanism.api.Coord4D; import mekanism.api.Coord4D;
@ -9,9 +11,7 @@ import mekanism.common.LaserManager;
import mekanism.common.Mekanism; import mekanism.common.Mekanism;
import mekanism.common.base.IRedstoneControl; import mekanism.common.base.IRedstoneControl;
import mekanism.common.network.PacketTileEntity.TileEntityMessage; import mekanism.common.network.PacketTileEntity.TileEntityMessage;
import mekanism.common.tile.component.TileComponentUpgrade;
import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -19,8 +19,6 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.MovingObjectPosition;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import io.netty.buffer.ByteBuf;
public class TileEntityLaserAmplifier extends TileEntityContainerBlock implements ILaserReceptor, IRedstoneControl public class TileEntityLaserAmplifier extends TileEntityContainerBlock implements ILaserReceptor, IRedstoneControl
{ {
public static final double MAX_ENERGY = 5E9; public static final double MAX_ENERGY = 5E9;
@ -67,14 +65,12 @@ public class TileEntityLaserAmplifier extends TileEntityContainerBlock implement
LaserManager.fireLaserClient(this, ForgeDirection.getOrientation(facing), lastFired, worldObj); LaserManager.fireLaserClient(this, ForgeDirection.getOrientation(facing), lastFired, worldObj);
} }
} }
else else {
{
if(ticks < time) if(ticks < time)
{ {
ticks++; ticks++;
} }
else else {
{
ticks = 0; ticks = 0;
} }
@ -107,13 +103,12 @@ public class TileEntityLaserAmplifier extends TileEntityContainerBlock implement
{ {
diggingProgress += firing; diggingProgress += firing;
if(diggingProgress >= hardness * general.laserEnergyNeededPerHardness) if(diggingProgress >= hardness*general.laserEnergyNeededPerHardness)
{ {
LaserManager.breakBlock(hitCoord, true, worldObj); LaserManager.breakBlock(hitCoord, true, worldObj);
diggingProgress = 0; diggingProgress = 0;
} }
else else {
{
Minecraft.getMinecraft().effectRenderer.addBlockHitEffects(hitCoord.xCoord, hitCoord.yCoord, hitCoord.zCoord, mop); Minecraft.getMinecraft().effectRenderer.addBlockHitEffects(hitCoord.xCoord, hitCoord.yCoord, hitCoord.zCoord, mop);
} }
} }

View file

@ -1,5 +1,8 @@
package mekanism.generators.common; package mekanism.generators.common;
import static java.lang.Math.max;
import static java.lang.Math.min;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;
@ -18,7 +21,6 @@ import mekanism.api.reactor.IReactorBlock;
import mekanism.common.Mekanism; import mekanism.common.Mekanism;
import mekanism.common.network.PacketTileEntity.TileEntityMessage; import mekanism.common.network.PacketTileEntity.TileEntityMessage;
import mekanism.generators.common.tile.reactor.TileEntityReactorController; import mekanism.generators.common.tile.reactor.TileEntityReactorController;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.item.ItemCoal; import net.minecraft.item.ItemCoal;
@ -30,9 +32,6 @@ import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTank; import net.minecraftforge.fluids.FluidTank;
import static java.lang.Math.max;
import static java.lang.Math.min;
public class FusionReactor implements IFusionReactor public class FusionReactor implements IFusionReactor
{ {
public TileEntityReactorController controller; public TileEntityReactorController controller;
@ -60,7 +59,7 @@ public class FusionReactor implements IFusionReactor
public static double plasmaHeatCapacity = 100; public static double plasmaHeatCapacity = 100;
public static double caseHeatCapacity = 1; public static double caseHeatCapacity = 1;
public static double enthalpyOfVaporization = 10; public static double enthalpyOfVaporization = 10;
public static double thermocoupleEfficiency = 0.01; public static double thermocoupleEfficiency = 0.1;
public static double steamTransferEfficiency = 0.1; public static double steamTransferEfficiency = 0.1;
//Heat transfer metrics //Heat transfer metrics
@ -317,6 +316,7 @@ public class FusionReactor implements IFusionReactor
{ {
AxisAlignedBB death_zone = AxisAlignedBB.getBoundingBox(controller.xCoord - 1, controller.yCoord - 3, controller.zCoord - 1 ,controller.xCoord + 2, controller.yCoord, controller.zCoord + 2); AxisAlignedBB death_zone = AxisAlignedBB.getBoundingBox(controller.xCoord - 1, controller.yCoord - 3, controller.zCoord - 1 ,controller.xCoord + 2, controller.yCoord, controller.zCoord + 2);
List<Entity> entitiesToDie = controller.getWorldObj().getEntitiesWithinAABB(Entity.class, death_zone); List<Entity> entitiesToDie = controller.getWorldObj().getEntitiesWithinAABB(Entity.class, death_zone);
for(Entity entity : entitiesToDie) for(Entity entity : entitiesToDie)
{ {
entity.attackEntityFrom(DamageSource.magic, 50000F); entity.attackEntityFrom(DamageSource.magic, 50000F);
@ -471,6 +471,7 @@ public class FusionReactor implements IFusionReactor
return true; return true;
} }
@Override
public boolean isFormed() public boolean isFormed()
{ {
return formed; return formed;
@ -529,6 +530,7 @@ public class FusionReactor implements IFusionReactor
return burnTemperature * energyPerFuel * burnRatio * (plasmaCaseConductivity+k+caseAirConductivity) / (energyPerFuel * burnRatio * (plasmaCaseConductivity+k+caseAirConductivity) - plasmaCaseConductivity * (k + caseAirConductivity)); return burnTemperature * energyPerFuel * burnRatio * (plasmaCaseConductivity+k+caseAirConductivity) / (energyPerFuel * burnRatio * (plasmaCaseConductivity+k+caseAirConductivity) - plasmaCaseConductivity * (k + caseAirConductivity));
} }
@Override
public double getPassiveGeneration(boolean active, boolean current) public double getPassiveGeneration(boolean active, boolean current)
{ {
double temperature = current ? caseTemperature : getMaxCasingTemperature(active); double temperature = current ? caseTemperature : getMaxCasingTemperature(active);
@ -536,6 +538,7 @@ public class FusionReactor implements IFusionReactor
return thermocoupleEfficiency * caseAirConductivity * temperature; return thermocoupleEfficiency * caseAirConductivity * temperature;
} }
@Override
public int getSteamPerTick(boolean current) public int getSteamPerTick(boolean current)
{ {
double temperature = current ? caseTemperature : getMaxCasingTemperature(true); double temperature = current ? caseTemperature : getMaxCasingTemperature(true);

View file

@ -228,7 +228,7 @@ public class BlockReactor extends BlockContainer implements IBlockCTM
{ {
for(ReactorBlockType type : ReactorBlockType.values()) for(ReactorBlockType type : ReactorBlockType.values())
{ {
if(type.typeBlock == this) if(type.typeBlock == this && type != ReactorBlockType.NEUTRON_CAPTURE)
{ {
list.add(new ItemStack(item, 1, type.meta)); list.add(new ItemStack(item, 1, type.meta));
} }

View file

@ -290,6 +290,7 @@ fluid.heavyWater=Heavy Water
fluid.lithium=Liquid Lithium fluid.lithium=Liquid Lithium
fluid.deuterium=Liquid Deuterium fluid.deuterium=Liquid Deuterium
fluid.tritium=Liquid Tritium fluid.tritium=Liquid Tritium
fluid.fusionFuelDT=Liquid D-T Fuel
//OreGas names //OreGas names
oregas.iron=Iron Ore oregas.iron=Iron Ore