Repository navigation
fix(worldgen): fix high-altitude stone layer scan and surface rock placement - #395
Merged
Merged
Conversation
Tanimodori
force-pushed
the
fix/issue-259-surface-rocks
branch
from
November 14, 2026 02:30
6c973b3 to
a1bee1d
Compare
lombinaxmasson
approved these changes
Nov 14, 2026
kuzuanpa
approved these changes
Nov 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动摘要
coreStoneLayerScan:封装 7 格滑动窗口(y - 3 .. y + 3)与基于区块最高填充段的maxScanY(...)上界计算(最高填充段顶部再向上延伸 1 格并钳位到maxBuildHeight - 1,避免恰好位于区块段边界如Y=63/Y=143的地表漏放石子)。SurfaceRockRules:封装每列lastRock/lastOre/canPlaceRocks状态机、1/128 概率抽取与nextBoolean() && lastOre != null目标粉碎材料回退规则。StoneLayerScanTest(5 条)与SurfaceRockRulesTest(7 条)锁定边界与状态转换。GTStoneLayerFeature高海拔与模组岩石连续性MAX_GEN_Y = 144上限,改为按ChunkAccess#getHighestFilledSectionIndex()动态计算每区块扫描上界,并在整个垂直范围内持续滑动StoneLayerScan。lastReplaced(对应原版 GT6tLastReplaced),将Blocks.INFESTED_STONE与BlockTags.BASE_STONE_OVERWORLD纳入可替换岩石识别与连续追踪(GTStoneBlock仍在前置分支独立处理)。GTStoneBlock(STONE/COBBLE/COBBLE_MOSSY)仅维持canPlaceRocks,不再改写lastRock。GTRocksFeature.replaceable(...)补充BlockTags.LEAVES、Blocks.FIRE、Blocks.SOUL_FIRE;GTRocksFeature.castRay(...)与GTRockPlacement.placeRock(...)共用该可替换谓词及非流体检查,并拒绝以树叶作为支撑方块。docs/decisions/parity/worldgen.md登记MeteoricIron散落分支随材料停注移除(保留 1/2 空与 1/2 燧石)。明确不包含与后续仍需修复项
noDeep在NO_DEEP_Y以下保留宿主岩石的现有行为);验证结果
python tools/comments/check_comment_refs.py --diff origin/master:0 failure(s), 0 symbol warning(s), 0 data-table finding(s).\gradlew.bat spotlessCheck :core:test compileBothPlatforms:BUILD SUCCESSFUL(38 suites,188 tests,0 skipped,0 failures,0 errors;含StoneLayerScanTest5/5、SurfaceRockRulesTest7/7、GTStoneLayersGenTest1/1;Forge 1.20.1 与 NeoForge 1.21.1 编译均通过)git diff --check:无空白错误1.21.1-neoforge):已在Y=160高海拔山地实机确认含油页岩 GT 岩层与对应指示石子正常生成(1.20.1-forge未实机运行;模组石/水体/雪叶边界仅以单元测试与静态规则核对为主)关联