Skip to content

V2 - #142

Open
Giovanniricotta2002 wants to merge 816 commits into
mainfrom
V2
Open

V2#142
Giovanniricotta2002 wants to merge 816 commits into
mainfrom
V2

Conversation

@Giovanniricotta2002

Copy link
Copy Markdown
Member

test

Aph0rism and others added 30 commits May 27, 2026 16:46
Replace null/FUEL with a proper NONE sentinel in the fallback RodType
and DEFAULT_ROD_TYPE to avoid ambiguous default behavior. Adds NONE to
the TypeRod enum accordingly.
…ods config

Guard proximityRodHeat with Math.max(1, ...) to avoid ArithmeticException
when the value is 0. Also removes the now-unused CRods config section from
CNCCommon.
…ession

Removes the anti-radiation helmet cloth item property callback (dead code
with debug log) and the now-unnecessary @SuppressWarnings("removal").
…methods

Delete the CNCommonProxy base class and the DistExecutor-based PROXY field.
CNClientProxy is now a standalone @onlyin(CLIENT) class with static methods,
and CreateNuclearClient no longer extends it. All proxy call sites updated to
use direct static access.
RodType.proximityRodHeat and the graphiteProxyMalus config are now float
to support values like -0.25. Codec, tooltip format (%d → %.2f), and
fallback JSON updated accordingly.
…ring

Replace the String-based sendActionBar signature with MutableComponent to
avoid unnecessary .string() calls at call sites. Add a LangBuilder overload
for convenience. Update ReactorAssembler, ReactorControllerBlock, and
ReactorControllerBlockEntity accordingly, and standardise notification
translation keys under the createnuclear.notification.* namespace.
…sualState enum

Drop the reactor_controller_ prefix from generated model files (off/on/standby)
and update the blockstate references accordingly. Replace the ad-hoc suffix
string logic in ReactorControllerGenerator with a ControllerVisualState enum
for clarity.
Replace all String-based sendTitle and quickAlert signatures with
MutableComponent variants and add LangBuilder convenience overloads
for all three methods. Streamline getTargetPlayers with streams and
add full Javadoc to the public API. Update all call sites in
ReactorAssembler and ReactorControllerBlockEntity accordingly. Also
removes a stale warn log from getAdvancement().
Replace leftover MOON_*/MARE/LUNASLATE identifiers with domain-appropriate
names (IS_IRRADIATED_PLAIN, ENRICHED_SOUL_SOIL, LEAD_ROCK, etc.) and update
the noise settings random_name to match. Also changes heat accumulator to
double, uses getF() for the cooler proxy config, switches the alarm to
REACTOR_ALARM_2, adds RodType.toString(), and removes CNSounds.java.
Extend RadiationRegistry with a biome map and Builder.biome() method.
RadiationCapability now tracks the player's current biome, recomputes
radiation on biome change, and adds a getRawBiomeRadiation helper.
Register the irradiated plain biome with a value of 25. Also adds
lastBiomeLocation to IRadiationCapability/RadiationCapability and
extracts item radiation logic into computeItemRadiation().
Enhance fluid rendering and update reactor input textures
Giovanniricotta2002 and others added 30 commits July 14, 2026 17:40
…em as confirmed status quo

- §0: add a 2026-07-14 documentation-only update confirming the §3/§7
  item 9 status quo — RadiationCapability.tickRadiation's lack of an
  inventory dirty-check for non-player LivingEntity is analyzed in
  depth and kept as-is, since the mob scan (6 slots, O(1) HashMap
  lookups via RadiationRegistry) is too small for a player-style hash
  (41 slots) to pay off, and the rest of tickRadiation likely dominates
  per-mob cost anyway.
- §3 table: rewrite the RadiationCapability.tickRadiation row from
  "point à surveiller" to "statu quo recommandé", summarizing why
  hashing 6 slots wouldn't be cheaper than the direct computation it
  would replace, and that event-driven invalidation
  (LivingEquipmentChangeEvent) — not a hash — would be the only
  approach worth revisiting if profiling ever flags this loop as hot.
