mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Hell yeah!
The ZIRNOX Rework works, the gas cent nei handler works, the hazard issue should probably work, the guis should work
This commit is contained in:
parent
78445883bb
commit
e8034a86b0
@ -24,6 +24,7 @@ public class HazardTypeHot extends HazardTypeBase {
|
||||
boolean reacher = false;
|
||||
boolean gloves = false;
|
||||
|
||||
//Why on earth did I add gloves again?
|
||||
if(target instanceof EntityPlayer) {
|
||||
ItemStack item = ((EntityPlayer) target).inventory.getCurrentItem();
|
||||
if(item != null)
|
||||
@ -34,7 +35,8 @@ public class HazardTypeHot extends HazardTypeBase {
|
||||
gloves = armor.getItem() instanceof ItemModGloves || ArmorUtil.checkForHazmat(target);
|
||||
if(!gloves) {
|
||||
ItemStack mod = ArmorModHandler.pryMods(armor)[ArmorModHandler.legs_only];
|
||||
gloves = mod.getItem() instanceof ItemModGloves;
|
||||
if(mod != null)
|
||||
gloves = mod.getItem() instanceof ItemModGloves;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -60,22 +60,31 @@ public class GUIMachineGasCent extends GuiInfoContainer {
|
||||
int j = (int)gasCent.getCentrifugeProgressScaled(33);
|
||||
drawTexturedModalRect(guiLeft + 74, guiTop + 37, 208, 0, j, 12);
|
||||
|
||||
int a = gasCent.getTankScaled(32, 0);
|
||||
int a = gasCent.getTankScaled(31, 0);
|
||||
switch (gasCent.inputTank.getTankType()) {
|
||||
case PF6:
|
||||
drawTexturedModalRect(guiLeft + 58, guiTop + 62 - a, 200, 31 - a, 8, a);
|
||||
break;
|
||||
case MUD:
|
||||
drawTexturedModalRect(guiLeft + 58, guiTop + 62 - a, 192, 63 - a, 8, a);
|
||||
break;
|
||||
case MUD_HEAVY:
|
||||
drawTexturedModalRect(guiLeft + 58, guiTop + 62 - a, 192, 63 - a, 8, a);
|
||||
break;
|
||||
case NONE:
|
||||
break;
|
||||
default:
|
||||
drawTexturedModalRect(guiLeft + 58, guiTop + 62 - a, 192, 31 - a, 8, a);
|
||||
}
|
||||
|
||||
int b = gasCent.getTankScaled(32, 1);
|
||||
int b = gasCent.getTankScaled(31, 1);
|
||||
switch (gasCent.outputTank.getTankType()) {
|
||||
case PF6:
|
||||
drawTexturedModalRect(guiLeft + 114, guiTop + 62 - b, 200, 31 - b, 8, b);
|
||||
break;
|
||||
case MUD_HEAVY:
|
||||
drawTexturedModalRect(guiLeft + 114, guiTop + 62 - b, 192, 63 - b, 8, b);
|
||||
break;
|
||||
case NONE:
|
||||
break;
|
||||
default:
|
||||
|
||||
@ -1,11 +1,15 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.inventory.container.ContainerRadiolysis;
|
||||
import com.hbm.items.machine.ItemRTGPellet;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineRadiolysis;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
@ -34,6 +38,23 @@ public class GUIRadiolysis extends GuiInfoContainer {
|
||||
radiolysis.tanks[2].renderTankInfo(this, mouseX, mouseY, guiLeft + 87, guiTop + 53, 12, 16);
|
||||
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 17, 16, 34, radiolysis.power, radiolysis.maxPower);
|
||||
|
||||
String[] descText = I18nUtil.resolveKeyArray("desc.gui.radiolysis.desc");
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, descText);
|
||||
|
||||
String[] heatText = I18nUtil.resolveKeyArray("desc.gui.rtg.heat", radiolysis.heat);
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 16 + 18, 16, 16, guiLeft - 8, guiTop + 36 + 18 + 16, heatText);
|
||||
|
||||
List<ItemRTGPellet> pellets = ItemRTGPellet.pelletList;
|
||||
String[] pelletText = new String[pellets.size() + 1];
|
||||
pelletText[0] = I18nUtil.resolveKey("desc.gui.rtg.pellets");
|
||||
|
||||
for(int i = 0; i < pellets.size(); i++) {
|
||||
ItemRTGPellet pellet = pellets.get(i);
|
||||
pelletText[i + 1] = I18nUtil.resolveKey("desc.gui.rtg.pelletPower", I18nUtil.resolveKey(pellet.getUnlocalizedName() + ".name"), pellet.getHeat() * 10);
|
||||
}
|
||||
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 16 + 36, 16, 16, guiLeft - 8, guiTop + 36 + 36 + 16, pelletText);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -57,9 +78,14 @@ public class GUIRadiolysis extends GuiInfoContainer {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(radiolysis.tanks[0].getSheet());
|
||||
radiolysis.tanks[0].renderTank(this, guiLeft + 61, guiTop + 69, radiolysis.tanks[0].getTankType().textureX() * FluidTank.x, radiolysis.tanks[0].getTankType().textureY() * FluidTank.y, 8, 52);
|
||||
|
||||
//For some reason, liquid hydrogen appears as lava. but it doesn't seem to be an issue with any other fuel?
|
||||
for(byte j = 0; j < 2; j++) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(radiolysis.tanks[j].getSheet());
|
||||
radiolysis.tanks[j + 1].renderTank(this, guiLeft + 87, guiTop + 33 + j * 36, radiolysis.tanks[j + 1].getTankType().textureX() * FluidTank.x, radiolysis.tanks[j + 1].getTankType().textureY() * FluidTank.y, 12, 16);
|
||||
}
|
||||
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 16, 16, 16, 10);
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 16 + 18, 16, 16, 2);
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 16 + 36, 16, 16, 3);
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ public class GUIReactorResearch extends GuiInfoContainer {
|
||||
"This reactor is fueled with plate fuel.",
|
||||
"The reaction needs a neutron source to start."
|
||||
};
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 14, guiTop + 31, 16, 16, guiLeft - 6, guiTop + 31 + 16, text2);
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 14, guiTop + 61, 16, 16, guiLeft - 6, guiTop + 61 + 16, text2);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -145,7 +145,7 @@ public class GUIReactorResearch extends GuiInfoContainer {
|
||||
}
|
||||
|
||||
this.drawInfoPanel(guiLeft - 14, guiTop + 23, 16, 16, 3);
|
||||
this.drawInfoPanel(guiLeft - 14, guiTop + 31, 16, 16, 2);
|
||||
this.drawInfoPanel(guiLeft - 14, guiTop + 61, 16, 16, 2);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@ import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.NBTControlPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.machine.TileEntityReactorZirnox;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
@ -38,21 +39,21 @@ public class GUIReactorZirnox extends GuiInfoContainer {
|
||||
zirnox.water.renderTankInfo(this, mouseX, mouseY, guiLeft + 178, guiTop + 108, 18, 12);
|
||||
this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 160, guiTop + 33, 18, 17, new String[] { "Temperature:", " " + Math.round((zirnox.heat) * 0.00001 * 780 + 20) + "°C" });
|
||||
this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 178, guiTop + 33, 18, 17, new String[] { "Pressure:", " " + Math.round((zirnox.pressure) * 0.00001 * 30) + " bar" });
|
||||
|
||||
String[] info = new String[] { "CO2 transfers heat from the core", "to the water. This will boil", "the water into steam.", "Water Consumption Rate:", "100 mB/t", "2000 mB/s" };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, info);
|
||||
|
||||
String[] info2 = new String[] { "Pressure can be reduced by", "reducing the amount of CO2", "in the reactor. Warning:", "this will reduce cooling!" };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, info2);
|
||||
|
||||
String[] coolantText = I18nUtil.resolveKeyArray("desc.gui.zirnox.coolant");
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, coolantText);
|
||||
|
||||
String[] pressureText = I18nUtil.resolveKeyArray("desc.gui.zirnox.pressure");
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, pressureText);
|
||||
|
||||
if(zirnox.water.getFill() <= 0) {
|
||||
String[] warn1 = new String[] { "Error: Water is required for", "the reactor to function properly!" };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 32, 16, 16, guiLeft - 8, guiTop + 36 + 32 + 16, warn1);
|
||||
String[] warning1 = I18nUtil.resolveKeyArray("desc.gui.zirnox.warning1");
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 32, 16, 16, guiLeft - 8, guiTop + 36 + 32 + 16, warning1);
|
||||
}
|
||||
|
||||
if(zirnox.carbonDioxide.getFill() < 4000) {
|
||||
String[] warn2 = new String[] { "Error: CO2 is required for", "the reactor to function properly!" };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 32 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 32 + 16, warn2);
|
||||
String[] warning2 = I18nUtil.resolveKeyArray("desc.gui.zirnox.warning2");
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 32 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 32 + 16, warning2);
|
||||
}
|
||||
|
||||
}
|
||||
@ -123,7 +124,7 @@ public class GUIReactorZirnox extends GuiInfoContainer {
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 32, 16, 16, 6);
|
||||
|
||||
if(zirnox.carbonDioxide.getFill() <= 4000)
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 32 + 16, 16, 16, 7);
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 32 + 16, 16, 16, 6);
|
||||
}
|
||||
|
||||
}
|
||||
@ -932,6 +932,7 @@ public class AssemblerRecipes {
|
||||
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_radiolysis), new AStack[] {
|
||||
new OreDictStack(STEEL.ingot(), 8),
|
||||
new OreDictStack(TCALLOY.ingot(), 4),
|
||||
new ComparableStack(ModBlocks.steel_beam, 16),
|
||||
new OreDictStack(DURA.ingot(), 10),
|
||||
new OreDictStack(DESH.ingot(), 4),
|
||||
|
||||
@ -2,13 +2,17 @@ package com.hbm.inventory.recipes;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import com.hbm.inventory.FluidStack;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemFluidIcon;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@ -68,59 +72,37 @@ public class GasCentrifugeRecipes {
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
//TODO: Make a Triplet with input fluid, fluid consumed, and itemstack outputs. use that to rework everything below; look at RadiolysisRecipes
|
||||
|
||||
//Recipes for NEI
|
||||
public static List<ItemStack> getGasCentOutputs(FluidType fluid) {
|
||||
List<ItemStack> outputs = new ArrayList(4);
|
||||
|
||||
if(fluid == Fluids.UF6) {
|
||||
outputs.add(new ItemStack(ModItems.nugget_u238, 11));
|
||||
outputs.add(new ItemStack(ModItems.nugget_u235, 1));
|
||||
outputs.add(new ItemStack(ModItems.fluorite, 4));
|
||||
} else if(fluid == Fluids.PUF6) {
|
||||
outputs.add(new ItemStack(ModItems.nugget_pu238, 3));
|
||||
outputs.add(new ItemStack(ModItems.nugget_pu_mix, 6));
|
||||
outputs.add(new ItemStack(ModItems.fluorite, 3));
|
||||
} else if(fluid == Fluids.WATZ) {
|
||||
outputs.add(new ItemStack(ModItems.powder_iron, 1));
|
||||
outputs.add(new ItemStack(ModItems.powder_lead, 1));
|
||||
outputs.add(new ItemStack(ModItems.nuclear_waste_tiny, 1)); //we have to omit dust here because the NEI handler only supports 3 items
|
||||
}
|
||||
return outputs;
|
||||
}
|
||||
|
||||
public static int getQuantityRequired(FluidType fluid) {
|
||||
if(fluid == Fluids.UF6) return 1200;
|
||||
if(fluid == Fluids.PUF6)return 900;
|
||||
if(fluid == Fluids.WATZ)return 1000;
|
||||
return 0;
|
||||
}
|
||||
/* Recipe NEI Handler */
|
||||
private static Map<FluidStack, ItemStack[]> gasCent = new HashMap();
|
||||
|
||||
//Iterators are lots of fun
|
||||
public static Map<Object, Object[]> getGasCentrifugeRecipes() {
|
||||
Map<Object, Object[]> recipes = new HashMap<Object, Object[]>();
|
||||
|
||||
for(int i = 0; i < Fluids.getAll().length; i++) {
|
||||
if(getGasCentOutputs(Fluids.fromID(i)) != null) {
|
||||
List<ItemStack> out = getGasCentOutputs(Fluids.fromID(i));
|
||||
ItemStack[] outputs = new ItemStack[4];
|
||||
|
||||
for(int j = 0; j < out.size(); j++) {
|
||||
outputs[j] = out.get(j).copy();
|
||||
}
|
||||
for(int j = 0; j < 4; j++)
|
||||
if(outputs[j] == null)
|
||||
outputs[j] = new ItemStack(ModItems.nothing);
|
||||
|
||||
ItemStack input = new ItemStack(ModItems.fluid_icon, 1, i);
|
||||
ItemFluidIcon.addQuantity(input, getQuantityRequired(Fluids.fromID(i)));
|
||||
|
||||
recipes.put(input, outputs);
|
||||
Iterator itr = gasCent.entrySet().iterator();
|
||||
|
||||
while(itr.hasNext()) {
|
||||
Map.Entry entry = (Entry) itr.next();
|
||||
FluidStack input = (FluidStack) entry.getKey();
|
||||
ItemStack[] out = new ItemStack[4];
|
||||
ItemStack[] outputs = (ItemStack[]) entry.getValue();
|
||||
|
||||
for(int j = 0; j < outputs.length; j++) {
|
||||
out[j] = outputs[j].copy();
|
||||
}
|
||||
for(int j = 0; j < 4; j++)
|
||||
if(out[j] == null)
|
||||
out[j] = new ItemStack(ModItems.nothing);
|
||||
|
||||
recipes.put(ItemFluidIcon.make(input.type, input.fill), outputs);
|
||||
}
|
||||
|
||||
return recipes;
|
||||
}
|
||||
|
||||
public static void register() {
|
||||
gasCent.put(new FluidStack(1200, Fluids.UF6), new ItemStack[] {new ItemStack(ModItems.nugget_u238, 11), new ItemStack(ModItems.nugget_u235, 1), new ItemStack(ModItems.fluorite, 4)});
|
||||
gasCent.put(new FluidStack(900, Fluids.PUF6), new ItemStack[] {new ItemStack(ModItems.nugget_pu238, 3), new ItemStack(ModItems.nugget_pu_mix, 6), new ItemStack(ModItems.fluorite, 3)});
|
||||
gasCent.put(new FluidStack(1000, Fluids.WATZ), new ItemStack[] {new ItemStack(ModItems.powder_iron, 1), new ItemStack(ModItems.powder_lead, 1), new ItemStack(ModItems.nuclear_waste_tiny, 1)});
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@ import java.util.Map.Entry;
|
||||
import com.hbm.inventory.FluidStack;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.recipes.RefineryRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemFluidIcon;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
@ -19,7 +20,7 @@ public class RadiolysisRecipes {
|
||||
|
||||
private static Map<FluidType, Pair<FluidStack, FluidStack>> radiolysis = new HashMap(); //fluidstacks :reimumunch:
|
||||
|
||||
/* I am proud of this but I don't think I should be */
|
||||
/* I am proud of this */
|
||||
public static Map<Object, Object[]> getRecipesForNEI() {
|
||||
Map<Object, Object[]> recipes = new HashMap<Object, Object[]>();
|
||||
Iterator itr = radiolysis.entrySet().iterator();
|
||||
@ -48,11 +49,13 @@ public class RadiolysisRecipes {
|
||||
public static void registerRadiolysis() {
|
||||
radiolysis.put(Fluids.WATER, new Pair(new FluidStack(80, Fluids.ACID), new FluidStack(20, Fluids.HYDROGEN)));
|
||||
|
||||
radiolysis.put(Fluids.BITUMEN, new Pair(new FluidStack(80, Fluids.OIL), new FluidStack(20, Fluids.PETROLEUM)));
|
||||
radiolysis.put(Fluids.SMEAR, new Pair(new FluidStack(60, Fluids.NAPHTHA), new FluidStack(40, Fluids.PETROLEUM)));
|
||||
radiolysis.put(Fluids.GAS, new Pair(new FluidStack(50, Fluids.PETROLEUM), new FluidStack(0, Fluids.NONE)));
|
||||
radiolysis.put(Fluids.DIESEL, new Pair(new FluidStack(40, Fluids.KEROSENE), new FluidStack(30, Fluids.PETROLEUM)));
|
||||
radiolysis.put(Fluids.KEROSENE, new Pair(new FluidStack(60, Fluids.PETROLEUM), new FluidStack(0, Fluids.NONE)));
|
||||
//now this is poggers
|
||||
radiolysis.put(Fluids.OIL, new Pair(new FluidStack(RefineryRecipes.oil_crack_oil, Fluids.CRACKOIL), new FluidStack(RefineryRecipes.oil_crack_petro, Fluids.PETROLEUM)));
|
||||
radiolysis.put(Fluids.BITUMEN, new Pair(new FluidStack(RefineryRecipes.bitumen_crack_oil, Fluids.OIL), new FluidStack(RefineryRecipes.bitumen_crack_aroma, Fluids.AROMATICS)));
|
||||
radiolysis.put(Fluids.SMEAR, new Pair(new FluidStack(RefineryRecipes.smear_crack_napht, Fluids.NAPHTHA), new FluidStack(RefineryRecipes.smear_crack_petro, Fluids.PETROLEUM)));
|
||||
radiolysis.put(Fluids.GAS, new Pair(new FluidStack(RefineryRecipes.gas_crack_petro, Fluids.PETROLEUM), new FluidStack(RefineryRecipes.gas_crack_unsat, Fluids.UNSATURATEDS)));
|
||||
radiolysis.put(Fluids.DIESEL, new Pair(new FluidStack(RefineryRecipes.diesel_crack_kero, Fluids.KEROSENE), new FluidStack(RefineryRecipes.diesel_crack_petro, Fluids.PETROLEUM)));
|
||||
radiolysis.put(Fluids.KEROSENE, new Pair(new FluidStack(RefineryRecipes.kero_crack_petro, Fluids.PETROLEUM), new FluidStack(0, Fluids.NONE)));
|
||||
}
|
||||
|
||||
public static Pair<FluidStack, FluidStack> getRadiolysis(FluidType input) {
|
||||
|
||||
@ -950,6 +950,7 @@ public class MainRegistry {
|
||||
RefineryRecipes.registerFractions();
|
||||
RefineryRecipes.registerCracking();
|
||||
RadiolysisRecipes.registerRadiolysis();
|
||||
GasCentrifugeRecipes.register();
|
||||
LiquefactionRecipes.register();
|
||||
SolidificationRecipes.register();
|
||||
FuelPoolRecipes.register();
|
||||
|
||||
@ -37,6 +37,7 @@ public class TileEntityMachineRadiolysis extends TileEntityMachineBase implement
|
||||
|
||||
public long power;
|
||||
public static final int maxPower = 1000000;
|
||||
public int heat;
|
||||
|
||||
public FluidTank[] tanks;
|
||||
public List<IFluidAcceptor> list1 = new ArrayList();
|
||||
@ -80,6 +81,7 @@ public class TileEntityMachineRadiolysis extends TileEntityMachineBase implement
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
this.power = nbt.getLong("power");
|
||||
this.heat = nbt.getInteger("heat");
|
||||
|
||||
tanks[0].readFromNBT(nbt, "input");
|
||||
tanks[1].readFromNBT(nbt, "output1");
|
||||
@ -91,6 +93,7 @@ public class TileEntityMachineRadiolysis extends TileEntityMachineBase implement
|
||||
super.writeToNBT(nbt);
|
||||
|
||||
nbt.setLong("power", power);
|
||||
nbt.setInteger("heat", heat);
|
||||
|
||||
tanks[0].writeToNBT(nbt, "input");
|
||||
tanks[1].writeToNBT(nbt, "output1");
|
||||
@ -99,6 +102,7 @@ public class TileEntityMachineRadiolysis extends TileEntityMachineBase implement
|
||||
|
||||
public void networkUnpack(NBTTagCompound data) {
|
||||
this.power = data.getLong("power");
|
||||
this.heat = data.getInteger("heat");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -107,7 +111,7 @@ public class TileEntityMachineRadiolysis extends TileEntityMachineBase implement
|
||||
if(!worldObj.isRemote) {
|
||||
power = Library.chargeItemsFromTE(slots, 14, power, maxPower);
|
||||
|
||||
int heat = RTGUtil.updateRTGs(slots, slot_rtg);
|
||||
heat = RTGUtil.updateRTGs(slots, slot_rtg);
|
||||
power += heat * 10;
|
||||
|
||||
if(power > maxPower)
|
||||
@ -138,6 +142,7 @@ public class TileEntityMachineRadiolysis extends TileEntityMachineBase implement
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setLong("power", power);
|
||||
data.setInteger("heat", heat);
|
||||
this.networkPack(data, 50);
|
||||
|
||||
for(byte i = 0; i < 3; i++)
|
||||
|
||||
@ -203,13 +203,15 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.pressure = (int) ((float)this.heat * (1.5 * this.carbonDioxide.getFill() / 16000));
|
||||
|
||||
//2(fill) + ((x^2 * fill%) / 100,000)
|
||||
this.pressure = (this.carbonDioxide.getFill() * 2) + (int)((float)this.heat * (float)this.heat * ((float)this.carbonDioxide.getFill() / (float)this.carbonDioxide.getMaxFill() / 100000F));
|
||||
|
||||
if(this.heat > 0 && this.heat < maxHeat) {
|
||||
if(this.water.getFill() > 0 && this.carbonDioxide.getFill() > 0 && this.steam.getFill() < this.steam.getMaxFill()) {
|
||||
generateSteam();
|
||||
this.heat -= (int) ((float)this.heat * (Math.sqrt(this.carbonDioxide.getFill()) / 1800));
|
||||
//(x * pressure) / 1,000,000
|
||||
this.heat -= (int) ((float)this.heat * (float)this.pressure / 1000000F);
|
||||
} else {
|
||||
this.heat -= 10;
|
||||
}
|
||||
@ -233,19 +235,20 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
||||
private void generateSteam() {
|
||||
|
||||
// function of SHS produced per tick
|
||||
// heat% * 25 * 1 (should get rid of any rounding errors)
|
||||
int Water = (int) (((float)heat / maxHeat) * 25) * 5;
|
||||
int Steam = Water * 1;
|
||||
|
||||
water.setFill(water.getFill() - Water);
|
||||
steam.setFill(steam.getFill() + Steam);
|
||||
|
||||
if(water.getFill() < 0)
|
||||
water.setFill(0);
|
||||
|
||||
if(steam.getFill() > steam.getMaxFill())
|
||||
steam.setFill(steam.getMaxFill());
|
||||
// heat - 10256/100000 * pressure / 50,000 * 25 * 3 (should get rid of any rounding errors)
|
||||
if(this.heat > 10256) {
|
||||
int Water = (int)((((float)heat - 10256F) / (float)maxHeat) * ((float)pressure / (float)(maxPressure / 2)) * 25F * 3F);
|
||||
int Steam = Water * 1;
|
||||
|
||||
water.setFill(water.getFill() - Water);
|
||||
steam.setFill(steam.getFill() + Steam);
|
||||
|
||||
if(water.getFill() < 0)
|
||||
water.setFill(0);
|
||||
|
||||
if(steam.getFill() > steam.getMaxFill())
|
||||
steam.setFill(steam.getMaxFill());
|
||||
}
|
||||
}
|
||||
|
||||
private boolean hasFuelRod(int id) {
|
||||
|
||||
@ -170,7 +170,7 @@ public class TileEntityWasteDrum extends TileEntity implements ISidedInventory {
|
||||
if(itemStack.getItem() instanceof ItemRBMKRod) {
|
||||
return ItemRBMKRod.getCoreHeat(itemStack) < 50 && ItemRBMKRod.getHullHeat(itemStack) < 50;
|
||||
} else {
|
||||
return !FuelPoolRecipes.recipes.containsKey(getStackInSlot(i));
|
||||
return !FuelPoolRecipes.recipes.containsKey(new ComparableStack(getStackInSlot(i)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -404,6 +404,7 @@ container.pumpjack=Pumpjack
|
||||
container.radGen=Radiation-Powered Engine
|
||||
container.radar=Radar
|
||||
container.radiobox=FM Transmitter
|
||||
container.radiolysis=RTG and Radiolysis Chamber
|
||||
container.radiorec=FM Radio
|
||||
container.rbmkBoiler=RBMK Steam Channel
|
||||
container.rbmkControl=RBMK Control Rods
|
||||
@ -498,11 +499,16 @@ death.attack.teleporter=%1$s was teleported into nothingness.
|
||||
desc.item.rtgDecay=Decays to: %s
|
||||
desc.item.rtgHeat=Power Level: %s
|
||||
desc.item.wasteCooling=Cool in a Spent Fuel Pool Drum
|
||||
desc.gui.radiolysis.desc=§9Description§r$This RTG is more efficient then others, and$comes equipped with a radiolysis chamber for$cracking and sterilization.
|
||||
desc.gui.rtgBFurnace.desc=Requires at least 15 heat to process$The more heat on top of that, the faster it runs$Heat going over maximum speed will have no effect$Short-lived pellets may decay
|
||||
desc.gui.rtg.heat=§eCurrent heat level: %s
|
||||
desc.gui.rtg.pellets=Accepted Pellets:
|
||||
desc.gui.rtg.pelletHeat=%s (%s heat)
|
||||
desc.gui.rtg.pelletPower=%s (%s HE/tick)
|
||||
desc.gui.zirnox.coolant=§3Coolant§r$CO2 transfers heat from the core to the water.$This will boil it into super dense steam.$The efficiency of cooling and steam production$is based on pressure.
|
||||
desc.gui.zirnox.pressure=§6Pressure§r$Pressure can be reduced by venting CO2.$However, too low a pressure, and cooling$efficiency and steam production will be reduced.$Look out for meltdowns!
|
||||
desc.gui.zirnox.warning1=§cError:§r Water is required for$the reactor to function properly!
|
||||
desc.gui.zirnox.warning2=§cError:§r CO2 is required for$the reactor to function properly!
|
||||
|
||||
digamma.playerDigamma=Digamma exposure:
|
||||
digamma.playerHealth=Digamma influence:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 3.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.5 KiB |
Loading…
x
Reference in New Issue
Block a user