Skip to content
This repository was archived by the owner on Aug 31, 2026. It is now read-only.

Commit cac3115

Browse files
StannisModclaude
andcommitted
fix: guard the JEI gas-giant-refresh call so it loads without JEI (Advanced-Rocketry#76)
PacketDimInfo.executeClient called ARPlugin.requestGasGiantRefresh() unconditionally. ARPlugin implements mezz.jei.api.IModPlugin, so touching it loads JEI classes and NoClassDefFoundErrors when JEI isn't installed — re-introducing issue Advanced-Rocketry#76 via the dimension-sync path (the startup path kaduvill already guarded in ClientProxy). Wrap the call in Loader.isModLoaded("jei") and drop the top-level ARPlugin import. Also files TASK-46: CompatibilityMgr is vestigial (all consumers gone or commented out); left in place pending a revive-vs-remove decision. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 71c15cf commit cac3115

3 files changed

Lines changed: 61 additions & 2 deletions

File tree

.agent/tasks/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ entry is an actionable TASK with a defined plan + acceptance.
375375
| [TASK-15](TASK-15-visual-regression.md) | Visual regression infrastructure for Minecraft client | ❌ Not planned | Closed 2026-05-29 — speculative infra with no live trigger and high build cost. Original 4 promotion triggers retained in task file; re-open via a new TASK if any fires. |
376376
| [TASK-16](TASK-16-test-stability-flake-watch.md) | Test-stability flake watch — investigation deliverable. Three flake shapes root-caused; shape #3 mitigated in TASK-26 via kit retry; #1+#2 split into TASK-27; #4 (worldgen sampling) confirmed across 3 sightings, promoted to TASK-28 F7. | 🟡 Investigation complete | Investigation done 2026-05-23. |
377377
| [TASK-45](TASK-45-oregen-clumpsize-clamp-disables-impossible.md) | `<oreGen>` `clumpSize`/`chancePerChunk` clamp to a floor of 1 (and empty `<oreGen>` falls through to the global pressure/temp default), so "disable this ore" is inexpressible per planet — likely the real cause behind #73's "zeroing veins still spawns ore". Analysis only; fix-vs-document undecided. | 🟡 Backlog — not started | Found 2026-06-01 alongside the #73 round-trip test. |
378+
| [TASK-46](TASK-46-compatibilitymgr-vestigial.md) | `CompatibilityMgr` is vestigial — `compat` instance never read, mod-presence flags written-but-not-read / set-by-uncalled-method, `reloadRecipes()` commented out. Kept on purpose (may regain meaning); decide revive vs remove. | 🟡 Backlog — not started | Found 2026-06-01 during the #76 JEI-ref audit. |
378379

379380
## Conscious non-goals
380381

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# TASK-46: `CompatibilityMgr` is currently vestigial — decide revive vs remove
2+
3+
## Ticket
4+
5+
- Source: discovered 2026-06-01 while auditing `integration.jei` references
6+
for the issue #76 JEI NoClassDefFoundError guard.
7+
- Status: 🟡 **Backlog — not started.** Deliberately left in place; the
8+
maintainer may want to give it meaning again rather than delete it.
9+
- Created: 2026-06-01.
10+
11+
## Context
12+
13+
`integration/CompatibilityMgr.java` holds three static booleans plus a
14+
recipe-reload hook, but every live consumer is gone or commented out:
15+
16+
- `AdvancedRocketry.compat = new CompatibilityMgr()` (AdvancedRocketry.java:173)
17+
— instance created, **never read** anywhere.
18+
- `isSpongeInstalled` — written at `AdvancedRocketry.java:1145`, its only
19+
read is commented out (`WorldProviderPlanet.java:232`). Written, never read.
20+
- `gregtechLoaded` / `thermalExpansionLoaded` — set only inside
21+
`getLoadedMods()`, which has **no callers**. Never set, never read.
22+
- `getLoadedMods()` — uncalled.
23+
- `reloadRecipes()` — entirely commented out (also the only reference to
24+
`integration.jei.ARPlugin` left in the file — a dead import).
25+
26+
So the class does nothing observable today. It was historically the
27+
central "which integration mods are present" flag-holder + a JEI
28+
recipe-reload hook.
29+
30+
## Why keep it for now
31+
32+
Maintainer call (2026-06-01): not certain it should be removed — the
33+
mod-presence flags + a recipe-reload entry point may be given meaning
34+
again (e.g. real GregTech / ThermalExpansion / Sponge branches, or a
35+
working `/ar reloadrecipes`). Deleting now would just have to be
36+
re-created later.
37+
38+
## Options (decide later)
39+
40+
1. **Revive** — wire `getLoadedMods()` into mod init, uncomment the
41+
reads that need the flags, and restore `reloadRecipes()` behind a
42+
`Loader.isModLoaded("jei")` guard (so it can't re-introduce the #76
43+
class-load crash). Then add coverage for the branches that read it.
44+
2. **Remove** — delete `CompatibilityMgr`, the unused `compat` field,
45+
the dead `import ...jei.ARPlugin`, and the orphaned `isSpongeInstalled`
46+
write. Smallest footprint; loses the scaffolding.
47+
3. **Leave as-is** — keep as a documented placeholder (current state).
48+
49+
## Dependencies
50+
51+
- Independent. Does NOT block the #76 guard (already shipped in
52+
`PacketDimInfo`) or any other work.
53+
- If revived, the recipe-reload path MUST stay behind a JEI-loaded guard
54+
— see the #76 fix rationale (touching `ARPlugin` loads JEI classes).

src/main/java/zmaster587/advancedRocketry/network/PacketDimInfo.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import zmaster587.advancedRocketry.AdvancedRocketry;
1010
import zmaster587.advancedRocketry.dimension.DimensionManager;
1111
import zmaster587.advancedRocketry.dimension.DimensionProperties;
12-
import zmaster587.advancedRocketry.integration.jei.ARPlugin;
1312
import zmaster587.advancedRocketry.util.SpawnListEntryNBT;
1413
import zmaster587.libVulpes.network.BasePacket;
1514

@@ -146,7 +145,12 @@ public void executeClient(EntityPlayer thePlayer) {
146145
DimensionManager.getInstance().registerDimNoUpdate(dimProperties, true);
147146
}
148147
}
149-
ARPlugin.requestGasGiantRefresh();
148+
// Guard the JEI integration: touching ARPlugin (implements mezz.jei.api
149+
// IModPlugin) loads JEI classes, which NoClassDefFoundErrors when JEI
150+
// isn't installed. See issue #76.
151+
if (net.minecraftforge.fml.common.Loader.isModLoaded("jei")) {
152+
zmaster587.advancedRocketry.integration.jei.ARPlugin.requestGasGiantRefresh();
153+
}
150154
}
151155

152156
@Override

0 commit comments

Comments
 (0)