Merge pull request #2449 from kelllllen/master

Some more RBMK OC compat
This commit is contained in:
HbmMods 2025-10-06 07:56:14 +02:00 committed by GitHub
commit 59afb41c22
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 52 additions and 28 deletions

View File

@ -602,10 +602,11 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
LinkedHashMap<String, Object> data_table = new LinkedHashMap<>(); LinkedHashMap<String, Object> data_table = new LinkedHashMap<>();
data_table.put("type", column.getConsoleType().name()); data_table.put("type", column.getConsoleType().name());
data_table.put("hullTemp", column_data.getDouble("heat")); data_table.put("hullTemp", column_data.getDouble("heat"));
data_table.put("realSimWater", column_data.getDouble("water")); data_table.put("realSimWater", column.reasimWater);
data_table.put("realSimSteam", column_data.getDouble("steam")); data_table.put("realSimSteam", column.reasimSteam);
data_table.put("moderated", column_data.getBoolean("moderated")); data_table.put("moderated", column_data.getBoolean("moderated"));
data_table.put("level", column_data.getDouble("level")); data_table.put("level", column_data.getDouble("level"));
data_table.put("targetLevel", column_data.getDouble("targetLevel"));
data_table.put("color", column_data.getShort("color")); data_table.put("color", column_data.getShort("color"));
data_table.put("enrichment", column_data.getDouble("enrichment")); data_table.put("enrichment", column_data.getDouble("enrichment"));
data_table.put("xenon", column_data.getDouble("xenon")); data_table.put("xenon", column_data.getDouble("xenon"));
@ -613,16 +614,31 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
data_table.put("coreTemp", column_data.getDouble("c_coreHeat")); data_table.put("coreTemp", column_data.getDouble("c_coreHeat"));
data_table.put("coreMaxTemp", column_data.getDouble("c_maxHeat")); data_table.put("coreMaxTemp", column_data.getDouble("c_maxHeat"));
if (te instanceof TileEntityRBMKControlAuto){
TileEntityRBMKControlAuto controlAuto = (TileEntityRBMKControlAuto) te;
data_table.put("function", controlAuto.function.toString());
data_table.put("heatUpper", controlAuto.heatUpper);
data_table.put("heatLower", controlAuto.heatLower);
data_table.put("levelUpper", controlAuto.levelUpper);
data_table.put("levelLower",controlAuto.levelLower);
}
if(te instanceof TileEntityRBMKRod){ if(te instanceof TileEntityRBMKRod){
TileEntityRBMKRod fuelChannel = (TileEntityRBMKRod)te; TileEntityRBMKRod fuelChannel = (TileEntityRBMKRod)te;
data_table.put("fluxQuantity", fuelChannel.lastFluxQuantity); data_table.put("fluxQuantity", fuelChannel.lastFluxQuantity);
data_table.put("fluxRatio", fuelChannel.fluxFastRatio); data_table.put("fluxRatio", fuelChannel.fluxFastRatio);
ItemStack rod = fuelChannel.getStackInSlot(0);
if (rod != null)
data_table.put("rodName", rod.getUnlocalizedName());
else
data_table.put("rodName", "");
} }
if(te instanceof TileEntityRBMKBoiler){ if(te instanceof TileEntityRBMKBoiler){
TileEntityRBMKBoiler boiler = (TileEntityRBMKBoiler)te; TileEntityRBMKBoiler boiler = (TileEntityRBMKBoiler)te;
data_table.put("water", boiler.feed.getFill()); data_table.put("water", boiler.feed.getFill());
data_table.put("steam", boiler.steam.getFill()); data_table.put("steam", boiler.steam.getFill());
data_table.put("steamType", Fluids.fromID(column_data.getShort("type")).getUnlocalizedName());
} }
if(te instanceof TileEntityRBMKOutgasser){ if(te instanceof TileEntityRBMKOutgasser){
@ -644,6 +660,13 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
TileEntityRBMKHeater heaterChannel = (TileEntityRBMKHeater)te; TileEntityRBMKHeater heaterChannel = (TileEntityRBMKHeater)te;
data_table.put("coolant", heaterChannel.feed.getFill()); data_table.put("coolant", heaterChannel.feed.getFill());
data_table.put("hotcoolant", heaterChannel.steam.getFill()); data_table.put("hotcoolant", heaterChannel.steam.getFill());
data_table.put("coldtype", Fluids.fromID(column_data.getShort("type")).getUnlocalizedName());
data_table.put("hottype", Fluids.fromID(column_data.getShort("hottype")).getUnlocalizedName());
}
if (te instanceof TileEntityRBMKCooler){
TileEntityRBMKCooler coolerChannel = (TileEntityRBMKCooler) te;
data_table.put("cryogel", coolerChannel.getAllTanks()[0].getFill());
} }
return new Object[] {data_table}; return new Object[] {data_table};

View File

@ -140,6 +140,7 @@ public abstract class TileEntityRBMKControl extends TileEntityRBMKSlottedBase im
public NBTTagCompound getNBTForConsole() { public NBTTagCompound getNBTForConsole() {
NBTTagCompound data = new NBTTagCompound(); NBTTagCompound data = new NBTTagCompound();
data.setDouble("level", this.level); data.setDouble("level", this.level);
data.setDouble("targetLevel", this.targetLevel);
return data; return data;
} }