mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
RBMK rebalancing (#602)
* stuff * Reverted HEP241 and americium fuels to their original value * Changed plutonium pile rod's output + radiation values The plutonium pile rod now outputs 2 RGP, 1 uranium billets instead of 3 RGP billets, with the change in radioactivity to reflect that. Considering the recent additions to the pile - and planned ones that allow for sophistication akin to Windscale and X-10 - it feels like a natural balancing change. * Added adjustable segment sizes to seven segment displays, made research reactor's control rod entry more noticeable and responsive * Gave higher plutonium production to NU and MEU Every other U-238 containing fuel has a fissile:fertile ratio of about 1:3, whilst NU and MEU have 1:12 and 1:6 respectively; as a result, there's going to be a higher chance of U-238 interacting with neutrons, meaning more plutonium. Since NU has a lower enrichment and therefore reactivity as well, its burnup will always be lower, leading to more weapons-grade Pu-239 overall compared to enriched fuels * Deuterium + Tritium * Added check to prevent constant power drain when a deuterium machine cannot produce more heavy water, but still has enough input water and energy to process * sorry, i'm clowning * Fixed shadowed fields for deuterium machines Deuterium towers did not consume the correct amount of energy, as a final called maxPower was used in the superclass instead of getMaxPower() directly * Update ChemplantRecipes.java
This commit is contained in:
parent
8779cb3032
commit
54d0394fa0
@ -74,7 +74,7 @@ public class DeuteriumTower extends BlockDummyable implements ILookOverlay {
|
||||
TileEntityDeuteriumTower tower = (TileEntityDeuteriumTower) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add((tower.power < tower.maxPower / 10 ? EnumChatFormatting.RED : EnumChatFormatting.GREEN) + "Power: " + BobMathUtil.getShortNumber(tower.power) + "HE");
|
||||
text.add((tower.power < tower.getMaxPower() / 20 ? EnumChatFormatting.RED : EnumChatFormatting.GREEN) + "Power: " + BobMathUtil.getShortNumber(tower.power) + "HE");
|
||||
|
||||
for(int i = 0; i < tower.tanks.length; i++)
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + tower.tanks[i].getTankType().getName().toLowerCase()) + ": " + tower.tanks[i].getFill() + "/" + tower.tanks[i].getMaxFill() + "mB");
|
||||
|
||||
@ -63,7 +63,7 @@ public class MachineDeuteriumExtractor extends BlockContainer implements ILookOv
|
||||
TileEntityDeuteriumExtractor extractor = (TileEntityDeuteriumExtractor) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add((extractor.power < extractor.maxPower / 10 ? EnumChatFormatting.RED : EnumChatFormatting.GREEN) + "Power: " + BobMathUtil.getShortNumber(extractor.power) + "HE");
|
||||
text.add((extractor.power < extractor.getMaxPower() / 20 ? EnumChatFormatting.RED : EnumChatFormatting.GREEN) + "Power: " + BobMathUtil.getShortNumber(extractor.power) + "HE");
|
||||
|
||||
for(int i = 0; i < extractor.tanks.length; i++)
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + extractor.tanks[i].getTankType().getName().toLowerCase()) + ": " + extractor.tanks[i].getFill() + "/" + extractor.tanks[i].getMaxFill() + "mB");
|
||||
|
||||
@ -336,7 +336,7 @@ public class HazardRegistry {
|
||||
|
||||
HazardSystem.register(pile_rod_uranium, makeData(RADIATION, u * billet * 3));
|
||||
HazardSystem.register(pile_rod_pu239, makeData(RADIATION, !GeneralConfig.enable528 ? purg * billet + pu239 * billet + u * billet : purg * billet + pu239 * billet + wst * billet));
|
||||
HazardSystem.register(pile_rod_plutonium, makeData(RADIATION, !GeneralConfig.enable528 ? purg * billet * 3 : purg * billet * 2 + wst * billet));
|
||||
HazardSystem.register(pile_rod_plutonium, makeData(RADIATION, !GeneralConfig.enable528 ? purg * billet * 2 + u * billet : purg * billet * 2 + wst * billet));
|
||||
HazardSystem.register(pile_rod_source, makeData(RADIATION, rabe * billet * 3));
|
||||
|
||||
registerBreedingRodRadiation(BreedingRodType.TRITIUM, 0.001F);
|
||||
|
||||
@ -90,6 +90,11 @@ public class GUIReactorResearch extends GuiInfoContainer {
|
||||
super.mouseClicked(mouseX, mouseY, i);
|
||||
this.field.mouseClicked(mouseX, mouseY, i);
|
||||
|
||||
if(guiLeft + 8 <= mouseX && guiLeft + 8 + 33 > mouseX && guiTop + 99 < mouseY && guiTop + 99 + 16 >= mouseY)
|
||||
displays[2].setBlinks(true);
|
||||
else
|
||||
displays[2].setBlinks(false);
|
||||
|
||||
if(guiLeft + 44 <= mouseX && guiLeft + 44 + 11 > mouseX && guiTop + 97 < mouseY && guiTop + 97 + 20 >= mouseY) {
|
||||
|
||||
double level;
|
||||
|
||||
@ -129,6 +129,10 @@ public abstract class GuiInfoContainer extends GuiContainer {
|
||||
private char[] toDisp = {'0', '0', '0'};
|
||||
@Nonnegative
|
||||
private short dispOffset = 0;
|
||||
/** Length and thickness of segments. **/
|
||||
private int verticalLength = 5;
|
||||
private int horizontalLength = 4;
|
||||
private int thickness = 1;
|
||||
/**
|
||||
* Construct a new number display
|
||||
* @param dX X coordinate of the display
|
||||
@ -229,7 +233,7 @@ public abstract class GuiInfoContainer extends GuiContainer {
|
||||
{
|
||||
if (num[i] == '.')
|
||||
gap--;
|
||||
dispOffset = (short) ((padding + 6) * (i + gap));
|
||||
dispOffset = (short) ((padding + horizontalLength + 2 * thickness) * (i + gap));
|
||||
drawChar(num[i]);
|
||||
}
|
||||
if (pads)
|
||||
@ -253,7 +257,7 @@ public abstract class GuiInfoContainer extends GuiContainer {
|
||||
return;
|
||||
for (int i = 0; i < gap; i++)
|
||||
{
|
||||
dispOffset = (short) ((padding + 6) * i);
|
||||
dispOffset = (short) ((padding + horizontalLength + 2 * thickness) * i);
|
||||
drawChar('0');
|
||||
}
|
||||
}
|
||||
@ -351,20 +355,21 @@ public abstract class GuiInfoContainer extends GuiContainer {
|
||||
|
||||
private void drawHorizontal(int pos)
|
||||
{
|
||||
byte offset = (byte) (pos * 6);
|
||||
renderSegment(guiLeft + displayX + dispOffset + 1, guiTop + displayY + offset, 4, 1);
|
||||
byte offset = (byte) (pos * (verticalLength + thickness));
|
||||
renderSegment(guiLeft + displayX + dispOffset + thickness, guiTop + displayY + offset, horizontalLength, thickness);
|
||||
}
|
||||
|
||||
private void drawPeriod()
|
||||
{
|
||||
renderSegment(guiLeft + displayX + dispOffset + padding - (int) Math.ceil(padding / 2) + 5, guiTop + displayY + 12, 1, 1);
|
||||
renderSegment(guiLeft + displayX + dispOffset + padding - (int) Math.ceil(padding / 2) + (horizontalLength + thickness),
|
||||
guiTop + displayY + 2 * (verticalLength + thickness), thickness, thickness);
|
||||
}
|
||||
|
||||
private void drawVertical(int posX, int posY)
|
||||
{
|
||||
byte offsetX = (byte) (posX * 5);
|
||||
byte offsetY = (byte) (posY * 6);
|
||||
renderSegment(guiLeft + displayX + offsetX + dispOffset, guiTop + displayY + offsetY + 1, 1, 5);
|
||||
byte offsetX = (byte) (posX * (horizontalLength + thickness));
|
||||
byte offsetY = (byte) (posY * (verticalLength + thickness));
|
||||
renderSegment(guiLeft + displayX + offsetX + dispOffset, guiTop + displayY + offsetY + thickness, thickness, verticalLength);
|
||||
}
|
||||
/**
|
||||
* drawTexturedModalRect() for cool kids
|
||||
@ -413,9 +418,9 @@ public abstract class GuiInfoContainer extends GuiContainer {
|
||||
return toDisp.clone();
|
||||
}
|
||||
/** Make the display blink **/
|
||||
public NumberDisplay setBlinks()
|
||||
public NumberDisplay setBlinks(boolean doesBlink)
|
||||
{
|
||||
blink = true;
|
||||
blink = doesBlink;
|
||||
return this;
|
||||
}
|
||||
/** Padding between digits, default 3 **/
|
||||
@ -431,6 +436,14 @@ public abstract class GuiInfoContainer extends GuiContainer {
|
||||
toDisp = truncOrExpand();
|
||||
return this;
|
||||
}
|
||||
/** Set sizes and thickness of horizontal and vertical segments. **/
|
||||
public NumberDisplay setSegmentSize(int vertical, int horizontal, int thickness)
|
||||
{
|
||||
this.verticalLength = vertical;
|
||||
this.horizontalLength = horizontal;
|
||||
this.thickness = thickness;
|
||||
return this;
|
||||
}
|
||||
/** Set custom number bounds **/
|
||||
public NumberDisplay setMaxMin(float max, float min)
|
||||
{
|
||||
|
||||
@ -780,12 +780,12 @@ public class AssemblerRecipes {
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_deuterium_extractor, 1), new AStack[] {
|
||||
new ComparableStack(ModItems.deuterium_filter, 1),
|
||||
new ComparableStack(ModItems.sulfur, 12),
|
||||
new OreDictStack(STEEL.plate(), 8),
|
||||
new OreDictStack(AL.plate(), 4),
|
||||
new ComparableStack(ModItems.pipes_steel),
|
||||
new ComparableStack(ModItems.board_copper, 2),
|
||||
new OreDictStack(STEEL.plate(), 4),
|
||||
new OreDictStack(AL.plate(), 2),
|
||||
new ComparableStack(ModBlocks.deco_pipe_quad, 4),
|
||||
new ComparableStack(ModItems.board_copper, 1),
|
||||
new ComparableStack(ModItems.turbine_titanium, 2),
|
||||
new ComparableStack(ModItems.circuit_aluminium, 3)
|
||||
new ComparableStack(ModItems.circuit_aluminium, 2)
|
||||
}, 100);
|
||||
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_chemfac, 1), new AStack[] {
|
||||
|
||||
@ -84,28 +84,30 @@ public class SILEXRecipes {
|
||||
for(int i = 0; i < 5; i++) {
|
||||
|
||||
// UEU //
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_ueu, 1, i), new SILEXRecipe(600, 100, 1)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u238), 88 - i * 6))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u235), 8 - i * 2))
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_ueu, 1, i), new SILEXRecipe(600, 100, 1) //NU and MEU will breed more plutonium due to their higher concentrations of U-238
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_uranium), 86 - i * 11)) //NU is unenriched to the point where it'll always be lower burnup; so more Pu239 for longer
|
||||
.addOut(new WeightedRandomObject(i < 2 ? new ItemStack(ModItems.nugget_pu239) : new ItemStack(ModItems.nugget_pu_mix), 10 + i * 3))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), 2 + 3 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), 2 + 5 * i)) );
|
||||
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_ueu, 1, i + 5), new SILEXRecipe(600, 100, 1)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u238), 88 - i * 6))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u235), 8 - i * 2))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_uranium), 86 - i * 11))
|
||||
.addOut(new WeightedRandomObject(i < 2 ? new ItemStack(ModItems.nugget_pu239) : new ItemStack(ModItems.nugget_pu_mix), 10 + i * 3))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), 2 + 3 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), 1 + 5 * i)) );
|
||||
|
||||
// MEU //
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_meu, 1, i), new SILEXRecipe(600, 100, 1)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_uranium_fuel), 90 - i * 12))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_uranium_fuel), 84 - i * 16))
|
||||
.addOut(new WeightedRandomObject(i < 1 ? new ItemStack(ModItems.nugget_pu239) : new ItemStack(ModItems.nugget_pu_mix), 6 + i * 4))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), 4 + 5 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), 6 + 7 * i)) );
|
||||
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_meu, 1, i + 5), new SILEXRecipe(600, 100, 1)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_uranium_fuel), 89 - i * 12))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_uranium_fuel), 83 - i * 16))
|
||||
.addOut(new WeightedRandomObject(i < 1 ? new ItemStack(ModItems.nugget_pu239) : new ItemStack(ModItems.nugget_pu_mix), 6 + i * 4))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), 4 + 5 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), 6 + 7 * i)) );
|
||||
|
||||
@ -135,23 +137,27 @@ public class SILEXRecipes {
|
||||
|
||||
// TH232 //
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_thmeu, 1, i), new SILEXRecipe(600, 100, 1)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_thorium_fuel), 90 - i * 20))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.THORIUM.ordinal()), 10 + 20 * i)) );
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_thorium_fuel), 84 - i * 20))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u233), 6 + i * 4))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.THORIUM.ordinal()), 10 + 16 * i)) );
|
||||
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_thmeu, 1, i + 5), new SILEXRecipe(600, 100, 1)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_thorium_fuel), 89 - i * 20))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.THORIUM.ordinal()), 10 + 20 * i)) );
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_thorium_fuel), 83 - i * 20))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u233), 6 + i * 4))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.THORIUM.ordinal()), 10 + 16 * i)) );
|
||||
|
||||
// LEP //
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_lep, 1, i), new SILEXRecipe(600, 100, 1)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_plutonium_fuel), 90 - i * 12))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_plutonium_fuel), 84 - i * 14))
|
||||
.addOut(new WeightedRandomObject(i < 1 ? new ItemStack(ModItems.nugget_pu239) : new ItemStack(ModItems.nugget_pu_mix), 6 + i * 2))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM239.ordinal()), 7 + 8 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM240.ordinal()), 3 + 4 * i)) );
|
||||
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_lep, 1, i + 5), new SILEXRecipe(600, 100, 1)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_plutonium_fuel), 89 - i * 12))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_plutonium_fuel), 83 - i * 14))
|
||||
.addOut(new WeightedRandomObject(i < 1 ? new ItemStack(ModItems.nugget_pu239) : new ItemStack(ModItems.nugget_pu_mix), 6 + i * 2))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM239.ordinal()), 7 + 8 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM240.ordinal()), 3 + 4 * i)) );
|
||||
|
||||
@ -189,13 +195,15 @@ public class SILEXRecipes {
|
||||
|
||||
// MEN //
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_men, 1, i), new SILEXRecipe(600, 100, 1)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_neptunium_fuel), 90 - i * 12))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_neptunium_fuel), 84 - i * 14))
|
||||
.addOut(new WeightedRandomObject(i < 1 ? new ItemStack(ModItems.nugget_pu239) : new ItemStack(ModItems.nugget_pu_mix), 6 + i * 2))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.NEPTUNIUM.ordinal()), 4 + 5 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.NEPTUNIUM.ordinal()), 6 + 7 * i)) );
|
||||
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_men, 1, i + 5), new SILEXRecipe(600, 100, 1)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_neptunium_fuel), 89 - i * 12))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_neptunium_fuel), 83 - i * 14))
|
||||
.addOut(new WeightedRandomObject(i < 1 ? new ItemStack(ModItems.nugget_pu239) : new ItemStack(ModItems.nugget_pu_mix), 6 + i * 2))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.NEPTUNIUM.ordinal()), 4 + 5 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.NEPTUNIUM.ordinal()), 6 + 7 * i)) );
|
||||
|
||||
@ -213,18 +221,20 @@ public class SILEXRecipes {
|
||||
|
||||
// MOX //
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_mox, 1, i), new SILEXRecipe(600, 100, 1)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_mox_fuel), 90 - i * 20))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), 2 + 4 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), 3 + 6 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM239.ordinal()), 3 + 7 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_mox_fuel), 84 - i * 20))
|
||||
.addOut(new WeightedRandomObject(i < 1 ? new ItemStack(ModItems.nugget_pu239) : new ItemStack(ModItems.nugget_pu_mix), 6 + i * 4))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), 2 + 3 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), 3 + 5 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM239.ordinal()), 3 + 5 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM240.ordinal()), 2 + 3 * i)) );
|
||||
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_mox, 1, i + 5), new SILEXRecipe(600, 100, 1)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_mox_fuel), 89 - i * 20))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), 2 + 4 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), 3 + 6 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM239.ordinal()), 3 + 7 * i))
|
||||
//TODO: Readd xenon processing if/when the NEI handler can display more than 6 outputs properly
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_mox, 1, i + 5), new SILEXRecipe(600, 100, 1) //Plutonium processing isn't possible w/o fucking up the NEI handler or removing xenon
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_mox_fuel), 84 - i * 20)) //To prevent people from taking advantage of differing waste types, conform to the latter
|
||||
.addOut(new WeightedRandomObject(i < 1 ? new ItemStack(ModItems.nugget_pu239) : new ItemStack(ModItems.nugget_pu_mix), 6 + i * 4))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), 2 + 3 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), 3 + 5 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM239.ordinal()), 3 + 5 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM240.ordinal()), 2 + 3 * i)) );
|
||||
|
||||
// LEAUS //
|
||||
@ -262,6 +272,7 @@ public class SILEXRecipes {
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.SCHRABIDIUM.ordinal()), 1 + 2 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_coal_tiny), 4 + 8 * i)) );
|
||||
|
||||
//TODO: Readd xenon processing if/when the NEI handler can display more than 6 outputs properly
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_les, 1, i + 5), new SILEXRecipe(600, 100, 2) //I'd rather not fuck up the NEI handler, so six items it is
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_les), 90 - i * 20)) //Just bullshit something about "not enough np237 for extractable amounts of xe135"
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.NEPTUNIUM.ordinal()), 2 + 3 * i))
|
||||
@ -279,6 +290,7 @@ public class SILEXRecipes {
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.SCHRABIDIUM.ordinal()), 2 + 4 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_coal_tiny), 4 + 7 * i)) );
|
||||
|
||||
//TODO: Readd xenon processing if/when the NEI handler can display more than 6 outputs properly
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_mes, 1, i + 5), new SILEXRecipe(600, 100, 2)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_schrabidium_fuel), 90 - i * 20)) //ditto
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.NEPTUNIUM.ordinal()), 1 + 2 * i))
|
||||
@ -296,6 +308,7 @@ public class SILEXRecipes {
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.SCHRABIDIUM.ordinal()), 4 + 6 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_coal_tiny), 2 + 4 * i)) );
|
||||
|
||||
//TODO: Readd xenon processing if/when the NEI handler can display more than 6 outputs properly
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_hes, 1, i + 5), new SILEXRecipe(600, 100, 2)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_hes), 90 - i * 20)) //ditto
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.NEPTUNIUM.ordinal()), 1 + 2 * i))
|
||||
|
||||
@ -204,7 +204,7 @@ public class AnvilRecipes {
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {
|
||||
new ComparableStack(ModItems.deuterium_filter, 3),
|
||||
new ComparableStack(ModItems.deuterium_filter, 2),
|
||||
new ComparableStack(ModItems.hull_big_steel, 5),
|
||||
new ComparableStack(ModBlocks.concrete_smooth, 8),
|
||||
new ComparableStack(ModBlocks.concrete_asbestos, 4),
|
||||
@ -666,7 +666,8 @@ public class AnvilRecipes {
|
||||
}).setTier(4));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new ComparableStack(ModItems.pile_rod_plutonium), new AnvilOutput[] {
|
||||
new AnvilOutput(new ItemStack(ModItems.billet_pu_mix, 3)),
|
||||
new AnvilOutput(new ItemStack(ModItems.billet_pu_mix, 2)),
|
||||
new AnvilOutput(new ItemStack(ModItems.billet_uranium, 1)),
|
||||
new AnvilOutput(new ItemStack(ModItems.plate_iron, 2))
|
||||
}).setTier(2));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
|
||||
@ -19,6 +19,7 @@ import com.hbm.items.machine.ItemFELCrystal.EnumWavelengths;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||
import com.hbm.items.machine.ItemPlateFuel.FunctionEnum;
|
||||
import com.hbm.items.machine.ItemRBMKRod.EnumBurnFunc;
|
||||
import com.hbm.items.machine.ItemRBMKRod.EnumDepleteFunc;
|
||||
import com.hbm.items.machine.ItemRTGPelletDepleted.DepletedRTGMaterial;
|
||||
import com.hbm.items.machine.ItemStamp.StampType;
|
||||
import com.hbm.items.special.*;
|
||||
@ -3584,7 +3585,7 @@ public class ModItems {
|
||||
rod_zirnox_u233_fuel = new ItemZirnoxRod(87500, 80).setUnlocalizedName("rod_zirnox_u233_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_u233_fuel");
|
||||
rod_zirnox_u235_fuel = new ItemZirnoxRod(85000, 85).setUnlocalizedName("rod_zirnox_u235_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_u235_fuel");
|
||||
rod_zirnox_les_fuel = new ItemZirnoxRod(150000, 150).setUnlocalizedName("rod_zirnox_les_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_les_fuel");
|
||||
rod_zirnox_lithium = new ItemZirnoxBreedingRod(10000, 0).setUnlocalizedName("rod_zirnox_lithium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_lithium");
|
||||
rod_zirnox_lithium = new ItemZirnoxBreedingRod(20000, 0).setUnlocalizedName("rod_zirnox_lithium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_lithium");
|
||||
rod_zirnox_tritium = new Item().setUnlocalizedName("rod_zirnox_tritium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_zirnox_empty).setTextureName(RefStrings.MODID + ":rod_zirnox_tritium");
|
||||
|
||||
rod_zirnox_natural_uranium_fuel_depleted = new Item().setUnlocalizedName("rod_zirnox_natural_uranium_fuel_depleted").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_zirnox_empty).setTextureName(RefStrings.MODID + ":rod_zirnox_uranium_fuel_depleted");
|
||||
@ -3669,12 +3670,16 @@ public class ModItems {
|
||||
.setYield(100000000D)
|
||||
.setStats(15)
|
||||
.setFunction(EnumBurnFunc.LOG_TEN)
|
||||
.setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE)
|
||||
.setHeat(0.5)
|
||||
.setMeltingPoint(2865)
|
||||
.setUnlocalizedName("rbmk_fuel_ueu").setTextureName(RefStrings.MODID + ":rbmk_fuel_ueu");
|
||||
rbmk_fuel_meu = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_meu)
|
||||
.setYield(100000000D)
|
||||
.setStats(20)
|
||||
.setFunction(EnumBurnFunc.LOG_TEN)
|
||||
.setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE)
|
||||
.setHeat(0.65) //0.75 was a bit too much
|
||||
.setMeltingPoint(2865)
|
||||
.setUnlocalizedName("rbmk_fuel_meu").setTextureName(RefStrings.MODID + ":rbmk_fuel_meu");
|
||||
rbmk_fuel_heu233 = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_heu233)
|
||||
@ -3694,26 +3699,29 @@ public class ModItems {
|
||||
.setYield(100000000D)
|
||||
.setStats(12)
|
||||
.setFunction(EnumBurnFunc.PLATEU)
|
||||
.setDepletionFunction(EnumDepleteFunc.BOOSTED_SLOPE)
|
||||
.setHeat(0.75D)
|
||||
.setMeltingPoint(3350)
|
||||
.setUnlocalizedName("rbmk_fuel_thmeu").setTextureName(RefStrings.MODID + ":rbmk_fuel_thmeu");
|
||||
rbmk_fuel_lep = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_lep)
|
||||
.setYield(100000000D)
|
||||
.setStats(35)
|
||||
.setFunction(EnumBurnFunc.LOG_TEN)
|
||||
.setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE)
|
||||
.setHeat(0.75D)
|
||||
.setMeltingPoint(2744)
|
||||
.setUnlocalizedName("rbmk_fuel_lep").setTextureName(RefStrings.MODID + ":rbmk_fuel_lep");
|
||||
rbmk_fuel_mep = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_mep)
|
||||
.setYield(100000000D)
|
||||
.setStats(35, 20)
|
||||
.setFunction(EnumBurnFunc.SQUARE_ROOT)
|
||||
.setHeat(1.25D)
|
||||
.setMeltingPoint(2744)
|
||||
.setUnlocalizedName("rbmk_fuel_mep").setTextureName(RefStrings.MODID + ":rbmk_fuel_mep");
|
||||
rbmk_fuel_hep239 = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_hep239)
|
||||
.setYield(100000000D)
|
||||
.setStats(30)
|
||||
.setFunction(EnumBurnFunc.LINEAR)
|
||||
.setHeat(1.5D)
|
||||
.setHeat(1.25D)
|
||||
.setMeltingPoint(2744)
|
||||
.setUnlocalizedName("rbmk_fuel_hep").setTextureName(RefStrings.MODID + ":rbmk_fuel_hep");
|
||||
rbmk_fuel_hep241 = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_hep241)
|
||||
@ -3727,6 +3735,7 @@ public class ModItems {
|
||||
.setYield(100000000D)
|
||||
.setStats(60, 10)
|
||||
.setFunction(EnumBurnFunc.SQUARE_ROOT)
|
||||
.setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE)
|
||||
.setHeat(1.5D)
|
||||
.setMeltingPoint(2386)
|
||||
.setUnlocalizedName("rbmk_fuel_lea").setTextureName(RefStrings.MODID + ":rbmk_fuel_lea");
|
||||
@ -3741,7 +3750,7 @@ public class ModItems {
|
||||
.setYield(100000000D)
|
||||
.setStats(65, 15)
|
||||
.setFunction(EnumBurnFunc.SQUARE_ROOT)
|
||||
.setHeat(1.75D)
|
||||
.setHeat(1.85D)
|
||||
.setMeltingPoint(2386)
|
||||
.setNeutronTypes(NType.FAST, NType.FAST)
|
||||
.setUnlocalizedName("rbmk_fuel_hea241").setTextureName(RefStrings.MODID + ":rbmk_fuel_hea241");
|
||||
@ -3756,6 +3765,8 @@ public class ModItems {
|
||||
.setYield(100000000D)
|
||||
.setStats(30)
|
||||
.setFunction(EnumBurnFunc.SQUARE_ROOT)
|
||||
.setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE)
|
||||
.setHeat(0.75)
|
||||
.setMeltingPoint(2800)
|
||||
.setNeutronTypes(NType.FAST, NType.FAST)
|
||||
.setUnlocalizedName("rbmk_fuel_men").setTextureName(RefStrings.MODID + ":rbmk_fuel_men");
|
||||
@ -3770,13 +3781,14 @@ public class ModItems {
|
||||
.setYield(100000000D)
|
||||
.setStats(40)
|
||||
.setFunction(EnumBurnFunc.LOG_TEN)
|
||||
.setHeat(1.5D)
|
||||
.setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE)
|
||||
.setMeltingPoint(2815)
|
||||
.setUnlocalizedName("rbmk_fuel_mox").setTextureName(RefStrings.MODID + ":rbmk_fuel_mox");
|
||||
rbmk_fuel_les = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_les)
|
||||
.setYield(100000000D)
|
||||
.setStats(50)
|
||||
.setFunction(EnumBurnFunc.SQUARE_ROOT)
|
||||
.setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE)
|
||||
.setHeat(1.25D)
|
||||
.setMeltingPoint(2500)
|
||||
.setUnlocalizedName("rbmk_fuel_les").setTextureName(RefStrings.MODID + ":rbmk_fuel_les");
|
||||
@ -3791,6 +3803,7 @@ public class ModItems {
|
||||
.setYield(100000000D)
|
||||
.setStats(90)
|
||||
.setFunction(EnumBurnFunc.LINEAR)
|
||||
.setDepletionFunction(EnumDepleteFunc.LINEAR)
|
||||
.setHeat(1.75D)
|
||||
.setMeltingPoint(3000)
|
||||
.setUnlocalizedName("rbmk_fuel_hes").setTextureName(RefStrings.MODID + ":rbmk_fuel_hes");
|
||||
@ -3798,6 +3811,7 @@ public class ModItems {
|
||||
.setYield(100000000D)
|
||||
.setStats(30)
|
||||
.setFunction(EnumBurnFunc.SIGMOID)
|
||||
.setDepletionFunction(EnumDepleteFunc.LINEAR)
|
||||
.setXenon(0.05D, 50D)
|
||||
.setHeat(1.5D)
|
||||
.setMeltingPoint(7029).setUnlocalizedName("rbmk_fuel_leaus").setTextureName(RefStrings.MODID + ":rbmk_fuel_leaus");
|
||||
@ -3812,6 +3826,7 @@ public class ModItems {
|
||||
.setYield(25000000D)
|
||||
.setStats(15, 40)
|
||||
.setFunction(EnumBurnFunc.SQUARE_ROOT)
|
||||
.setDepletionFunction(EnumDepleteFunc.LINEAR)
|
||||
.setXenon(0.0D, 50D)
|
||||
.setHeat(0.1D)
|
||||
.setDiffusion(0.05D)
|
||||
@ -3821,6 +3836,7 @@ public class ModItems {
|
||||
.setYield(100000000D)
|
||||
.setStats(0D, 20)
|
||||
.setFunction(EnumBurnFunc.PASSIVE)
|
||||
.setDepletionFunction(EnumDepleteFunc.LINEAR)
|
||||
.setXenon(0.0D, 50D)
|
||||
.setHeat(0.035D)
|
||||
.setDiffusion(0.5D)
|
||||
@ -3838,6 +3854,7 @@ public class ModItems {
|
||||
.setYield(100000000D)
|
||||
.setStats(50, 10)
|
||||
.setFunction(EnumBurnFunc.ARCH)
|
||||
.setDepletionFunction(EnumDepleteFunc.LINEAR)
|
||||
.setXenon(0.0D, 50D)
|
||||
.setMeltingPoint(2000)
|
||||
.setUnlocalizedName("rbmk_fuel_balefire_gold").setTextureName(RefStrings.MODID + ":rbmk_fuel_balefire_gold");
|
||||
@ -3845,6 +3862,7 @@ public class ModItems {
|
||||
.setYield(250000000D)
|
||||
.setStats(40, 50)
|
||||
.setFunction(EnumBurnFunc.ARCH)
|
||||
.setDepletionFunction(EnumDepleteFunc.LINEAR)
|
||||
.setXenon(0.0D, 50D)
|
||||
.setMeltingPoint(2050)
|
||||
.setUnlocalizedName("rbmk_fuel_flashlead").setTextureName(RefStrings.MODID + ":rbmk_fuel_flashlead");
|
||||
|
||||
@ -25,7 +25,7 @@ public class ItemRBMKRod extends Item {
|
||||
public double reactivity; //endpoint of the function
|
||||
public double selfRate; //self-inflicted flux from self-igniting fuels
|
||||
public EnumBurnFunc function = EnumBurnFunc.LOG_TEN;
|
||||
public EnumDepleteFunction depFunc = EnumDepleteFunction.LINEAR;
|
||||
public EnumDepleteFunc depFunc = EnumDepleteFunc.GENTLE_SLOPE;
|
||||
public double xGen = 0.5D; //multiplier for xenon production
|
||||
public double xBurn = 50D; //divider for xenon burnup
|
||||
public double heat = 1D; //heat produced per outFlux
|
||||
@ -88,7 +88,7 @@ public class ItemRBMKRod extends Item {
|
||||
return this;
|
||||
}
|
||||
|
||||
public ItemRBMKRod setDepletionFunction(EnumDepleteFunction func) {
|
||||
public ItemRBMKRod setDepletionFunction(EnumDepleteFunc func) {
|
||||
this.depFunc = func;
|
||||
return this;
|
||||
}
|
||||
@ -239,7 +239,7 @@ public class ItemRBMKRod extends Item {
|
||||
*/
|
||||
public double reactivityFunc(double in, double enrichment) {
|
||||
|
||||
double flux = in * reativityModByEnrichment(enrichment);
|
||||
double flux = in * reactivityModByEnrichment(enrichment);
|
||||
|
||||
switch(this.function) {
|
||||
case PASSIVE: return selfRate * enrichment;
|
||||
@ -256,29 +256,46 @@ public class ItemRBMKRod extends Item {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public String getFuncDescription() {
|
||||
public String getFuncDescription(ItemStack stack) {
|
||||
|
||||
String x = "x";
|
||||
|
||||
if(selfRate > 0)
|
||||
x = "(x" + EnumChatFormatting.RED + " + " + selfRate + "" + EnumChatFormatting.WHITE + ")";
|
||||
String function;
|
||||
|
||||
switch(this.function) {
|
||||
case PASSIVE: return EnumChatFormatting.RED + "" + selfRate;
|
||||
case LOG_TEN: return "log10(x + 1" + (selfRate > 0 ? (EnumChatFormatting.RED + " + " + selfRate) : "") + EnumChatFormatting.WHITE + ") * 0.5 * " + reactivity;
|
||||
case PLATEU: return "(1 - e^-" + x + " / 25)) * " + reactivity;
|
||||
case ARCH: return "(" + x + " - " + x + "² / 10000) / 100 * " + reactivity + " [0;∞]";
|
||||
case SIGMOID: return reactivity + " / (1 + e^(-(" + x + " - 50) / 10)";
|
||||
case SQUARE_ROOT: return "sqrt(" + x + ") * " + reactivity + " / 10";
|
||||
case LINEAR: return x + " / 100 * " + reactivity;
|
||||
case QUADRATIC: return x + "² / 10000 * " + reactivity;
|
||||
case EXPERIMENTAL: return x + " * (sin(" + x + ") + 1) * " + reactivity;
|
||||
case PASSIVE: function = EnumChatFormatting.RED + "" + selfRate;
|
||||
break;
|
||||
case LOG_TEN: function = "log10(%1$s + 1) * 0.5 * %2$s";
|
||||
break;
|
||||
case PLATEU: function = "(1 - e^-%1$s / 25)) * %2$s";
|
||||
break;
|
||||
case ARCH: function = "(%1$s - %1$s² / 10000) / 100 * %2$s [0;∞]";
|
||||
break;
|
||||
case SIGMOID: function = "%2$s / (1 + e^(-(%1$s - 50) / 10)";
|
||||
break;
|
||||
case SQUARE_ROOT: function = "sqrt(%1$s) * %2$s / 10";
|
||||
break;
|
||||
case LINEAR: function = "%1$s / 100 * %2$s";
|
||||
break;
|
||||
case QUADRATIC: function = "%1$s² / 10000 * %2$s";
|
||||
break;
|
||||
case EXPERIMENTAL: function = "%1$s * (sin(%1$s) + 1) * %2$s";
|
||||
break;
|
||||
default: function = "ERROR";
|
||||
}
|
||||
|
||||
return "ERROR";
|
||||
double enrichment = getEnrichment(stack);
|
||||
|
||||
if(enrichment < 1) {
|
||||
enrichment = reactivityModByEnrichment(enrichment);
|
||||
String reactivity = EnumChatFormatting.YELLOW + "" + ((int)(this.reactivity * enrichment * 1000D) / 1000D) + EnumChatFormatting.WHITE;
|
||||
String enrichmentPer = EnumChatFormatting.GOLD + " (" + ((int)(enrichment * 1000D) / 1000D) + "%)";
|
||||
|
||||
return String.format(function, selfRate > 0 ? "(x" + EnumChatFormatting.RED + " + " + selfRate + "" + EnumChatFormatting.WHITE + ")" : "x", reactivity).concat(enrichmentPer);
|
||||
}
|
||||
|
||||
return String.format(function, selfRate > 0 ? "(x" + EnumChatFormatting.RED + " + " + selfRate + "" + EnumChatFormatting.WHITE + ")" : "x", reactivity);
|
||||
}
|
||||
|
||||
public static enum EnumDepleteFunction {
|
||||
public static enum EnumDepleteFunc {
|
||||
LINEAR, //old function
|
||||
RAISING_SLOPE, //for breeding fuels such as MEU, maximum of 110% at 28% depletion
|
||||
BOOSTED_SLOPE, //for strong breeding fuels such Th232, maximum of 132% at 64% depletion
|
||||
@ -286,15 +303,15 @@ public class ItemRBMKRod extends Item {
|
||||
STATIC; //for arcade-style neutron sources
|
||||
}
|
||||
|
||||
public double reativityModByEnrichment(double enrichment) {
|
||||
public double reactivityModByEnrichment(double enrichment) {
|
||||
|
||||
switch(this.depFunc) {
|
||||
default:
|
||||
case LINEAR: return enrichment;
|
||||
case STATIC: return 1D;
|
||||
case BOOSTED_SLOPE: return -enrichment + 1 + Math.sin(enrichment * enrichment * Math.PI);
|
||||
case RAISING_SLOPE: return -enrichment + 1 + (Math.sin(enrichment * Math.PI) / 2D);
|
||||
case GENTLE_SLOPE: return -enrichment + 1 + (Math.sin(enrichment * Math.PI) / 3D);
|
||||
case BOOSTED_SLOPE: return enrichment + Math.sin((enrichment - 1) * (enrichment - 1) * Math.PI); //x + sin([x - 1]^2 * pi) works
|
||||
case RAISING_SLOPE: return enrichment + (Math.sin(enrichment * Math.PI) / 2D); //x + (sin(x * pi) / 2) actually works
|
||||
case GENTLE_SLOPE: return enrichment + (Math.sin(enrichment * Math.PI) / 3D); //x + (sin(x * pi) / 3) also works
|
||||
}
|
||||
}
|
||||
|
||||
@ -347,7 +364,7 @@ public class ItemRBMKRod extends Item {
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + I18nUtil.resolveKey("trait.rbmx.xenon", ((int)(getPoison(stack) * 1000D) / 1000D) + "%"));
|
||||
list.add(EnumChatFormatting.BLUE + I18nUtil.resolveKey("trait.rbmx.splitsWith", I18nUtil.resolveKey(nType.unlocalized + ".x")));
|
||||
list.add(EnumChatFormatting.BLUE + I18nUtil.resolveKey("trait.rbmx.splitsInto", I18nUtil.resolveKey(rType.unlocalized + ".x")));
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("trait.rbmx.fluxFunc", EnumChatFormatting.WHITE + getFuncDescription()));
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("trait.rbmx.fluxFunc", EnumChatFormatting.WHITE + getFuncDescription(stack)));
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("trait.rbmx.funcType", this.function.title));
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("trait.rbmx.xenonGen", EnumChatFormatting.WHITE + "x * " + xGen));
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("trait.rbmx.xenonBurn", EnumChatFormatting.WHITE + "x² * " + xBurn));
|
||||
@ -367,7 +384,7 @@ public class ItemRBMKRod extends Item {
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + I18nUtil.resolveKey("trait.rbmk.xenon", ((int)(getPoison(stack) * 1000D) / 1000D) + "%"));
|
||||
list.add(EnumChatFormatting.BLUE + I18nUtil.resolveKey("trait.rbmk.splitsWith", I18nUtil.resolveKey(nType.unlocalized)));
|
||||
list.add(EnumChatFormatting.BLUE + I18nUtil.resolveKey("trait.rbmk.splitsInto", I18nUtil.resolveKey(rType.unlocalized)));
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("trait.rbmk.fluxFunc", EnumChatFormatting.WHITE + getFuncDescription()));
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("trait.rbmk.fluxFunc", EnumChatFormatting.WHITE + getFuncDescription(stack)));
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("trait.rbmk.funcType", this.function.title));
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("trait.rbmk.xenonGen", EnumChatFormatting.WHITE + "x * " + xGen));
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("trait.rbmk.xenonBurn", EnumChatFormatting.WHITE + "x² * " + xBurn));
|
||||
|
||||
@ -9,7 +9,6 @@ import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
|
||||
@ -20,10 +19,8 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityDeuteriumExtractor extends TileEntityMachineBase implements IFluidAcceptor, IFluidSource, IEnergyUser, IFluidStandardTransceiver {
|
||||
|
||||
public int age = 0;
|
||||
|
||||
public long power = 0;
|
||||
public static final long maxPower = 100000;
|
||||
public FluidTank[] tanks;
|
||||
public List<IFluidAcceptor> list = new ArrayList();
|
||||
|
||||
@ -45,33 +42,28 @@ public class TileEntityDeuteriumExtractor extends TileEntityMachineBase implemen
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
this.updateConnections();
|
||||
|
||||
this.tanks[0].updateTank(this, 25);
|
||||
this.tanks[1].updateTank(this, 25);
|
||||
|
||||
age++;
|
||||
if(age >= 10) {
|
||||
age = 0;
|
||||
if(hasPower() && hasEnoughWater()) {
|
||||
int convert = Math.min(tanks[0].getFill(), tanks[1].getMaxFill() - tanks[1].getFill());
|
||||
tanks[0].setFill(tanks[0].getFill() - convert);
|
||||
tanks[1].setFill(tanks[1].getFill() + Math.round(convert / 50));
|
||||
power -= maxPower / 10;
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 10 == 0) {
|
||||
if(hasPower() && hasEnoughWater() && tanks[1].getMaxFill() > tanks[1].getFill()) {
|
||||
int convert = Math.min(tanks[1].getMaxFill(), tanks[0].getFill()) / 50;
|
||||
convert = Math.min(convert, tanks[1].getMaxFill() - tanks[1].getFill());
|
||||
|
||||
tanks[0].setFill(tanks[0].getFill() - convert * 50); //dividing first, then multiplying, will remove any rounding issues
|
||||
tanks[1].setFill(tanks[1].getFill() + convert);
|
||||
power -= this.getMaxPower() / 20;
|
||||
}
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setLong("power", power);
|
||||
this.networkPack(data, 25);
|
||||
}
|
||||
|
||||
this.subscribeToAllAround(tanks[0].getTankType(), this);
|
||||
this.sendFluidToAll(tanks[1].getTankType(), this);
|
||||
|
||||
if(power < 0)
|
||||
power = 0;
|
||||
|
||||
fillFluidInit(tanks[1].getTankType());
|
||||
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setLong("power", power);
|
||||
tanks[0].writeToNBT(data, "water");
|
||||
tanks[1].writeToNBT(data, "heavyWater");
|
||||
|
||||
this.networkPack(data, 50);
|
||||
}
|
||||
}
|
||||
|
||||
@ -83,14 +75,12 @@ public class TileEntityDeuteriumExtractor extends TileEntityMachineBase implemen
|
||||
|
||||
public void networkUnpack(NBTTagCompound data) {
|
||||
this.power = data.getLong("power");
|
||||
}
|
||||
|
||||
public long getPowerRemainingScaled(long i) {
|
||||
return (power * i) / maxPower;
|
||||
tanks[0].readFromNBT(data, "water");
|
||||
tanks[1].readFromNBT(data, "heavyWater");
|
||||
}
|
||||
|
||||
public boolean hasPower() {
|
||||
return power >= maxPower / 10;
|
||||
return power >= this.getMaxPower() / 20;
|
||||
}
|
||||
|
||||
public boolean hasEnoughWater() {
|
||||
@ -125,17 +115,12 @@ public class TileEntityDeuteriumExtractor extends TileEntityMachineBase implemen
|
||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean getTact() {
|
||||
if(age == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return worldObj.getTotalWorldTime() % 20 < 10;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if(type == tanks[0].getTankType())
|
||||
@ -163,16 +148,10 @@ public class TileEntityDeuteriumExtractor extends TileEntityMachineBase implemen
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
public void setFillForSync(int fill, int index) { }
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
public void setTypeForSync(FluidType type, int index) { }
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
@ -196,16 +175,16 @@ public class TileEntityDeuteriumExtractor extends TileEntityMachineBase implemen
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return maxPower;
|
||||
return 100000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getSendingTanks() {
|
||||
return new FluidTank[] {tanks [1]};
|
||||
return new FluidTank[] { tanks[1] };
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getReceivingTanks() {
|
||||
return new FluidTank[] {tanks [0]};
|
||||
return new FluidTank[] { tanks[0] };
|
||||
}
|
||||
}
|
||||
@ -16,8 +16,6 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityDeuteriumTower extends TileEntityDeuteriumExtractor {
|
||||
|
||||
public static final long maxPower = 1000000;
|
||||
|
||||
public TileEntityDeuteriumTower() {
|
||||
super();
|
||||
tanks[0] = new FluidTank(Fluids.WATER, 50000, 0);
|
||||
@ -149,6 +147,6 @@ public class TileEntityDeuteriumTower extends TileEntityDeuteriumExtractor {
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return maxPower;
|
||||
return 1000000;
|
||||
}
|
||||
}
|
||||
@ -235,7 +235,7 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
||||
private void generateSteam() {
|
||||
|
||||
// function of SHS produced per tick
|
||||
// heat - 10256/100000 * pressure / 50,000 * 25 * 5 (should get rid of any rounding errors)
|
||||
// (heat - 10256)/100000 * steamFill (max efficiency at 14b) * 25 * 5 (should get rid of any rounding errors)
|
||||
if(this.heat > 10256) {
|
||||
int Water = (int)((((float)heat - 10256F) / (float)maxHeat) * Math.min(((float)carbonDioxide.getFill() / 14000F), 1F) * 25F * 5F);
|
||||
int Steam = Water * 1;
|
||||
@ -366,17 +366,14 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
||||
ExplosionNukeGeneric.waste(worldObj, this.xCoord, this.yCoord, this.zCoord, 35);
|
||||
|
||||
List<EntityPlayer> players = worldObj.getEntitiesWithinAABB(EntityPlayer.class,
|
||||
AxisAlignedBB.getBoundingBox(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5).expand(50, 50, 50));
|
||||
AxisAlignedBB.getBoundingBox(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5).expand(100, 100, 100));
|
||||
|
||||
for(EntityPlayer player : players) {
|
||||
player.triggerAchievement(MainRegistry.achZIRNOXBoom);
|
||||
}
|
||||
|
||||
if(MobConfig.enableElementals) {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<EntityPlayer> players2 = worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5).expand(100, 100, 100));
|
||||
|
||||
for(EntityPlayer player : players2) {
|
||||
for(EntityPlayer player : players) {
|
||||
player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG).setBoolean("radMark", true);
|
||||
}
|
||||
}
|
||||
@ -408,9 +405,10 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
||||
}
|
||||
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
if(type == Fluids.SUPERHOTSTEAM) return steam.getMaxFill();
|
||||
if(type == Fluids.SUPERHOTSTEAM) return 0;
|
||||
if(type == Fluids.CARBONDIOXIDE) return carbonDioxide.getMaxFill();
|
||||
if(type == Fluids.WATER) return water.getMaxFill();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ public class TileEntityPileBreedingFuel extends TileEntityPileBase implements IP
|
||||
public int neutrons;
|
||||
public int lastNeutrons;
|
||||
public int progress;
|
||||
public static final int maxProgress = GeneralConfig.enable528 ? 37500 : 25000;
|
||||
public static final int maxProgress = GeneralConfig.enable528 ? 50000 : 30000;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.6 KiB |
Loading…
x
Reference in New Issue
Block a user