- §7 (item 9 "à surveiller"): update the watch-item description with
  the same summary and §8.2 cross-reference.
- §8.2: add a detailed rebuttal with code references
  (RadiationCapability.java, RadiationRegistry.java) covering: the
  41-vs-6-slot asymmetry, why hashing wouldn't be cost-effective at mob
  scale, why the rest of tickRadiation likely dominates the per-mob
  cost regardless, the event-driven invalidation fallback if profiling
  ever justifies it, and a clarification that
  computeItemRadiation(Player) intentionally excludes player armor
  since no armor item in this mod is a radiation source (only
  resistance equipment).
…as still open

- Coverage-limits note (intro): mark B7, B10, B17 and B18 as re-verified
  by direct code reading instead of "neither confirmed nor refuted";
  note that the unnumbered "minor" list from AUDIT_V1.md §2 is still
  entirely unverified.
- §1 (bug table): add a new open bug row for
  IrradiatedOverlayRendererVision (foundation/events/overlay/IrradiatedOverlayRendererVision.java:23)
  — ex-B10 — mc.gameMode.getPlayerMode() is called with no null-guard
  on mc.gameMode, which can be null during world (re)load; the
  existing mc.player null-check happens later in the method and does
  not protect this earlier access. One-line fix identified but not
  yet applied.
- §8.2 (refuted/closed investigations): add two new entries refuting
  legacy AUDIT_V1.md claims after direct code inspection —
  CNNoiseData.bootstrapRegistries (B7): EROSION noise parameters are
  in fact registered, contrary to the "entirely commented out" claim;
  RodsTooltipHandler (B17): the namespace check is confirmed
  intentional (explicit in-code comment) to avoid double tooltips on
  mod rods already handled via Registrate's setTooltipModifierFactory,
  not an accidental inversion.
