Compare commits

..

3 Commits

Author SHA1 Message Date
Tom Dodd cef929420a Update changelog.txt 2020-08-03 21:11:33 +01:00
Tom Dodd 72316058b3 * Hopefully fixed even more turbine rotor render crashes 2020-08-03 20:20:16 +01:00
Tom Dodd 5c0aee50e8 Hopefully fixed more turbine rotor render crashes 2020-08-03 19:03:53 +01:00
8 changed files with 99 additions and 44 deletions

View File

@ -1,3 +1,13 @@
v2o.3.7
* Updated Chinese Patchouli localisation [thanks to WuzgXY and ghostbird03!]
* Hopefully fixed even more turbine rotor render crashes
v2o.3.6
* Hopefully fixed more turbine rotor render crashes
v2o.3.5
* Fixed fission neutron sources not finding their targets while the multiblock is broken
@ -5,7 +15,7 @@ v2o.3.5
* Hopefully fixed turbine rotor render crashes
* Fixed crash on loading with Chinese localisation [thanks to WuzgXY!]
* Fixed crash on loading with Chinese localisation [thanks to ghostbird03!]
* Continued Patchouli guide book documentation

View File

@ -1,7 +1,7 @@
mc_version=1.12.2
forge_version=14.23.5.2847
mapping_version=stable_39
mod_version=2o.3.5
mod_version=2o.3.7
ic2_version=2.8.197-ex112
jei_version=4.15.0.293

View File

