From 393e90cae52f5f7cf8fc1fc3876843faeefe85a6 Mon Sep 17 00:00:00 2001 From: Boblet Date: Fri, 6 Mar 2026 10:27:24 +0100 Subject: [PATCH] UZH --- changelog | 12 +++++++ .../java/com/hbm/crafting/RodRecipes.java | 1 + .../java/com/hbm/hazard/HazardRegistry.java | 4 +++ .../hbm/inventory/recipes/PUREXRecipes.java | 6 ++++ .../hbm/inventory/recipes/SILEXRecipes.java | 16 ++++++++++ src/main/java/com/hbm/items/ModItems.java | 26 ++++++++++++--- .../com/hbm/items/machine/ItemRBMKRod.java | 23 +++++++++++--- .../tileentity/machine/rbmk/RBMKDials.java | 15 +++++++-- .../machine/rbmk/TileEntityRBMKBase.java | 30 +++++++----------- src/main/resources/assets/hbm/lang/de_DE.lang | 3 ++ src/main/resources/assets/hbm/lang/en_US.lang | 3 ++ .../assets/hbm/textures/items/billet_uzh.png | Bin 0 -> 309 bytes .../hbm/textures/items/rbmk_fuel_uzh.png | Bin 0 -> 600 bytes .../hbm/textures/items/rbmk_pellet_uzh.png | Bin 0 -> 312 bytes 14 files changed, 111 insertions(+), 28 deletions(-) create mode 100644 src/main/resources/assets/hbm/textures/items/billet_uzh.png create mode 100644 src/main/resources/assets/hbm/textures/items/rbmk_fuel_uzh.png create mode 100644 src/main/resources/assets/hbm/textures/items/rbmk_pellet_uzh.png diff --git a/changelog b/changelog index 55a35eadf..d831c9401 100644 --- a/changelog +++ b/changelog @@ -4,6 +4,12 @@ * The same as standard control rods, except they need 5kHE/t * Have only a single cable connection at the bottom * Replace standard RBMK control rods when 528 mode is enabled +* New RBMK fuels + * UZrH + * Made from MEU, zirconium and hydrogen in the PUREX + * More efficient than MEU but with less durability + * Has a new thermal coefficient mechanic, once the core heat exceeds 1000°C, reactivity drops down + * Very high diffusion, meaning the core is considerably colder than on most fuels ## Changed * Updated RBMK visuals @@ -25,6 +31,12 @@ * RBMK absorber columns now heat up when exposed to neutrons * The type of neutron does not matter, only the quantity * 20 flux equals 1°C heatup +* RBMK passive cooling has changed + * The default value is now 2.5°C/t instead of 1 + * This value only applies to rods that have exposed sides, i.e. the edges of a reactor + * There is now a second passive cooling variable used for rods on the inside (`dialPassiveCoolingInner`, 0.1°C/t by default) + * The effective passive cooling value is scaled smoothly depending on how many sides are exposed, using `dialPassiveCoolingInner` with no exposed sides and `dialPassiveCooling` for rods with four exposed sides + * Simply put, spindly RBMKs are now way less desirable, structural columns no longer just debuff the reactor and reactors that actually look like reactors are now more powerful ## Fixed * Fixed NBTStack serialization omitting the stack size most of the time, preventing deserialization (mainly in the precision assembler config) diff --git a/src/main/java/com/hbm/crafting/RodRecipes.java b/src/main/java/com/hbm/crafting/RodRecipes.java index b938c2eca..e6085233b 100644 --- a/src/main/java/com/hbm/crafting/RodRecipes.java +++ b/src/main/java/com/hbm/crafting/RodRecipes.java @@ -100,6 +100,7 @@ public class RodRecipes { addRBMKRod(ModItems.billet_uranium_fuel, ModItems.rbmk_fuel_meu); addRBMKRod(U233, ModItems.rbmk_fuel_heu233); addRBMKRod(U235, ModItems.rbmk_fuel_heu235); + addRBMKRod(ModItems.billet_uzh, ModItems.rbmk_fuel_uzh); addRBMKRod(ModItems.billet_thorium_fuel, ModItems.rbmk_fuel_thmeu); addRBMKRod(ModItems.billet_mox_fuel, ModItems.rbmk_fuel_mox); addRBMKRod(ModItems.billet_plutonium_fuel, ModItems.rbmk_fuel_lep); diff --git a/src/main/java/com/hbm/hazard/HazardRegistry.java b/src/main/java/com/hbm/hazard/HazardRegistry.java index 6c7b2a19b..4347c21fb 100644 --- a/src/main/java/com/hbm/hazard/HazardRegistry.java +++ b/src/main/java/com/hbm/hazard/HazardRegistry.java @@ -89,6 +89,7 @@ public class HazardRegistry { public static final float u235 = 1.0F; public static final float u238 = 0.25F; public static final float uf = 0.5F; + public static final float uzh = 0.125F; public static final float np237 = 2.5F; public static final float npf = 1.5F; public static final float pu = 7.5F; @@ -288,6 +289,7 @@ public class HazardRegistry { HazardSystem.register(billet_uranium_fuel, makeData(RADIATION, uf * billet)); HazardSystem.register(ingot_uranium_fuel, makeData(RADIATION, uf * ingot)); HazardSystem.register(block_uranium_fuel, makeData(RADIATION, uf * block)); + HazardSystem.register(billet_uzh, makeData(RADIATION, uzh * billet)); HazardSystem.register(nugget_plutonium_fuel, makeData(RADIATION, puf * nugget)); HazardSystem.register(billet_plutonium_fuel, makeData(RADIATION, puf * billet)); @@ -367,6 +369,7 @@ public class HazardRegistry { registerRBMKRod(rbmk_fuel_meu, uf * rod_rbmk, wst * rod_rbmk * 21.5F); registerRBMKRod(rbmk_fuel_heu233, u233 * rod_rbmk, wst * rod_rbmk * 31F); registerRBMKRod(rbmk_fuel_heu235, u235 * rod_rbmk, wst * rod_rbmk * 30F); + registerRBMKRod(rbmk_fuel_uzh, uzh * rod_rbmk, wst * rod_rbmk * 20F); registerRBMKRod(rbmk_fuel_thmeu, thf * rod_rbmk, wst * rod_rbmk * 17.5F); registerRBMKRod(rbmk_fuel_lep, puf * rod_rbmk, wst * rod_rbmk * 25F); registerRBMKRod(rbmk_fuel_mep, purg * rod_rbmk, wst * rod_rbmk * 30F); @@ -400,6 +403,7 @@ public class HazardRegistry { registerRBMKPellet(rbmk_pellet_meu, uf * billet, wst * billet * 21.5F); registerRBMKPellet(rbmk_pellet_heu233, u233 * billet, wst * billet * 31F); registerRBMKPellet(rbmk_pellet_heu235, u235 * billet, wst * billet * 30F); + registerRBMKPellet(rbmk_pellet_uzh, uzh * billet, wst * billet * 20F); registerRBMKPellet(rbmk_pellet_thmeu, thf * billet, wst * billet * 17.5F); registerRBMKPellet(rbmk_pellet_lep, puf * billet, wst * billet * 25F); registerRBMKPellet(rbmk_pellet_mep, purg * billet, wst * billet * 30F); diff --git a/src/main/java/com/hbm/inventory/recipes/PUREXRecipes.java b/src/main/java/com/hbm/inventory/recipes/PUREXRecipes.java index 6a97a6acb..5e3f0c973 100644 --- a/src/main/java/com/hbm/inventory/recipes/PUREXRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/PUREXRecipes.java @@ -41,6 +41,12 @@ public class PUREXRecipes extends GenericRecipes { long watzPower = 10_000; long vitrification = 1_000; + this.register(new GenericRecipe("purex.uzh").setup(600, 1_000) + .inputItems(new ComparableStack(ModItems.billet_uranium_fuel), + new OreDictStack(ZR.billet(), 3)) + .inputFluids(new FluidStack(Fluids.NITRIC_ACID, 1000), new FluidStack(Fluids.HYDROGEN, 4000)) + .outputItems(new ItemStack(ModItems.billet_uzh, 4))); + //CP-1 String autoPile = "autoswitch.pile"; this.register(new GenericRecipe("purex.pilepu").setup(40, pilePower).setNameWrapper("purex.recycle").setGroup(autoPile, this) diff --git a/src/main/java/com/hbm/inventory/recipes/SILEXRecipes.java b/src/main/java/com/hbm/inventory/recipes/SILEXRecipes.java index 6d57569e4..8fff7382f 100644 --- a/src/main/java/com/hbm/inventory/recipes/SILEXRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/SILEXRecipes.java @@ -171,6 +171,22 @@ public class SILEXRecipes { .addOut(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), 4 + 8 * i) .addOut(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), 6 + 12 * i) ); + // UZH // + recipes.put(new ComparableStack(ModItems.rbmk_pellet_uzh, 1, i), new SILEXRecipe(600, 100, 1) + .addOut(new ItemStack(ModItems.nugget_zirconium), 75) + .addOut(new ItemStack(ModItems.nugget_uranium_fuel), 20 - i * 4) + .addOut(new ItemStack(ModItems.nugget_pu_mix), 3 + i * 3) + .addOut(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), 1 + i * 1) + .addOut(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), 1 + i * 1) ); + + recipes.put(new ComparableStack(ModItems.rbmk_pellet_uzh, 1, i + 5), new SILEXRecipe(600, 100, 1) + .addOut(new ItemStack(ModItems.powder_xe135_tiny), 1) + .addOut(new ItemStack(ModItems.nugget_zirconium), 75) + .addOut(new ItemStack(ModItems.nugget_uranium_fuel), 19 - i * 4) + .addOut(new ItemStack(ModItems.nugget_pu_mix), 3 + i * 3) + .addOut(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), 1 + i * 1) + .addOut(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), 1 + i * 1) ); + // TH232 // recipes.put(new ComparableStack(ModItems.rbmk_pellet_thmeu, 1, i), new SILEXRecipe(600, 100, 1) .addOut(new ItemStack(ModItems.nugget_thorium_fuel), 84 - i * 20) diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index 3347f14e2..9ca59f05c 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -210,6 +210,7 @@ public class ModItems { public static Item billet_u233; public static Item billet_u235; public static Item billet_u238; + public static Item billet_uzh; public static Item billet_th232; public static Item billet_plutonium; public static Item billet_pu238; @@ -1005,6 +1006,7 @@ public class ModItems { public static ItemRBMKRod rbmk_fuel_meu; public static ItemRBMKRod rbmk_fuel_heu233; public static ItemRBMKRod rbmk_fuel_heu235; + public static ItemRBMKRod rbmk_fuel_uzh; public static ItemRBMKRod rbmk_fuel_thmeu; public static ItemRBMKRod rbmk_fuel_lep; public static ItemRBMKRod rbmk_fuel_mep; @@ -1038,6 +1040,7 @@ public class ModItems { public static ItemRBMKPellet rbmk_pellet_meu; public static ItemRBMKPellet rbmk_pellet_heu233; public static ItemRBMKPellet rbmk_pellet_heu235; + public static ItemRBMKPellet rbmk_pellet_uzh; public static ItemRBMKPellet rbmk_pellet_thmeu; public static ItemRBMKPellet rbmk_pellet_lep; public static ItemRBMKPellet rbmk_pellet_mep; @@ -2292,6 +2295,7 @@ public class ModItems { billet_u233 = new Item().setUnlocalizedName("billet_u233").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":billet_u233"); billet_u235 = new Item().setUnlocalizedName("billet_u235").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":billet_u235"); billet_u238 = new Item().setUnlocalizedName("billet_u238").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":billet_u238"); + billet_uzh = new Item().setUnlocalizedName("billet_uzh").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":billet_uzh"); billet_th232 = new Item().setUnlocalizedName("billet_th232").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":billet_th232"); billet_plutonium = new Item().setUnlocalizedName("billet_plutonium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":billet_plutonium"); billet_pu238 = new Item().setUnlocalizedName("billet_pu238").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":billet_pu238"); @@ -3114,6 +3118,7 @@ public class ModItems { rbmk_pellet_meu = (ItemRBMKPellet) new ItemRBMKPellet("Medium Enriched Uranium-235").setUnlocalizedName("rbmk_pellet_meu").setTextureName(RefStrings.MODID + ":rbmk_pellet_meu"); rbmk_pellet_heu233 = (ItemRBMKPellet) new ItemRBMKPellet("Highly Enriched Uranium-233").setUnlocalizedName("rbmk_pellet_heu233").setTextureName(RefStrings.MODID + ":rbmk_pellet_heu233"); rbmk_pellet_heu235 = (ItemRBMKPellet) new ItemRBMKPellet("Highly Enriched Uranium-235").setUnlocalizedName("rbmk_pellet_heu235").setTextureName(RefStrings.MODID + ":rbmk_pellet_heu235"); + rbmk_pellet_uzh = (ItemRBMKPellet) new ItemRBMKPellet("Uranium Zirconium Hydride").setUnlocalizedName("rbmk_pellet_uzh").setTextureName(RefStrings.MODID + ":rbmk_pellet_uzh"); rbmk_pellet_thmeu = (ItemRBMKPellet) new ItemRBMKPellet("Thorium with MEU Driver Fuel").setUnlocalizedName("rbmk_pellet_thmeu").setTextureName(RefStrings.MODID + ":rbmk_pellet_thmeu"); rbmk_pellet_lep = (ItemRBMKPellet) new ItemRBMKPellet("Low Enriched Plutonium-239").setUnlocalizedName("rbmk_pellet_lep").setTextureName(RefStrings.MODID + ":rbmk_pellet_lep"); rbmk_pellet_mep = (ItemRBMKPellet) new ItemRBMKPellet("Medium Enriched Plutonium-239").setUnlocalizedName("rbmk_pellet_mep").setTextureName(RefStrings.MODID + ":rbmk_pellet_mep"); @@ -3159,7 +3164,7 @@ public class ModItems { rbmk_fuel_empty = new Item().setUnlocalizedName("rbmk_fuel_empty").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rbmk_fuel_empty"); rbmk_fuel_ueu = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_ueu) - .setYield(100000000D) + .setYield(100_000_000D) .setStats(15) .setFunction(EnumBurnFunc.LOG_TEN) .setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE) @@ -3167,7 +3172,7 @@ public class ModItems { .setMeltingPoint(2865) .setTint(tintUranium).setUnlocalizedName("rbmk_fuel_ueu").setTextureName(RefStrings.MODID + ":rbmk_fuel_ueu"); rbmk_fuel_meu = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_meu) - .setYield(100000000D) + .setYield(100_000_000D) .setStats(20) .setFunction(EnumBurnFunc.LOG_TEN) .setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE) @@ -3175,18 +3180,28 @@ public class ModItems { .setMeltingPoint(2865) .setTint(tintUranium).setUnlocalizedName("rbmk_fuel_meu").setTextureName(RefStrings.MODID + ":rbmk_fuel_meu"); rbmk_fuel_heu233 = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_heu233) - .setYield(100000000D) + .setYield(100_000_000D) .setStats(27.5D) .setFunction(EnumBurnFunc.LINEAR) .setHeat(1.25D) .setMeltingPoint(2865) .setTint(tintUranium).setUnlocalizedName("rbmk_fuel_heu233").setTextureName(RefStrings.MODID + ":rbmk_fuel_heu233"); rbmk_fuel_heu235 = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_heu235) - .setYield(100000000D) + .setYield(100_000_000D) .setStats(50) //Consistency with HEN; its critical mass is too high to justify a linear function .setFunction(EnumBurnFunc.SQUARE_ROOT) .setMeltingPoint(2865) .setTint(tintUranium).setUnlocalizedName("rbmk_fuel_heu235").setTextureName(RefStrings.MODID + ":rbmk_fuel_heu235"); + rbmk_fuel_uzh = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_uzh) + .setYield(50_000_000D) + .setStats(30) + .setFunction(EnumBurnFunc.LOG_TEN) + .setDepletionFunction(EnumDepleteFunc.GENTLE_SLOPE) + .setHeat(0.75) + .setHeatCoeff(1_000D, 500D) + .setDiffusion(0.1D) + .setMeltingPoint(1845) + .setTint(0x7077AF).setUnlocalizedName("rbmk_fuel_uzh").setTextureName(RefStrings.MODID + ":rbmk_fuel_uzh"); rbmk_fuel_thmeu = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_thmeu) .setYield(100000000D) .setStats(20) @@ -4706,6 +4721,7 @@ public class ModItems { GameRegistry.registerItem(billet_u233, billet_u233.getUnlocalizedName()); GameRegistry.registerItem(billet_u235, billet_u235.getUnlocalizedName()); GameRegistry.registerItem(billet_u238, billet_u238.getUnlocalizedName()); + GameRegistry.registerItem(billet_uzh, billet_uzh.getUnlocalizedName()); GameRegistry.registerItem(billet_th232, billet_th232.getUnlocalizedName()); GameRegistry.registerItem(billet_plutonium, billet_plutonium.getUnlocalizedName()); GameRegistry.registerItem(billet_pu238, billet_pu238.getUnlocalizedName()); @@ -5584,6 +5600,7 @@ public class ModItems { GameRegistry.registerItem(rbmk_fuel_meu, rbmk_fuel_meu.getUnlocalizedName()); GameRegistry.registerItem(rbmk_fuel_heu233, rbmk_fuel_heu233.getUnlocalizedName()); GameRegistry.registerItem(rbmk_fuel_heu235, rbmk_fuel_heu235.getUnlocalizedName()); + GameRegistry.registerItem(rbmk_fuel_uzh, rbmk_fuel_uzh.getUnlocalizedName()); GameRegistry.registerItem(rbmk_fuel_thmeu, rbmk_fuel_thmeu.getUnlocalizedName()); GameRegistry.registerItem(rbmk_fuel_lep, rbmk_fuel_lep.getUnlocalizedName()); GameRegistry.registerItem(rbmk_fuel_mep, rbmk_fuel_mep.getUnlocalizedName()); @@ -5617,6 +5634,7 @@ public class ModItems { GameRegistry.registerItem(rbmk_pellet_meu, rbmk_pellet_meu.getUnlocalizedName()); GameRegistry.registerItem(rbmk_pellet_heu233, rbmk_pellet_heu233.getUnlocalizedName()); GameRegistry.registerItem(rbmk_pellet_heu235, rbmk_pellet_heu235.getUnlocalizedName()); + GameRegistry.registerItem(rbmk_pellet_uzh, rbmk_pellet_uzh.getUnlocalizedName()); GameRegistry.registerItem(rbmk_pellet_thmeu, rbmk_pellet_thmeu.getUnlocalizedName()); GameRegistry.registerItem(rbmk_pellet_lep, rbmk_pellet_lep.getUnlocalizedName()); GameRegistry.registerItem(rbmk_pellet_mep, rbmk_pellet_mep.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/items/machine/ItemRBMKRod.java b/src/main/java/com/hbm/items/machine/ItemRBMKRod.java index adc49e57b..8519c2d5f 100644 --- a/src/main/java/com/hbm/items/machine/ItemRBMKRod.java +++ b/src/main/java/com/hbm/items/machine/ItemRBMKRod.java @@ -24,7 +24,7 @@ public class ItemRBMKRod extends Item { public ItemRBMKPellet pellet; public String fullName = ""; //full name of the fuel rod - public double reactivity; //endpoint of the function + public double reactivity; //endpoint of the function public double selfRate; //self-inflicted flux from self-igniting fuels public EnumBurnFunc function = EnumBurnFunc.LOG_TEN; public EnumDepleteFunc depFunc = EnumDepleteFunc.GENTLE_SLOPE; @@ -36,7 +36,9 @@ public class ItemRBMKRod extends Item { public double diffusion = 0.02D; //the speed at which the core heats the hull public NType nType = NType.SLOW; //neutronType, the most efficient neutron type for fission public NType rType = NType.FAST; //releaseType, the type of neutrons released by this fuel - public int colorTint = 0x304825; + public int colorTint = 0x304825; //RGB color of the rod when rendered in the fuel channel + public double heatCoeffStart = 0D; //when the heat coefficient starts acting + public double heatCoeffLength = 0D; //when the reaction multiplier of the coefficient hits 0 after taking effect /* _____ * ,I I I I, @@ -104,6 +106,12 @@ public class ItemRBMKRod extends Item { this.depFunc = func; return this; } + + public ItemRBMKRod setHeatCoeff(double start, double length) { + this.heatCoeffStart = start; + this.heatCoeffLength = length; + return this; + } public ItemRBMKRod setXenon(double gen, double burn) { this.xGen = gen; @@ -161,6 +169,15 @@ public class ItemRBMKRod extends Item { } double outFlux = reactivityFunc(inFlux, getEnrichment(stack)) * RBMKDials.getReactivityMod(world); + double coreHeat = this.getCoreHeat(stack); + + if(this.heatCoeffStart != 0) { + if(coreHeat >= this.heatCoeffStart) { + double prog = (coreHeat - this.heatCoeffStart) / this.heatCoeffLength; + if(prog > 1) prog = 1; + double mult = Math.sin((prog * Math.PI + Math.PI) / 2); + } + } //if depletion is enabled if(RBMKDials.getDepletion(world)) { @@ -171,8 +188,6 @@ public class ItemRBMKRod extends Item { setYield(stack, y); } - - double coreHeat = this.getCoreHeat(stack); coreHeat += outFlux * heat; this.setCoreHeat(stack, rectify(coreHeat)); diff --git a/src/main/java/com/hbm/tileentity/machine/rbmk/RBMKDials.java b/src/main/java/com/hbm/tileentity/machine/rbmk/RBMKDials.java index c2f2abaf1..c1fa028d5 100644 --- a/src/main/java/com/hbm/tileentity/machine/rbmk/RBMKDials.java +++ b/src/main/java/com/hbm/tileentity/machine/rbmk/RBMKDials.java @@ -16,7 +16,8 @@ public class RBMKDials { public enum RBMKKeys { KEY_SAVE_DIALS("dialSaveDials", true), - KEY_PASSIVE_COOLING("dialPassiveCooling", 1.0), + KEY_PASSIVE_COOLING("dialPassiveCooling", 2.5), + KEY_PASSIVE_COOLING_INNER("dialPassiveCoolingInner", 0.1), KEY_COLUMN_HEAT_FLOW("dialColumnHeatFlow", 0.2), KEY_FUEL_DIFFUSION_MOD("dialDiffusionMod", 1.0), KEY_HEAT_PROVISION("dialHeatProvision", 0.2), @@ -90,6 +91,7 @@ public class RBMKDials { } gameRules.get(RBMKKeys.KEY_PASSIVE_COOLING).add(new Tuple.Pair<>(world, GameRuleHelper.getDoubleMinimum(world, RBMKKeys.KEY_PASSIVE_COOLING, 0.0D))); + gameRules.get(RBMKKeys.KEY_PASSIVE_COOLING_INNER).add(new Tuple.Pair<>(world, GameRuleHelper.getDoubleMinimum(world, RBMKKeys.KEY_PASSIVE_COOLING_INNER, 0.0D))); gameRules.get(RBMKKeys.KEY_COLUMN_HEAT_FLOW).add(new Tuple.Pair<>(world, GameRuleHelper.getClampedDouble(world, RBMKKeys.KEY_COLUMN_HEAT_FLOW, 0.0D, 1.0D))); gameRules.get(RBMKKeys.KEY_FUEL_DIFFUSION_MOD).add(new Tuple.Pair<>(world, GameRuleHelper.getDoubleMinimum(world, RBMKKeys.KEY_FUEL_DIFFUSION_MOD, 0.0D))); gameRules.get(RBMKKeys.KEY_HEAT_PROVISION).add(new Tuple.Pair<>(world, GameRuleHelper.getClampedDouble(world, RBMKKeys.KEY_HEAT_PROVISION, 0.0D, 1.0D))); @@ -157,7 +159,7 @@ public class RBMKDials { } /** - * Returns the amount of heat per tick removed from components passively + * Returns the amount of heat per tick removed from components passively, when at an edge * @param world * @return >0 */ @@ -165,6 +167,15 @@ public class RBMKDials { return (double) getGameRule(world, RBMKKeys.KEY_PASSIVE_COOLING); } + /** + * Returns the amount of heat per tick removed from components passively, when surrounded by other components + * @param world + * @return >0 + */ + public static double getPassiveCoolingInner(World world) { + return (double) getGameRule(world, RBMKKeys.KEY_PASSIVE_COOLING_INNER); + } + /** * Returns the percentual step size how quickly neighboring component heat equalizes. 1 is instant, 0.5 is in 50% steps, et cetera. * @param world diff --git a/src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKBase.java b/src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKBase.java index 2b0a8da93..e485c2603 100644 --- a/src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKBase.java +++ b/src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKBase.java @@ -14,7 +14,6 @@ import com.hbm.handler.neutron.RBMKNeutronHandler.RBMKType; import com.hbm.handler.threading.PacketThreading; import com.hbm.main.MainRegistry; import com.hbm.packet.toclient.AuxParticlePacketNT; -import com.hbm.saveddata.TomSaveData; import com.hbm.tileentity.IOverpressurable; import com.hbm.tileentity.TileEntityLoadedBase; import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.ColumnType; @@ -37,7 +36,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.MathHelper; -import net.minecraft.world.EnumSkyBlock; import net.minecraft.world.World; import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.common.util.ForgeDirection; @@ -81,11 +79,14 @@ public abstract class TileEntityRBMKBase extends TileEntityLoadedBase { } /** - * Around the same for every component except boilers which do not have passive cooling + * Around the same for every component except boilers which do not have passive cooling. + * Requires the amount of connected neighbors to scale cooling * @return */ - public double passiveCooling() { - return RBMKDials.getPassiveCooling(worldObj); //default: 1.0D + public double passiveCooling(int members) { + double min = RBMKDials.getPassiveCoolingInner(worldObj); //default: 0.1D + double max = RBMKDials.getPassiveCooling(worldObj); //default: 1.0D + return min + (max - min) * ((4 - members) / 4D); } //necessary checks to figure out whether players are close enough to ensure that the reactor can be safely used @@ -110,10 +111,6 @@ public abstract class TileEntityRBMKBase extends TileEntityLoadedBase { boilWater(); } - this.worldObj.theProfiler.endStartSection("rbmkBase_rpassive_cooling"); - coolPassively(); - this.worldObj.theProfiler.endSection(); - this.networkPackNT(trackingRange()); } } @@ -223,6 +220,10 @@ public abstract class TileEntityRBMKBase extends TileEntityLoadedBase { this.markDirty(); } + + this.worldObj.theProfiler.endStartSection("rbmkBase_rpassive_cooling"); + coolPassively(members); + this.worldObj.theProfiler.endSection(); } @Override @@ -245,16 +246,9 @@ public abstract class TileEntityRBMKBase extends TileEntityLoadedBase { } } - protected void coolPassively() { + protected void coolPassively(int members) { - if(TomSaveData.forWorld(worldObj).fire > 1e-5) { - double light = this.worldObj.getSavedLightValue(EnumSkyBlock.Sky, this.xCoord, this.yCoord, this.zCoord) / 15D; - if(heat < 20 + (480 * light)) { - this.heat += this.passiveCooling() * 2; - } - } - - this.heat -= this.passiveCooling(); + this.heat -= this.passiveCooling(members); if(heat < 20) heat = 20D; diff --git a/src/main/resources/assets/hbm/lang/de_DE.lang b/src/main/resources/assets/hbm/lang/de_DE.lang index 63be2d5d7..ffd4abecc 100644 --- a/src/main/resources/assets/hbm/lang/de_DE.lang +++ b/src/main/resources/assets/hbm/lang/de_DE.lang @@ -1447,6 +1447,7 @@ item.billet_u235.name=Uran-235-Billet item.billet_u238.name=Uran-238-Billet item.billet_uranium.name=Uranbillet item.billet_uranium_fuel.name=Urankernbrennstoffbillet +item.billet_uzh.name=Uran-Zirkonium-Hydrid-Billet item.billet_yharonite.name=Yharonitbillet item.billet_zfb_am_mix.name=Reaktorfähiges ZFB-Billet item.billet_zfb_bismuth.name=Bismut ZFB-Billet @@ -3160,6 +3161,7 @@ item.rbmk_fuel_pu238be.name=Pu238Be-RBMK-Neutronenquelle item.rbmk_fuel_ra226be.name=Ra226Be-RBMK-Neutronenquelle item.rbmk_fuel_thmeu.name=ThMEU-RBMK-Kernbrennstoff item.rbmk_fuel_ueu.name=NU-RBMK-Kernbrennstoff +item.rbmk_fuel_uzh.name=UZrH-RBMK-Kernbrennstoff item.rbmk_fuel_zfb_am_mix.name=Reaktorfähiges Americium RBMK-ZFB item.rbmk_fuel_zfb_bismuth.name=Bismut RBMK-ZFB item.rbmk_fuel_zfb_pu241.name=Pu-241 RBMK-ZFB @@ -3192,6 +3194,7 @@ item.rbmk_pellet_pu238be.name=Pu238Be-Neutronenquellenpellet item.rbmk_pellet_ra226be.name=Ra226Be-Neutronenquellenpellet item.rbmk_pellet_thmeu.name=ThMEU-Kernbrennstoffpellet item.rbmk_pellet_ueu.name=NU-Kernbrennstoffpellet +item.rbmk_pellet_uzh.name=UZrH-Kernbrennstoffpellet item.rbmk_pellet_zfb_am_mix.name=Reaktorfähiges Americium ZFB-Pellet item.rbmk_pellet_zfb_bismuth.name=Bismut ZFB-Pellet item.rbmk_pellet_zfb_pu241.name=Pu-241 ZFB-Pellet diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index 29ce8c564..e19b29926 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -2220,6 +2220,7 @@ item.billet_u235.name=Uranium-235 Billet item.billet_u238.name=Uranium-238 Billet item.billet_uranium.name=Uranium Billet item.billet_uranium_fuel.name=Uranium Fuel Billet +item.billet_uzh.name=Uranium Zirconium Hydride Billet item.billet_yharonite.name=Yharonite Billet item.billet_zfb_am_mix.name=Reactor Grade Americium ZFB Billet item.billet_zfb_bismuth.name=Bismuth ZFB Billet @@ -4217,6 +4218,7 @@ item.rbmk_fuel_pu238be.name=Pu238Be RBMK Neutron Source item.rbmk_fuel_ra226be.name=Ra226Be RBMK Neutron Source item.rbmk_fuel_thmeu.name=ThMEU RBMK Fuel Rod item.rbmk_fuel_ueu.name=NU RBMK Fuel Rod +item.rbmk_fuel_uzh.name=UZrH RBMK Fuel Rod item.rbmk_fuel_zfb_am_mix.name=Fuel Grade Americium RBMK ZFB Rod item.rbmk_fuel_zfb_bismuth.name=Bismuth RBMK ZFB Rod item.rbmk_fuel_zfb_pu241.name=Pu-241 RBMK ZFB Rod @@ -4250,6 +4252,7 @@ item.rbmk_pellet_pu238be.name=Pu238Be Neutron Source Pellet item.rbmk_pellet_ra226be.name=Ra226Be Neutron Source Pellet item.rbmk_pellet_thmeu.name=ThMEU Fuel Pellet item.rbmk_pellet_ueu.name=NU Fuel Pellet +item.rbmk_pellet_uzh.name=UZrH Fuel Pellet item.rbmk_pellet_zfb_am_mix.name=Fuel Grade Americium ZFB Pellet item.rbmk_pellet_zfb_bismuth.name=Bismuth ZFB Pellet item.rbmk_pellet_zfb_pu241.name=Pu-241 ZFB Pellet diff --git a/src/main/resources/assets/hbm/textures/items/billet_uzh.png b/src/main/resources/assets/hbm/textures/items/billet_uzh.png new file mode 100644 index 0000000000000000000000000000000000000000..e83abc594c1175dd9f8e09d21f3555bdb44dba05 GIT binary patch literal 309 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#VfNv5-H*N9zI`Vq6Q!FPj(nEas^CqoT8o3eK>ch5O0op#>1 z(d#au6mRplU-t%AFWAM6`sX33oVO9L|tn&<+6HlBzEXDF6+mxZL zd1J?xBc~6)a%=%K4;xh9im^ z&i`J{gDo}{b>r+@)x2A-vhrb>=K4=wJiQVrm-VKx+#R!f*A5O2k8teB0j8%5`27oK z4_W0DTY$u#oveTV#o>{CEG~Tx`L<>SkWD9z;|L;x=Xq$Y>GiYeq_N34WE0$IG=N(G zXz%m}fP;uI^WdB>CME!YR4PRxk>L5m@zA>Kx|GZ1cmdj$$z-V4>j1c}8#Rr+2>-NM zU&B);_8NeEJ|Cz+yY%x5HLIM~EjW4R9^YzBrluwX>$!;%A1kZOFN|8{vjz}xP$Hbq z7g(vRvVEK4Yi$irYmC;m>FhPI**h=*fY!a&9e|)e0D$(1bx#HKU;t#}#O;#z`mqBz zA}FO=qBADs#}Dvd16!_v&Ifg%1p}*qBZ3k^YY(G!$d4bu-*aO^eyjl5bkc05f!If~ z*N-m(u>a^}R|85>S-jqfi46d{BUzzv1AteL?snGy$&qXbphQfEd*g@h#-e8!l^v8?`uXC|kkqh{KoEw-Os{QT>_MD#h?7nc z48o9XzvtsUD&{(+4bpT5z-ZLhrV-=u#JNF901&*^Nz)m5o)