thaumicadditions#29 made the creative node register its location in TileNode.locations once. The original rewrote it every tick, which also healed the map after TC4 or another mod cleared or changed it. This PR keeps #29's saving but checks, each tick, that the entry still exists and matches (dimension, x, y, z); if not, generateId() runs again that same tick.
CreativeNodeRegistryTest: the 2 existing + cleared map repaired next tick, altered entry restored next tick, intact entry not rewritten (same list instance).
Scenario for a real server
Place a creative node, run a vis relay/wand check that reads TileNode.locations; clear the map with a harness (or reload another TC4 node type that clears it) and confirm the node is registered again within one tick.
<!-- claude-projects-attribution -->
_Requested by **Ethyn** · [project thread](https://claude.ai/code/project/chan_01DUNCDJLEksDHKpX5X5cThi?thread=cmsg_01DUNCDJLEksDHKpX5X5cThiWWzw9g2ZbURExfCGHZcnLC)_
Pareto follow-up to #29
## What
thaumicadditions#29 made the creative node register its location in `TileNode.locations` once. The original rewrote it every tick, which also healed the map after TC4 or another mod cleared or changed it. This PR keeps #29's saving but checks, each tick, that the entry still exists and matches (dimension, x, y, z); if not, `generateId()` runs again that same tick.
## Before / after, all dimensions
| dimension | original | #29 | this PR |
|---|---|---|---|
| result (map content) | rewritten every tick | written once, never repaired | same as original: repaired within the same tick |
| per-tick cost | string concat + ArrayList + 4 Integers + put | a boolean test | one HashMap get + 4 int compares, no allocation |
| memory | none | none | none |
| worst-case latency / stale window | 0 | until chunk reload | 0 |
## Tests
CreativeNodeRegistryTest: the 2 existing + cleared map repaired next tick, altered entry restored next tick, intact entry not rewritten (same list instance).
## Scenario for a real server
Place a creative node, run a vis relay/wand check that reads `TileNode.locations`; clear the map with a harness (or reload another TC4 node type that clears it) and confirm the node is registered again within one tick.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
#29 registered the location once. The old per-tick rewrite also repaired the shared
TileNode.locations map when another mod cleared or altered it. One lookup and four
int compares per tick restore that: generateId runs again as soon as the entry is
missing or different.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
layue13
merged commit 579c7064e2 into main2026-11-07 16:02:53 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Requested by Ethyn · project thread
Pareto follow-up to #29
What
thaumicadditions#29 made the creative node register its location in
TileNode.locationsonce. The original rewrote it every tick, which also healed the map after TC4 or another mod cleared or changed it. This PR keeps #29's saving but checks, each tick, that the entry still exists and matches (dimension, x, y, z); if not,generateId()runs again that same tick.Before / after, all dimensions
Tests
CreativeNodeRegistryTest: the 2 existing + cleared map repaired next tick, altered entry restored next tick, intact entry not rewritten (same list instance).
Scenario for a real server
Place a creative node, run a vis relay/wand check that reads
TileNode.locations; clear the map with a harness (or reload another TC4 node type that clears it) and confirm the node is registered again within one tick.🤖 Generated with Claude Code