Repository navigation
fix: a held realm keeps its nodes - #25
Conversation
A realm whose last member died is held by SimpleFactions for a revive or its will heir, but Dowsing released its nodes four times a second because the guild had no members, so anyone could claim them. Held guilds now keep their nodes; a closed realm's guild is gone, which still frees them. SimpleFactions is bumped to 4.7.0 for Guild.isHeld; an older one falls back to the member rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SimpleFactions pauses a held realm's other upkeep, but node upkeep comes from Dowsing's total, so a kept node would have charged its treasury every day of the hold and produced for nobody. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review: the hourly efficiency growth caps a node at its guild's member count, which is zero while the realm is held, so a kept node fell to 0% an hour after the death and the heir got it back 4x slower. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@coderabbitai review |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Held-state checks and node behaviour pom.xml, src/main/java/net/tfminecraft/dowsing/objects/Node.java, src/test/java/net/tfminecraft/dowsing/objects/NodeBehaviorTest.java |
The SimpleFactions version changes from 4.0.0 to 4.7.0. Node.held checks whether a guild is held and returns false if the call raises LinkageError. canHold accepts held guilds before its existing checks, and growEfficiency skips held guilds. Tests cover held-state behaviour and fallback behaviour when Guild.isHeld() is unavailable. |
Upkeep and cycle processing src/main/java/net/tfminecraft/dowsing/managers/NodeManager.java, src/test/java/net/tfminecraft/dowsing/managers/NodeManagerCyclesTest.java |
getTotalUpkeep returns zero for held guilds. The processing loop skips held-guild nodes before chunk loading and production. A test checks that held nodes are not ticked, do not construct an ItemDropper, and do not force-load their chunk. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers: ryanbarlow97
Merge Risk: 
Minimal · up to 49de9
-
No actionable issue remains from the reviewed held-node changes; the PR is mergeable after normal checks.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
✅ Action performed
|
Summary
When a realm's last member dies, SimpleFactions holds the realm for a revive or for the will heir (4.15.0). Dowsing checks every node four times a second and released any node whose guild had fewer than
min-members-for-nodemembers. A held realm has none, so its nodes became claimable the moment its last member died, and any guild leader could take them.On Main this happened to Eastern Territories' node at Sumdalgrad when Lyza died on 10-26. It now reads
guild: noneand shows the claimable particles.Changes
Node.canHoldkeeps a node whose guild SimpleFactions holds (Guild.isHeld()).getTotalUpkeepreports 0. SimpleFactions already pauses a held realm's other upkeep, but node upkeep comes from Dowsing's total.Guild.isHeld(). On an older SimpleFactions the call falls back to the member rule.Tests
DatabaseTestandNodePaymentsTestfail the same way onmain(directory fsync), so CI is the reference.🤖 Generated with Claude Code