@ -40,6 +40,7 @@ public class NuclearCraft {
@EventHandler
public void postInit(FMLPostInitializationEvent postEvent) {
proxy.postInit(postEvent);
NCConfig.postInit();
}
@EventHandler

View File

@ -1,22 +1,34 @@
package nc.config;
import java.io.File;
import java.util.*;
import java.util.ArrayList;
import java.util.List;
import nc.*;
import it.unimi.dsi.fastutil.objects.Object2ObjectMap;
import nc.Global;
import nc.ModCheck;
import nc.multiblock.PlacementRule;
import nc.multiblock.fission.FissionPlacement;
import nc.multiblock.fission.tile.IFissionPart;
import nc.multiblock.turbine.TurbinePlacement;
import nc.multiblock.turbine.tile.ITurbinePart;
import nc.network.PacketHandler;
import nc.network.config.ConfigUpdatePacket;
import nc.radiation.RadSources;
import nc.recipe.ProcessorRecipeHandler;
import nc.util.*;
import nc.util.Lang;
import nc.util.NCMath;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.util.text.*;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.config.*;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.config.Property;
import net.minecraftforge.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.eventhandler.*;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent;
public class NCConfig {
@ -39,6 +51,7 @@ public class NCConfig {
public static final String CATEGORY_RADIATION = "radiation";
public static final String CATEGORY_REGISTRATION = "registration";
public static final String CATEGORY_MISC = "misc";
public static final String CATEGORY_OUTPUT = "output";
public static int[] ore_dims;
public static boolean ore_dims_list_type;
@ -369,27 +382,19 @@ public class NCConfig {
public static void preInit() {
File configFile = new File(Loader.instance().getConfigDir(), "nuclearcraft.cfg");
config = new Configuration(configFile);
syncFromFiles();
syncConfig(true, true);
MinecraftForge.EVENT_BUS.register(new ServerConfigEventHandler());
}
public static void postInit() {
outputConfigInfo();
}
public static void clientPreInit() {
MinecraftForge.EVENT_BUS.register(new ClientConfigEventHandler());
}
public static void syncFromFiles() {
syncConfig(true, true);
}
public static void syncFromGui() {
syncConfig(false, true);
}
public static void syncFromFields() {
syncConfig(false, false);
}
private static void syncConfig(boolean loadFromFile, boolean setFromConfig) {
if (loadFromFile) {
config.load();
@ -1981,6 +1986,28 @@ public class NCConfig {
}
}
private static void outputConfigInfo() {
List<String> fissionPlacement = new ArrayList<>();
for (Object2ObjectMap.Entry<String, PlacementRule<IFissionPart>> entry : FissionPlacement.RULE_MAP.object2ObjectEntrySet()) {
if (!entry.getKey().isEmpty()) fissionPlacement.add(entry.getKey());
}
List<String> turbinePlacement = new ArrayList<>();
for (Object2ObjectMap.Entry<String, PlacementRule<ITurbinePart>> entry : TurbinePlacement.RULE_MAP.object2ObjectEntrySet()) {
if (!entry.getKey().isEmpty()) turbinePlacement.add(entry.getKey());
}
Property propertyOutputFissionPlacement = config.get(CATEGORY_OUTPUT, "output_fission_placement", fissionPlacement.toArray(new String[fissionPlacement.size()]), Lang.localise("gui.nc.config.output_fission_placement.comment"));
propertyOutputFissionPlacement.setLanguageKey("gui.nc.config.output_fission_placement");
Property propertyOutputTurbinePlacement = config.get(CATEGORY_OUTPUT, "output_turbine_placement", turbinePlacement.toArray(new String[turbinePlacement.size()]), Lang.localise("gui.nc.config.output_turbine_placement.comment"));
propertyOutputTurbinePlacement.setLanguageKey("gui.nc.config.output_turbine_placement");
if (config.hasChanged()) {
config.save();
}
}
private static boolean[] readBooleanArrayFromConfig(Property property) {
int currentLength = property.getBooleanList().length;
int defaultLength = property.getDefaults().length;
@ -2078,7 +2105,7 @@ public class NCConfig {
@SubscribeEvent(priority = EventPriority.LOWEST)
public void onEvent(OnConfigChangedEvent event) {
if (event.getModID().equals(Global.MOD_ID)) {
syncFromGui();
syncConfig(false, true);
}
}
}

View File

@ -161,6 +161,7 @@ public class TurbineLogic extends MultiblockLogic<Turbine, TurbineLogic, ITurbin
getTurbine().inputPlane[2] = getTurbine().getInteriorPlane(oppositeDir, 0, bladeLength, shaftWidth + bladeLength, 0, 0);
getTurbine().inputPlane[3] = getTurbine().getInteriorPlane(oppositeDir, 0, 0, bladeLength, shaftWidth + bladeLength, 0);
if (!getWorld().isRemote) {
getTurbine().renderPosArray = new Vector3f[(1 + 4 * shaftWidth) * flowLength];
for (int depth = 0; depth < flowLength; depth++) {
@ -180,6 +181,7 @@ public class TurbineLogic extends MultiblockLogic<Turbine, TurbineLogic, ITurbin
getTurbine().sendUpdateToListeningPlayers();
}
}
}
protected void refreshDynamos() {
searchFlag = false;

View File

@ -42,7 +42,14 @@ public class RenderTurbineRotor extends TileEntitySpecialRenderer<TileTurbineCon
int flowLength = turbine.getFlowLength(), bladeLength = turbine.bladeLength, shaftWidth = turbine.shaftWidth;
if (turbine.rotorStateArray == null || turbine.bladeDepths == null || turbine.statorDepths == null || turbine.rotorStateArray.length < 1 + 4 * flowLength) {
PacketHandler.instance.sendToServer(new TurbineResendFormPacket(controller.getPos()));
resendForm(controller);
return;
}
IBlockState shaftState = turbine.rotorStateArray[4 * flowLength];
if (shaftState == null) {
resendForm(controller);
return;
}
@ -78,8 +85,6 @@ public class RenderTurbineRotor extends TileEntitySpecialRenderer<TileTurbineCon
}
GlStateManager.translate(-pos.getX() + rX, -pos.getY() + rY, -pos.getZ() + rZ);
IBlockState shaftState = turbine.rotorStateArray[turbine.bladePosArray.length];
for (int depth : turbine.bladeDepths) {
renderRotor(turbine, renderer, bright, shaftState, dir, flowLength, bladeLength, shaftWidth, NCConfig.turbine_render_blade_width, depth);
}
@ -162,4 +167,8 @@ public class RenderTurbineRotor extends TileEntitySpecialRenderer<TileTurbineCon
GlStateManager.popMatrix();
}
}
public void resendForm(TileTurbineController controller) {
PacketHandler.instance.sendToServer(new TurbineResendFormPacket(controller.getPos()));
}
}

View File

@ -5,7 +5,7 @@
"sortnum": 3,
"pages": [
{
"anchor": "rtg",
"anchor": "multitool",
"type": "items/1",
"header": "Multitool",
"item": "nuclearcraft:multitool",

View File

@ -1,6 +1,10 @@
Have scrubber show chunk boundaries when held
Neutron shields should not act as active moderators for MSRs
Tweak turbine coil and blade stats?
Revert to original conductor mechanics, i.e. used ot connect clusters to casing, but not to each other?
Complete printing of registered multiblock component stats and rules to config file
Move onAdded tile methods to onLoad()?
Refactor old tile entity hierarchy - modularise item/fluid/energy handling
@ -10,6 +14,8 @@ Add input/output config to all ports and vents
Replace casing emergency cooling with cluster/port based version (no placement rules)
Adjacent MSR vessels connect to share flux, shared criticality factor is sum of vessel criticality factors
Finish fission meltdown mechanics
Add melting logic to non-fuel components
Graphite/beryllium fires, heavy water evaporation, etc.
@ -17,6 +23,8 @@ Hydrogen build-up by ZA fuels above a certain temperature, hygrogen explosion if
Hot SFRs/MSRs heat up more quickly/slowly & produce more/less radiation? (https://discordapp.com/channels/425461908712325130/425461908716519425/645399574109749279)
Fuel decay heat and neutron poison (https://discordapp.com/channels/425461908712325130/425470889354723350/738167468283002932)
Show potential (pre-primed) stats if reactor is idle
Keep clusters running even when multiblock is invalidated
@ -67,8 +75,6 @@ Fractional distillation: deuterium-enriched water -> heavy water + water
1.15: Tiered machines: basic -> advanced -> DU -> elite? https://discordapp.com/channels/425461908712325130/425471153067524098/651401188054401025
___________________________________________________________________________________________________________________________
Fission Reactor Mechanics Cell/vessel heat [to heat sinks -> casing] / [to coolant heaters]
1.15: Specialised fuel-making machine
Pebble-bed Reactor that produces energy directly