- Relocate ClientEvents from the createnuclear root package to
  net.nuclearteam.createnuclear.foundation.events, aligning it with
  the rest of the foundation/events/* classes (e.g. the overlay
  renderers).
- Update the package declaration and add explicit imports for
  CNClientProxy and CreateNuclear (previously implicit same-package
  references from the root package).
- No behavioral changes: nuke flash/shake ticking, camera-shake
  computation, and anti-radiation armor model-part hiding logic are
  unchanged.
…gister them under the "client" mixin block

- Relocate CameraAccessor, GameRendererMixin and RadiationHeartMixin
  from foundation.mixin to a new foundation.mixin.client subpackage,
  and update ClientEvents' import of CameraAccessor accordingly.
- createnuclear.forge.mixins.json: move RadiationHeartMixin,
  GameRendererMixin and CameraAccessor out of the common "mixins" list
  into the "client" list (with their new "client." prefix), so they
  are only applied on the client distribution instead of being loaded
  on dedicated servers; also drop the now-unused "accessWidener" entry.
- Rename mixin injector methods to the "CN$" prefix convention
  (cn_tick -> CN$tick, cn_render -> CN$render,
  createnuclear$changeHeartTexture -> CN$changeHeartTexture) for
  consistency across the mixin classes.
- RadiationHeartMixin: fix VANILLA_ICONS to use the single-argument
  ResourceLocation constructor (implicit "minecraft" namespace)
  instead of the deprecated explicit-namespace constructor.
…single Holder

- RodType and ReactorFluidType now hold a single Holder<Item>/Holder<Fluid>
  (fields renamed item/fluid) instead of a HolderSet<Item>/HolderSet<Fluid>
  that always contained exactly one entry in practice; codecs switch from
  RegistryCodecs.homogeneousList to RegistryFixedCodec, and generated JSON
  data (fluids/type/*.json, rods/type/*.json) is regenerated with the
  singular "fluid"/"item" fields instead of "fluids"/"items" arrays.
- RodType.Builder.addItems(ItemLike...) is replaced by a single-item
  item(ItemLike) setter; ReactorFluidType.Builder.fluid(...) now replaces
  rather than accumulates. Update all call sites (ItemRodTypesValue,
  CNRodTypes javadoc, DefaultHeatCalculator's rod.items().size() > 0
  checks switched to rod.isNotEmptyItem()).
- Default sentinel instances (ItemRodTypesValue.DEFAULT_ROD_TYPE,
  ReactorFluidTypesValue.DEFAULT_REACTOR_FLUID_TYPE) now use
  Items.AIR.builtInRegistryHolder() / Fluids.EMPTY.builtInRegistryHolder()
  instead of an empty HolderSet, and isNotEmptyItem()/isNotEmptyFluid()
  check identity against AIR/EMPTY instead of checking set size.
- ReactorFluidType: remove the unused useConfig/setRodConfig
  config-override mechanism (dead code — the CNConfigs lookup was
  already commented out) along with its now-redundant maxHeat()/
  efficiency() overrides.
- toString() on both records is updated to report the single fluid/item
  name instead of joining a list.
…echanism discrepancy

- CNConfiguredFeatures: bump lead ore's OreConfiguration vein size
  from 10 to 12.
- CNPlacedFeatures: rebalance ore placement counts — uranium 5 -> 4,
  thorium 8 -> 6 per chunk, and reduce striated_ores_overworld
  frequency from "on average once every 1 chunk" to once every 64
  chunks (was effectively placed almost everywhere before).
- Regenerate the corresponding datagen output
  (worldgen/configured_feature/lead_ore.json,
  worldgen/placed_feature/{striated_ores_overworld,thorium_ore,uranium_ore}.json).
- AUDIT_ACTUEL.md: add a new "on hold" §2 note (per user request,
  2026-07-25) flagging that Nitrate Ore's loot table uses vanilla
  minecraft:ore_drops while Thorium/Uranium use set_count +
  uniform_bonus_count — a pattern inconsistency to resolve later
  (harmonize or document as intentional), not addressed in this
  change.
…add its Reinforced Glass Bottle recipe chain

- Rename BiomeRestoreCellItem -> BiomeIrradationExtractorItem and the
  registered item biome_restore_cell -> biome_irradiation_extractor
  ("Biome Irradiation Extractor"), updating every reference
  (CNItems, CreateNuclearClient, CNBuilderTransformers) and the item
  model/texture path from item/biome_restore_cell/* to
  item/biome_irradiation_extractor/*. Old biome_restore_cell models
  and textures are deleted; new biome_irradiation_extractor models,
  advancement and lang entries are generated in their place.
- The extractor is no longer a standalone craftable item: it now has a
  shaped crafting recipe (8x) from 8 Reinforced Glass Bottles + 1
  Nether Star, gated behind a new has_reinforced_glass_bottle
  advancement/unlock, and its max stack size changes from 1 to 16.
- Add a new REINFORCED_GLASS_BOTTLE item (CNItems), craftable (3x)
  from Reinforced Glass in a diamond pattern, with its own generated
  model, recipe and texture.
- CBiomeRestore config: lower the default maxCharge from 16 to 8, and
  remove the now-unused alwaysShowBar option (and its comment).
- tooltips.json: add a beta-warning tooltip and a
  biome_irradiation_extractor restorations-counter tooltip
  ("Restorations: %d / %d"); minor unrelated whitespace cleanup
  (removed stray blank lines).
- Regenerate affected datagen output: en_us.json/en_ud.json lang
  files, the .cache index, and new recipe/advancement JSON for both
  biome_irradiation_extractor and reinforced_glass_bottle.
…ts across CNC* classes

- CRods: rename fields to a consistent noun-first style
  (baseValueUranium -> uraniumBaseValue, uraniumProxyBonus ->
  uraniumProximityBonus, baseValueGraphite -> graphiteBaseValue,
  graphiteProxyMalus -> graphiteProximityMalus) and remove two
  already-commented-out dead config entries (maxHeat,
  rodFuelMaxForCoolerRod) along with their now-unused comments.
  Update every call site: CNItems (rod registration), and the
  DefaultHeatCalculatorGameTest assertions.
- CNotify: rename distanceOfWarning -> warningDistance and its TOML
  key to snake_case; update all four call sites (ReactorAssembler,
  ReactorControllerBlock, IExplosionService,
  ReactorMeltdownMonitor). Fix CNCServer's copy-paste bug where the
  notify field was built with Comments.ratio instead of a proper
  notify comment.
- CWorldGen: invert disableWorldGen (default false) into
  enable/EnableWorldGen (default true), and update
  ConfigPlacementFilter.shouldPlace to match the flipped polarity.
- CRadiation: reorder configuredLists to be declared after the
  scalar fields, rename the entityBlackList TOML key to
  entity_blacklist, and substantially trim/rewrite the verbose
  multi-paragraph comments (enabled, radiationLevel1-3,
  amplifierLevel0-2, list, blackListEntity) into concise single-line
  or shortened descriptions.
- CNCClient: rename TOML keys nuclearBombFlash -> nuclear_bomb_flash
  and screenShaking -> screen_shake to snake_case, make screenShaking
  final, and reword both comments.
- CNCCommon: reword the worldGen comment.
- tooltips.json: fix a missing space in the enriched_soul_soil
  tooltip ("fire_.Can" -> "fire_. Can").
- Regenerate affected datagen output (en_us.json, en_ud.json, the
  .cache index) to reflect the renamed config-adjacent lang entries.
- Add an explicit import for ForgeConfigSpec.ConfigValue and use the
  unqualified ConfigValue<List<? extends String>> type for
  ENTITY_BLACKLIST instead of the fully-qualified
  ForgeConfigSpec.ConfigValue reference. No behavioral change.
…mity math asymmetry

- DefaultHeatCalculator.computeHeat: read the rod pattern directly from
  the blueprint item via ReactorBluePrintItem.getItemStorage(...)
  (an ItemStackHandler) instead of manually parsing raw "pattern"/
  "Items" NBT compound tags — removes the ListTag/Tag NBT walk in
  favor of the same accessor GameTest fixtures already use.
- Rewrite the fuel/cooler proximity scoring to be symmetric: a fuel
  rod's neighbor scan now only ever contributes when adjacent to
  another fuel rod (RodType.TypeRodPredicate.isFuel), and a cooler's
  scan only contributes when adjacent to another cooler
  (isCooled) — replacing the previous asymmetric logic where a cooler
  never scored anything and a fuel-next-to-cooler used a
  fuel.base/cooler.proximity division. Add the RodType(RodType) new
  isFuel/isCooled predicate overloads used for this.
  NOTE: this changes DefaultHeatCalculatorGameTest's asymmetry test
  from correct to outdated — that test still asserts the old
  fuel/cooler division behavior and needs re-verification against
  this new logic.
- computeHeat now skips TypeRod.NONE rods explicitly and clamps the
  final result to a minimum of 0 (Math.max(0, heat + overHeat))
  instead of allowing negative heat.
- Thread a new previousHeat/currentHeat parameter through the whole
  heat-calculation call chain (IHeatService, DefaultHeatService,
  HeatManager, IOverheatController, DefaultOverheatController,
  IReactorHeatUpdateCoordinator, ReactorHeatUpdateCoordinator,
  ReactorControllerBlockEntity) so DefaultOverheatController can force
  the overheat timer to increment once the reactor's heat exceeds its
  active fluid's configured maxHeat, in addition to the pre-existing
  fluid-shortage/negative-ratio conditions.
- Minor cleanup: drop unused imports in HeatManager, remove a stray
  blank line in ReactorControllerInventory, and remove a dead
  `formattedPattern[j][k] == 99` sentinel check in DefaultHeatCalculator
  (now unreachable since slots are matched by value, not sentinel).
… cooler-to-cooler

- DefaultHeatCalculator.computeHeat: correct the cooler branch's
  neighbor check — the previous commit's rewrite still compared
  isCooled(rod) && isCooled(neighborRod), which never triggers a
  cooler's own contribution (two coolers never award heat to each
  other under this formula); now correctly checks
  isCooled(rod) && isFuel(neighborRod), matching the external design
  spec's "Graphite extra: -1/4Q of the heating rod" and the
  reference JS calculator (verified 128 on both sides for the
  [G,T,G]/[T,U,T]/[G,T,G] pattern).
- AUDIT_ACTUEL.md: document this fix in §0 (commit 691dfb1 + this
  follow-up), close the §2.2 fuel/cooler asymmetry item as resolved,
  update §3's GameTest coverage row and add a new
  ReactorFluidType.maxHeat() row noting it's no longer dead code,
  update §7 item 6's optimization note, and add the corresponding
  §8.1 changelog row — all cross-referencing that
  DefaultHeatCalculatorGameTest still asserts the old (now incorrect)
  division-based behavior and needs to be rewritten to match.
…a and add a 3x3 wiki-reference test

- DefaultHeatCalculatorGameTest: rename and rewrite test 3
  (fuelCoolerMix_onlyFuelScansContributeProximityHeat_coolerAdjacencyIsAsymmetric
  -> fuelCoolerMix_coolerScansItsOwnFuelNeighborsSymmetrically) to
  assert the current cooler-scans-fuel-neighbor multiplication formula
  (neighborRod.baseRodHeat() * rod.proximityRodHeat()) instead of the
  old fuel-scans-cooler-neighbor division formula, per the
  DefaultHeatCalculator fix landed in the previous commit.
- Fix test 2 (singleCoolerRod_noNeighbors_addsOnlyItsOwnBaseRodHeat):
  computeHeat now floors its result at 0
  (Math.max(0, heat + overHeat)), so an isolated cooler's negative
  baseRodHeat was previously being swallowed by the floor and the
  test's -32 expectation was unreachable; add a large overHeat (50)
  to keep the total positive and actually exercise baseRodHeat's
  contribution.
- Add a new test 4 (threeByThreeDiamond_matchesWikiCalculatorReferenceValue)
  covering a full interior 3x3 rod pattern (4 corner graphites, 4 edge
  thoriums, 1 center uranium), asserting against a config-derived
  expected value that matches the community wiki calculator's
  reference result of 128 for this pattern under default balance.
- AUDIT_ACTUEL.md: update §2.2, §3's GameTest coverage row, and the
  §8.1 changelog entry to record that DefaultHeatCalculatorGameTest is
  now up to date with the corrected formula, and document the
  in-game GameTest run (./gradlew runGameTestServer, 30 tests, 3
  failures — 2 already-known/expected ReactorInputFluidManager
  over-extraction contract markers, 1 fixed here from the new
  Math.max(0, ...) floor).
…he O(81) position lookup

- DefaultHeatCalculator: replace the per-rod double loop over the full
  9x9 formattedPattern grid (used just to relocate a rod's own slot
  before scanning its neighbors) with a static
  NEIGHBORS_BY_SLOT map (Map<Integer slot, List<Integer> neighborSlots>),
  built once via buildNeighborsBySlot() from the pattern/offsets.
  computeHeat now looks up a rod's neighbor slots directly instead of
  re-scanning all 81 grid cells per rod (~57x81 ≈ 4617 iterations/tick
  on a full reactor down to O(1) map lookups), matching the low-risk
  optimization already tracked in AUDIT_ACTUEL.md §2.2/§7.
- formattedPattern/offsets fields become static final
  FORMATTED_PATTERN/OFFSETS constants shared across instances instead
  of being rebuilt per DefaultHeatCalculator instance.
- No behavioral change: neighbor resolution order and the fuel/cooler
  proximity formulas are unchanged.
…_ACTUEL.md, cross-referenced to 37613d8

- §2.2: mark the remaining O(81) position-lookup loop as resolved
  (commit 37613d8), pointing to the new §8.1 entry instead of
  repeating the recommendation inline.
- §3 (multiblock optimization table): flip the
  DefaultHeatCalculator.computeHeat row from "partially fixed, low
  priority" to "fixed, closed", referencing the new NEIGHBORS_BY_SLOT
  map and commit 37613d8.
- §7 (priority 6, minor optimizations): mark the slot->neighbor
  precompute item as done, describing NEIGHBORS_BY_SLOT and
  buildNeighborsBySlot().
- §8.1 (changelog table): correct the previous fuel/cooler-asymmetry
  entry's hash reference (drop the "+ correctif suivant... non
  commité" placeholder, now that that follow-up has its own commit),
  and add a new changelog row for 37613d8 documenting the O(81) ->
  O(1) neighbor-lookup optimization (FORMATTED_PATTERN/OFFSETS made
  static final, new precomputed NEIGHBORS_BY_SLOT map), noting it is
  a no-behavior-change performance fix.
…mble/disassemble sound events

- CNSoundEvents: rename the NUCLEAR_EXPLOSION_RINGING sound entry
  from "explosion/nuclear_explosion_ringing" to "explosion/ringing",
  matching the renamed audio asset (nuclear_explosion_ringing.ogg
  deleted, replaced by the new ringing.ogg).
- NuclearMushroomCloudParticle: fix the ringing playback to actually
  use CNSoundEvents.NUCLEAR_EXPLOSION_RINGING instead of
  NUCLEAR_EXPLOSION_SHOCKWAVE (kept as a commented-out reference).
- ReactorControllerBlock: switch the assemble/disassemble sound
  effects from REACTOR_ACTIVATION/REACTOR_SHUT_OFF to the dedicated
  MOTOR_ASSEMBLE/MOTOR_DISASSEMBLE sound events.
- gradle.properties: bump mod_version from 2.0.17-beta-sound to
  2.0.17-beta-sound2.
- Regenerate affected datagen output (sounds.json, en_us.json,
  en_ud.json, .cache index entries) to reflect the renamed sound
  file.
…version

- IrradiatedBiomes: register a new .backgroundMusic(new Music(...))
  entry for the irradiated_land biome, reusing the same
  BIOME_WASTELAND sound event as the ambient loop sound (min_delay 0,
  max_delay 300, replace_current_music true). The existing
  .ambientLoopSound(...) call is kept but flagged in a new comment as
  pending replacement by a dedicated ambient-loop sound distinct from
  the background music.
- BiomeIrradiationService: add unused ServerPlayer and CreateNuclear
  imports (no behavioral change yet in this diff).
- gradle.properties: bump mod_version from 2.0.17-beta-sound2 to
  2.0.17-beta-sound3.
- Regenerate the corresponding datagen output
  (worldgen/biome/irradiated_land.json gains a "music" block; .cache
  index updated).
…verheat, in addition to fluid conditions

- Add new HeatBalance record (content/multiblock/reactorLogic) holding
  weighted heatPoints (fuel) and coolingPoints (cooler) sums, with a
  resolve() method comparing their ratio against the wiki-reference
  6:1 TARGET_RATIO to produce an EquilibriumState.
- Add new EquilibriumState enum (OVERHEATING / BALANCED / OVERCOOLING);
  only OVERHEATING currently drives behavior (BALANCED/OVERCOOLING are
  placeholders for a future status display / output bonus-malus).
- Move heat-balance computation from a static
  ReactorHeatUpdateCoordinator.calculateActualTotalHeatRatio(...)
  helper into the IReactorHeatUpdateCoordinator interface as an
  instance method calculateHeatBalance(...), now returning a
  HeatBalance instead of a single int — it separately accumulates
  heatPoints for FUEL rods and coolingPoints for COOLER rods (each
  weighted by RodType.ratio()) instead of summing every rod's
  heatRatio into one signed total. Document all four
  IReactorHeatUpdateCoordinator methods with full parameter Javadoc.
- DefaultOverheatController.updateState: take a HeatBalance instead of
  a raw totalHeatRatio int. The overheat timer now escalates on two
  independent malus points — rodMalus (HeatBalance.resolve() ==
  OVERHEATING) and fluidMalus (insufficient fluid / exceeds fluid
  maxHeat) — and when both are active simultaneously, overHeat
  increases by 2 per tick instead of 1, and overFlowLimiter decreases
  by the same malusPoints count (floored at 2) instead of always by 1.
- Thread the new HeatBalance type through the whole heat-calculation
  call chain in place of the old totalHeatRatio int: IHeatService,
  DefaultHeatService, HeatManager, IOverheatController,
  ReactorHeatUpdateCoordinator, ReactorControllerBlockEntity (new
  heatBalance field, initialized to HeatBalance(0, 0), now populated
  via heatCoordinator.calculateHeatBalance(...) instead of the removed
  static helper).
- RodType: rename the heatRatio field/accessor/builder methods to
  ratio (and its codec key "heatRatio" -> "ratio", default unchanged
  at 1); update all call sites (CNItems rod registration, RodsStats
  tooltip, ReactorBluePrintMenu's totalHeatRatio -> totalRatio local
  var and NBT key "totalHeatRatio" -> "totalRatio").
- CRods: change graphiteHeatRatio's default value from -6 to 1, since
  cooling/heating weighting is now handled by HeatBalance's separate
  heatPoints/coolingPoints sums rather than by sign.
- tooltips.json / regenerated en_us.json, en_ud.json: rename the
  "heatRatio" tooltip key to "ratio" and reword its text to "Rod Value
  for ratio: %d".
…unused worldgen imports

- ReactorOutputEntity: remove the dead/unused controllerEntity,
  controller fields and their setController(...)/setSpeed(...)/
  getDir()/setDir(...) accessors, plus the overridden tick() method
  that looked up the reactor controller 3 blocks above and force-set
  speed to 0 whenever it wasn't found or wasn't assembled — none of
  this was reachable from outside the class and getGeneratedSpeed()
  never consulted these fields. Also drop now-unused imports
  (BlockGetter, Level, CNBlocks, ReactorControllerBlock,
  ReactorControllerBlockEntity, the static DIR import), a stray
  commented-out ScrollValueBehaviour field/getGeneratedSpeed body, and
  redundant blank lines; make the inner ReactorOutputValue class
  static since it no longer needs an outer-instance reference.
- IrradiatedBiomes: remove unused imports (Carvers,
  MiscOverworldPlacements, GenerationStep) left over from prior
  worldgen cleanup.
extractFluids never decremented fluidNeeded between handlers, so the requested
amount was treated as a per-input quota instead of a total: a reactor asking for
10 units with two fluid inputs holding 10 each drained both, removing 20. The
more inputs the player placed, the faster the coolant vanished.

An `if (toExtract > 1)` guard also silently dropped requests for exactly one
unit, which is what FluidConsumptionRateCalculator asks for at the low end of
the consumption curve, so the smallest reactors leaked their buffer accounting.

The loop now tracks what is left to extract, stops once satisfied, and subtracts
what the handler actually returned rather than what was asked of it.

The Javadoc claimed "true if the full amount was extracted" while the code
returned true on any partial extraction. The code's behaviour is the right one -
the reactor should consume whatever coolant it can reach rather than refuse to
run - so the Javadoc now documents that instead.

The two gametests that pinned the buggy behaviour are removed, and
extractFluids_returnsTrueEvenWhenNotFullyExtracted_javadocMismatch is renamed
now that there is no mismatch. runGameTestServer now runs 28 tests and exits 0.

The identical fix is applied to the NeoForge branch, keeping the two
implementations byte-identical.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…tractorItem

Pendant d'un renommage fait cote NeoForge, ou 8 fichiers portaient un nom
different du notre pour un contenu identique (section 1 de
PARITE_FORGE_NEOFORGE.md). Sept ont ete alignes sur Forge. Celui-ci est le
huitieme, et le seul ou la faute etait de notre cote : nous ecrivions
"Irrad-a-tion", NeoForge ecrivait deja "Irrad-ia-tion". Aligner NeoForge sur
nous aurait propage la faute dans les deux depots.

Renommage de classe uniquement. BiomeIrradiationExtractorItem.TAG vaut
"biome_restore" et l'item reste enregistre sous "biome_irradiation_extractor" :
aucune ressource, aucune cle de lang et aucun monde existant n'est touche.

Verifie : compileJava passe, et le diff d'arborescence entre les deux depots ne
liste plus ce fichier.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants