feat: 完善类主世界重置与天体装置联动 - #4512
Conversation
WhereisFff
commented
Aug 22, 2026
- 允许玩家通过入口请求并激活炸毁后类主世界的新世代,完成旧维度卸载、数据清理与玩家转移 fixed [Bug] 类主世界维度被重置后无法再次进入 #4507
- 在服务器启动和维度重建时重建世界边界监听,避免新世代遗漏主世界边界设置
- 让传送门和直接传送路径在重置待命期间正确排队,并在世界可用后传送至安全落点
- 根据红石信号平滑降低天体锻造砧转速,修正玩家头颅天体缩放时的渲染高度与包围盒 fixed [Bug] 带有玩家头颅星球的锻星砧放大化后头颅位置不合理 #4511
- 修复新放置红石导线未立即索引相邻侦测器的问题 fixed [Bug] 侦测器观测其脸上导线能量变化存在随机性 #4482
- 将大型激光器强制标记为实心方块以防水 fixed [Bug] 大激光被水冲掉 #4490
- 允许玩家通过入口请求并激活炸毁后类主世界的新世代,完成旧维度卸载、数据清理与玩家转移 - 在服务器启动和维度重建时重建世界边界监听,避免新世代遗漏主世界边界设置 - 让传送门和直接传送路径在重置待命期间正确排队,并在世界可用后传送至安全落点 - 根据红石信号平滑降低天体锻造砧转速,修正玩家头颅天体缩放时的渲染高度与包围盒 - 修复新放置红石导线未立即索引相邻侦测器的问题,并将大型激光器强制标记为实心方块以防水
Reason: script execution via -e/-c flag Reply |
Reason: Security scan — [MEDIUM] Lookalike TLD detected: Domain uses '.dev' TLD which can be confused with file extensions; [MEDIUM] Lookalike TLD detected: Domain uses '.dev' TLD which can be confused with file extensions Reply |
Reason: script execution via -e/-c flag Reply |
|
The linkie API request timed out and got blocked. I'll skip the online verification and rely on local knowledge of 1.21.1 vanilla. Let me check whether there is a way to verify Actually — the practical way:
public void addListener(BorderChangeListener borderChangeListener) {
if (this.listeners.stream().anyMatch((p) -> p.getClass() == borderChangeListener.getClass())) {
throw new IllegalStateException("Listener of this type is already added");
}
this.listeners.add(borderChangeListener);
}Yes! I'm quite sure this is present in 1.20.1+ (it was added in 1.16-ish? Actually I remember it being there for a long time — the check that prevents duplicate listener types). This is why the "absolute border" bug exists when mixing datapack-dimension mods... So the virtual code does have this check. This means: if two But wait — CRITICAL: at
BUT — there's a subtle issue: at what point in However — there's another subtle problem. And Also private final List<BorderChangeListener> listeners = new CopyOnWriteArrayList<>();I believe this specifically because the vanilla code in Given the uncertain network access, I'll proceed with the analysis; my review can note that the mixin invoker targets can't be fully verified here, but they match known vanilla 1.21.1 structure. Actually — let me try one more quick thing locally: check if the AnvilCraft project has any vendored minecraft source or a way to check. Let me also look at the actual getListeners used in another mixin in this repo (maybe there's precedent). Also verify how vanilla 1.21.1 MinecraftServer.createLevels registers border listeners — I recall in 1.21.1: private void createLevels(ChunkProgressListener progressListener) {
...
this.overworld = new ServerLevel(...);
if (this.worldData.worldGenOptions().bonusChest()) { ... }
...
for (Map.Entry<ResourceKey<LevelStem>, LevelStem> entry : levelStemRegistry.entrySet()) {
ResourceKey<LevelStem> resourcekey = entry.getKey();
if (resourcekey == LevelStem.OVERWORLD) continue;
ResourceKey<Level> resourcekey1 = ResourceKey.create(Registries.DIMENSION, resourcekey.location());
DerivedLevelData derivedleveldata = new DerivedLevelData(this.worldData, this.worldData.overworldData());
ServerLevel serverlevel = new ServerLevel(this, Util.backgroundExecutor(), this.storageSource, derivedleveldata, resourcekey1, entry.getValue(), progressListener, this.worldData.isDebugWorld(), BiomeManager.obfuscateSeed(this.worldData.worldGenOptions().seed()), ImmutableList.of(), false, this.overworld.getRandomSequences());
this.forgeGetWorldMap().put(resourcekey1, serverlevel);
this.registerWorldBorderListeners(serverlevel);
this.forceTicks.put(resourcekey1, ...);
}
...
}
private void registerWorldBorderListeners(ServerLevel level) {
if (this.overworld != null) {
this.overworld.getWorldBorder().addListener(new BorderChangeListener.DelegateBorderChangeListener(level.getWorldBorder()));
}
}I'm confident Then the PR's createLevels-RETURN inject + unlink-then-add is redundant at startup (vanilla already does it), but it becomes necessary for the "activation" path (where the level is replaced outside createLevels). At activation, the new level's border has no listener → vanilla would never add one → so BUT WAIT — there's a real problem: the
Hmm, wait. How is the overworld-like level initially created? Through vanilla createLevels loop (since ModifyArgs intercepts the ServerLevel constructor for it, the dimension IS in the level stem registry at startup). So:
This all works. Now, one more edge — in OK. Now let me also verify
Now — the truly concerning issue remains the But hold on — one real bug candidate: Now, the teleportTo rotation: Now the biggest remaining question: Hmm wait, actually, let me re-read: "让传送门和直接传送路径在重置待命期间正确排队,并在世界可用后传送至安全落点". Perhaps the intended behavior:
The word "排队" fits the direct path well (QUEUED_DIRECT_ENTRIES). For the portal path, "正确排队" might loosely mean the request is queued. This is a description-vs-implementation nuance — worth one note ( Another important check: Now — What about a player standing INSIDE the overworld-like dimension when the collapse begins? They get hurt + forceReturn. Fine. What about if (hasPendingForcedRespawn || phase != ACTIVE && isInOverworldLike) {
addPendingForcedRespawn; forceReturn;
} else if (isInOverworldLike) { markPlayerInOverworldLike; }If a player logs in during RESET_PENDING while in the OVERWORLD dimension (not overworld-like), the first condition: If a player logs in IN the overworld-like dimension during RESET_PENDING: OK. Now, collapsing-tick restructure: the old early-return Now the collapseDamageIssued + markResetPending flow: in COLLAPSING, when But wait — there's a GAP: One more potential issue: **A significant concern: **And: Actually — wait. One serious question: does closing the old level and deleting the dimension folder break anything for the OVERWORLD being the same folder? No — the overworld-like dimension folder is a SEPARATE subfolder (dim/...). Deleting it is fine. The manifest is written to worldRoot/data/ — separate. ✓ Now the rotation float change:
Now, is Where is rotation used in CelestialForgingAnvilBlockEntity? Check for int usage elsewhere e.g., Also check: is Let me also double-check One concern: Let me quickly check usage of getRotation/getPreRotation in the codebase (any int consumer like Also — RedstoneWireNetworkManager.rememberAdjacentObservers:
Let me check Also ModBlocks large_laser forceSolidOn: public Properties forceSolidOn() {
this.forceSolidOn = true;
return this;
}and the block material setting makes Hmm, one consideration: making LargeLaser solid may change redstone wire behavior on top and mob spawning (overridden) — minor. Fine. Now — the mixin JSON additions: MinecraftServerMixin: new I believe the actual rule: Mixin will apply either, but for non-void methods using CallbackInfo, the inject works as long as From Mixin source: Actually — one more consideration on the RETURN inject: Hmm — BUT, there's a potential stack/config issue: the existing HEAD inject calls Edge: OK — I also want to check Now let me verify the remaining API existence locally: grep base for Let me run those gre |
|
💾 Self-improvement review: Patched references/celestial-world-reset-review.md in skill 'minecraft-mod-pr-review' (1 replacement). |
Reason: script execution via -e/-c flag Reply |
|
↻ Thinking-only response — prefilling to continue (1/2) |
3 similar comments
|
↻ Thinking-only response — prefilling to continue (1/2) |
|
↻ Thinking-only response — prefilling to continue (1/2) |
|
↻ Thinking-only response — prefilling to continue (1/2) |
|
⏱️ Rate limited. Waiting 600.0s (attempt 2/3)... |
|
⏳ Retrying in 2.1s (attempt 1/3)... |
|
↻ Thinking-only response — prefilling to continue (1/2) |
|
⏳ Retrying in 2.9s (attempt 1/3)... |
|
⏳ Retrying in 5.0s (attempt 2/3)... |
|
⏳ Retrying in 2.1s (attempt 1/3)... |
|
⏳ Retrying in 4.5s (attempt 2/3)... |
|
❌ API failed after 3 retries — Connection error. |
|
API call failed after 3 retries: Connection error. |
|
⏳ Retrying in 2.0s (attempt 1/3)... |
|
⏳ Retrying in 4.7s (attempt 2/3)... |
|
❌ API failed after 3 retries — HTTP 503: Service temporarily unavailable |
|
⏳ Retrying in 2.1s (attempt 1/3)... |
|
⏳ Retrying in 5.4s (attempt 2/3)... |
|
❌ API failed after 3 retries — HTTP 503: Service temporarily unavailable |
|
API call failed after 3 retries: HTTP 503: Service temporarily unavailable |
1 similar comment
|
API call failed after 3 retries: HTTP 503: Service temporarily unavailable |