mirror of
https://github.com/turbodiesel4598/NuclearCraft
synced 2025-09-23 14:44:41 +02:00
Compare commits
5 Commits
0145ca2cef
...
9637040f92
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9637040f92 | ||
![]() |
dc1457d7af | ||
![]() |
b3ae178cb6 | ||
![]() |
d8cb40d16b | ||
![]() |
a0e4b222b0 |
@ -1,3 +1,10 @@
|
||||
v2.18s
|
||||
|
||||
+ Added configs to modify the base energy storage and heat capacities of fission reactors [thanks to Exaxxion!]
|
||||
|
||||
* Hopefully fixed fusion reactors placing and removing plasma too often
|
||||
* Fixed possible crash on creating plasma fluid when other mods add their own
|
||||
|
||||
v2.18r
|
||||
|
||||
+ Added configs to modify the tank capacities of exchanger and condenser tubes
|
||||
|
@ -1,7 +1,7 @@
|
||||
mc_version=1.12.2
|
||||
forge_version=14.23.5.2838
|
||||
mapping_version=stable_39
|
||||
mod_version=2.18r
|
||||
mod_version=2.18s
|
||||
|
||||
ic2_version=2.8.170-ex112
|
||||
jei_version=4.15.0.+
|
||||
@ -11,7 +11,7 @@ tic_version=1.12.2-2.12.0.157
|
||||
oc_version=MC1.12.2-1.7.4.+
|
||||
cofh_core_version=1.12.2-4.6.3.+
|
||||
common_capabilities_version=2.4.4-309
|
||||
gamestages_version=2.0.+
|
||||
gamestages_version=2.0.117
|
||||
|
||||
baubles_version=1.12:1.5.2
|
||||
conarm_version=1.12.2:1.2.4
|
||||
|
@ -26,7 +26,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent;
|
||||
|
||||
public class NCConfig {
|
||||
|
||||
|
||||
private static Configuration config = null;
|
||||
|
||||
public static final String CATEGORY_ORES = "ores";
|
||||
@ -83,6 +83,8 @@ public class NCConfig {
|
||||
public static double[] decay_lifetime;
|
||||
public static int[] decay_power;
|
||||
|
||||
public static int fission_base_capacity; // Default: 64000
|
||||
public static int fission_base_max_heat; // Default: 25000
|
||||
public static double fission_power; // Default: 1
|
||||
public static double fission_fuel_use; // Default: 1
|
||||
public static double fission_heat_generation; // Default: 1
|
||||
@ -453,6 +455,10 @@ public class NCConfig {
|
||||
Property propertyDecayPower = config.get(CATEGORY_GENERATORS, "decay_power", new int[] {80, 80, 15, 5, 10, 15, 20, 25, 30, 40}, Lang.localise("gui.config.generators.decay_power.comment"), 0, 32767);
|
||||
propertyDecayPower.setLanguageKey("gui.config.generators.decay_power");
|
||||
|
||||
Property propertyFissionBaseCapacity = config.get(CATEGORY_FISSION, "fission_base_capacity", 64000, Lang.localise("gui.config.fission.fission_base_capacity.comment"), 1, Integer.MAX_VALUE);
|
||||
propertyFissionBaseCapacity.setLanguageKey("gui.config.fission.fission_base_capacity");
|
||||
Property propertyFissionBaseMaxHeat = config.get(CATEGORY_FISSION, "fission_base_max_heat", 25000, Lang.localise("gui.config.fission.fission_base_max_heat.comment"), 1, Integer.MAX_VALUE);
|
||||
propertyFissionBaseMaxHeat.setLanguageKey("gui.config.fission.fission_base_max_heat");
|
||||
Property propertyFissionPower = config.get(CATEGORY_FISSION, "fission_power", 1D, Lang.localise("gui.config.fission.fission_power.comment"), 0D, 255D);
|
||||
propertyFissionPower.setLanguageKey("gui.config.fission.fission_power");
|
||||
Property propertyFissionFuelUse = config.get(CATEGORY_FISSION, "fission_fuel_use", 1D, Lang.localise("gui.config.fission.fission_fuel_use.comment"), 0.001D, 255D);
|
||||
@ -981,6 +987,8 @@ public class NCConfig {
|
||||
config.setCategoryPropertyOrder(CATEGORY_GENERATORS, propertyOrderGenerators);
|
||||
|
||||
List<String> propertyOrderFission = new ArrayList<String>();
|
||||
propertyOrderFission.add(propertyFissionBaseCapacity.getName());
|
||||
propertyOrderFission.add(propertyFissionBaseMaxHeat.getName());
|
||||
propertyOrderFission.add(propertyFissionPower.getName());
|
||||
propertyOrderFission.add(propertyFissionFuelUse.getName());
|
||||
propertyOrderFission.add(propertyFissionHeatGeneration.getName());
|
||||
@ -1286,6 +1294,8 @@ public class NCConfig {
|
||||
decay_lifetime = readDoubleArrayFromConfig(propertyDecayLifetime);
|
||||
decay_power = readIntegerArrayFromConfig(propertyDecayPower);
|
||||
|
||||
fission_base_capacity = propertyFissionBaseCapacity.getInt();
|
||||
fission_base_max_heat = propertyFissionBaseMaxHeat.getInt();
|
||||
fission_power = propertyFissionPower.getDouble();
|
||||
fission_fuel_use = propertyFissionFuelUse.getDouble();
|
||||
fission_heat_generation = propertyFissionHeatGeneration.getDouble();
|
||||
@ -1579,6 +1589,8 @@ public class NCConfig {
|
||||
propertyDecayLifetime.set(decay_lifetime);
|
||||
propertyDecayPower.set(decay_power);
|
||||
|
||||
propertyFissionBaseCapacity.set(fission_base_capacity);
|
||||
propertyFissionBaseMaxHeat.set(fission_base_max_heat);
|
||||
propertyFissionPower.set(fission_power);
|
||||
propertyFissionFuelUse.set(fission_fuel_use);
|
||||
propertyFissionHeatGeneration.set(fission_heat_generation);
|
||||
|
@ -60,8 +60,6 @@ public class TileFissionController extends TileItemGenerator implements IGui<Fis
|
||||
public String problemPos = "";
|
||||
public int problemPosX = 0, problemPosY = 0, problemPosZ = 0;
|
||||
|
||||
public static final int BASE_CAPACITY = 64000, BASE_MAX_HEAT = 25000;
|
||||
|
||||
private boolean isActivated = false;
|
||||
public boolean computerActivated = false;
|
||||
|
||||
@ -101,7 +99,7 @@ public class TileFissionController extends TileItemGenerator implements IGui<Fis
|
||||
}
|
||||
|
||||
private TileFissionController(boolean newRules) {
|
||||
super("fission_controller", 1, 1, 0, defaultItemSorptions(1, 1), BASE_CAPACITY, NCRecipes.fission);
|
||||
super("fission_controller", 1, 1, 0, defaultItemSorptions(1, 1), NCConfig.fission_base_capacity, NCRecipes.fission);
|
||||
this.newRules = newRules;
|
||||
}
|
||||
|
||||
@ -345,9 +343,9 @@ public class TileFissionController extends TileItemGenerator implements IGui<Fis
|
||||
}
|
||||
|
||||
public int getMaxHeat() {
|
||||
if (NCMath.atIntLimit(getLengthX()*getLengthY()*getLengthZ(), BASE_MAX_HEAT)) return Integer.MAX_VALUE;
|
||||
if (getLengthX() <= 0 || getLengthY() <= 0 || getLengthZ() <= 0) return BASE_MAX_HEAT;
|
||||
return BASE_MAX_HEAT*getLengthX()*getLengthY()*getLengthZ();
|
||||
if (NCMath.atIntLimit(getLengthX()*getLengthY()*getLengthZ(), NCConfig.fission_base_max_heat)) return Integer.MAX_VALUE;
|
||||
if (getLengthX() <= 0 || getLengthY() <= 0 || getLengthZ() <= 0) return NCConfig.fission_base_max_heat;
|
||||
return NCConfig.fission_base_max_heat*getLengthX()*getLengthY()*getLengthZ();
|
||||
}
|
||||
|
||||
// Finding Blocks
|
||||
@ -775,9 +773,9 @@ public class TileFissionController extends TileItemGenerator implements IGui<Fis
|
||||
}
|
||||
|
||||
private int getNewCapacity() {
|
||||
if (NCMath.atIntLimit(getLengthX()*getLengthY()*getLengthZ(), BASE_CAPACITY)) return Integer.MAX_VALUE;
|
||||
if (getLengthX() <= 0 || getLengthY() <= 0 || getLengthZ() <= 0) return BASE_CAPACITY;
|
||||
return BASE_CAPACITY*getLengthX()*getLengthY()*getLengthZ();
|
||||
if (NCMath.atIntLimit(getLengthX()*getLengthY()*getLengthZ(), NCConfig.fission_base_capacity)) return Integer.MAX_VALUE;
|
||||
if (getLengthX() <= 0 || getLengthY() <= 0 || getLengthZ() <= 0) return NCConfig.fission_base_capacity;
|
||||
return NCConfig.fission_base_capacity*getLengthX()*getLengthY()*getLengthZ();
|
||||
}
|
||||
|
||||
// Set Fuel and Power and Modify Heat
|
||||
|
@ -39,6 +39,7 @@ import nc.util.Lang;
|
||||
import nc.util.MaterialHelper;
|
||||
import nc.util.NCUtil;
|
||||
import nc.util.SoundHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@ -52,6 +53,7 @@ import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fml.common.Optional;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
@ -65,9 +67,7 @@ public class TileFusionCore extends TileFluidGenerator implements IGui<FusionUpd
|
||||
public double processHeatVariable = 0;
|
||||
public double heat = ROOM_TEMP, efficiency, cooling, heatChange; // cooling and heatChange are in K, not kK
|
||||
public int currentEnergyStored = 0, energyChange = 0;
|
||||
|
||||
public int size = 1;
|
||||
public int complete;
|
||||
public int size = 1, complete = 0;
|
||||
public String problem = RING_INCOMPLETE;
|
||||
|
||||
public static final String RING_INCOMPLETE = Lang.localise("gui.container.fusion_core.ring_incomplete");
|
||||
@ -118,7 +118,7 @@ public class TileFusionCore extends TileFluidGenerator implements IGui<FusionUpd
|
||||
@Override
|
||||
public void updateGenerator() {
|
||||
if (!world.isRemote) {
|
||||
boolean wasProcessing = isProcessing;
|
||||
boolean wasProcessing = isProcessing, wasHotEnough = isHotEnough();
|
||||
isProcessing = isProcessing();
|
||||
if (structureCount == 0) refreshMultiblock();
|
||||
tickStructureCheck();
|
||||
@ -126,15 +126,15 @@ public class TileFusionCore extends TileFluidGenerator implements IGui<FusionUpd
|
||||
double previousHeat = heat;
|
||||
run();
|
||||
if (isHotEnough()) doCooling();
|
||||
else plasma(false);
|
||||
doHeating();
|
||||
if (wasHotEnough && !isHotEnough()) plasma(false);
|
||||
heatChange = 1000*(heat - previousHeat);
|
||||
if (overheat()) return;
|
||||
if (isProcessing) process();
|
||||
else getRadiationSource().setRadiationLevel(0D);
|
||||
if (wasProcessing != isProcessing) {
|
||||
if (isProcessing || recipeInfo == null) {
|
||||
plasma(isProcessing);
|
||||
if (isProcessing) {
|
||||
plasma(true);
|
||||
}
|
||||
updateBlockType();
|
||||
sendUpdateToAllPlayers();
|
||||
@ -362,7 +362,9 @@ public class TileFusionCore extends TileFluidGenerator implements IGui<FusionUpd
|
||||
// Setting Blocks
|
||||
|
||||
private static IBlockState plasmaState() {
|
||||
return FluidRegistry.getFluid("plasma").getBlock().getDefaultState();
|
||||
Fluid plasma = FluidRegistry.getFluid("plasma");
|
||||
Block block = plasma == null ? null : plasma.getBlock();
|
||||
return block == null ? Blocks.AIR.getDefaultState() : block.getDefaultState();
|
||||
}
|
||||
|
||||
public void plasma(boolean createPlasma) {
|
||||
|
@ -1667,6 +1667,10 @@ gui.config.generators.generator_rf_per_eu.comment=Wie viel RF pro erzeugtem EU v
|
||||
gui.config.category.fission=Spaltungskonfigurationen
|
||||
gui.config.category.fission.tooltip=Konfiguriere Aspekte der Kernspaltung.
|
||||
|
||||
gui.config.fission.fission_base_capacity=Base Capacity
|
||||
gui.config.fission.fission_base_capacity.comment=The base energy capacity of the Fission Reactor. This is multiplied by the dimensions of the reactor to determine the maximum energy capacity. Note that the "RF per IC2 EU" property will override this one if it is larger.
|
||||
gui.config.fission.fission_base_max_heat=Base Max Heat
|
||||
gui.config.fission.fission_base_max_heat.comment=The base maximum heat of the Fission Reactor. This is multiplied by the dimensions of the reactor to determine the maximum heat capacity.
|
||||
gui.config.fission.fission_power=Energieerzeugungsmultiplikator
|
||||
gui.config.fission.fission_power.comment=Verändert die erzeugte Energie von Spaltungsreaktoren.
|
||||
gui.config.fission.fission_fuel_use=Brennstoffverbrauchsmultiplikator
|
||||
|
@ -1890,6 +1890,10 @@ gui.config.generators.generator_rf_per_eu.comment=The RF used per EU emitted for
|
||||
gui.config.category.fission=Fission Configs
|
||||
gui.config.category.fission.tooltip=Configure aspects of nuclear fission.
|
||||
|
||||
gui.config.fission.fission_base_capacity=Base Capacity
|
||||
gui.config.fission.fission_base_capacity.comment=The base energy capacity of fission reactors. This is multiplied by the volume of the reactor to determine the energy capacity.
|
||||
gui.config.fission.fission_base_max_heat=Base Max Heat
|
||||
gui.config.fission.fission_base_max_heat.comment=The base maximum heat of fission reactors. This is multiplied by the volume of the reactor to determine the maximum heat.
|
||||
gui.config.fission.fission_power=Power Gen Multiplier
|
||||
gui.config.fission.fission_power.comment=Modifies the power generated by fission reactors.
|
||||
gui.config.fission.fission_fuel_use=Fuel Use Multiplier
|
||||
|
@ -1446,6 +1446,10 @@ gui.config.generators.generator_update_rate.comment=Ticks para cada checagem de
|
||||
gui.config.category.fission=Configuração de Fissão
|
||||
gui.config.category.fission.tooltip=Configura aspectos da fissão nuclear
|
||||
|
||||
gui.config.fission.fission_base_capacity=Base Capacity
|
||||
gui.config.fission.fission_base_capacity.comment=The base energy capacity of the Fission Reactor. This is multiplied by the dimensions of the reactor to determine the maximum energy capacity. Note that the "RF per IC2 EU" property will override this one if it is larger.
|
||||
gui.config.fission.fission_base_max_heat=Base Max Heat
|
||||
gui.config.fission.fission_base_max_heat.comment=The base maximum heat of the Fission Reactor. This is multiplied by the dimensions of the reactor to determine the maximum heat capacity.
|
||||
gui.config.fission.fission_power=Geração de Energia
|
||||
gui.config.fission.fission_power.comment=Modifica a energia gerada por reatores de fissão
|
||||
gui.config.fission.fission_fuel_use=Uso de Combustível
|
||||
|
@ -1848,6 +1848,10 @@ gui.config.generators.generator_rf_per_eu.comment=The RF used per EU emitted for
|
||||
gui.config.category.fission=Fission Configs
|
||||
gui.config.category.fission.tooltip=Configure aspects of nuclear fission.
|
||||
|
||||
gui.config.fission.fission_base_capacity=Base Capacity
|
||||
gui.config.fission.fission_base_capacity.comment=The base energy capacity of the Fission Reactor. This is multiplied by the dimensions of the reactor to determine the maximum energy capacity. Note that the "RF per IC2 EU" property will override this one if it is larger.
|
||||
gui.config.fission.fission_base_max_heat=Base Max Heat
|
||||
gui.config.fission.fission_base_max_heat.comment=The base maximum heat of the Fission Reactor. This is multiplied by the dimensions of the reactor to determine the maximum heat capacity.
|
||||
gui.config.fission.fission_power=Power Gen Multiplier
|
||||
gui.config.fission.fission_power.comment=Modifies the power generated by fission reactors.
|
||||
gui.config.fission.fission_fuel_use=Fuel Use Multiplier
|
||||
|
@ -1447,6 +1447,10 @@ gui.config.generators.generator_update_rate.comment=Ticks per fluid content chec
|
||||
gui.config.category.fission=裂变
|
||||
gui.config.category.fission.tooltip=裂变方面的配置.
|
||||
|
||||
gui.config.fission.fission_base_capacity=Base Capacity
|
||||
gui.config.fission.fission_power.comment=Modifies the power generated by fission reactors. gui.config.fission.fission_base_capacity.comment=The base energy capacity of the Fission Reactor. This is multiplied by the dimensions of the reactor to determine the maximum energy capacity. Note that the "RF per IC2 EU" property will override this one if it is larger.
|
||||
gui.config.fission.fission_base_max_heat=Base Max Heat
|
||||
gui.config.fission.fission_base_max_heat.comment=The base maximum heat of the Fission Reactor. This is multiplied by the dimensions of the reactor to determine the maximum heat capacity.
|
||||
gui.config.fission.fission_power=Power Gen Multiplier
|
||||
gui.config.fission.fission_power.comment=Modifies the power generated by fission reactors.
|
||||
gui.config.fission.fission_fuel_use=Fuel Use Multiplier
|
||||
|
Loading…
x
Reference in New Issue
Block a user