Skip to content

feat: 无尽喷漆罐 GTO 集成(配方、连锁与提示) - #1

Closed
alcox233 wants to merge 24 commits into
GregTech-Odyssey:mainfrom
alcox233:feat/infinite-spray-can-integration
Closed

feat: 无尽喷漆罐 GTO 集成(配方、连锁与提示)#1
alcox233 wants to merge 24 commits into
GregTech-Odyssey:mainfrom
alcox233:feat/infinite-spray-can-integration

Conversation

@alcox233

Copy link
Copy Markdown
Contributor

摘要

对接 GTM 无尽喷漆罐(依赖 GregTech-Modern#47):组装配方、FTB Ultimine 连锁喷漆、批量上色 mixin,以及物品 tooltip。

改动

  • 组装机配方 infinite_spray_can
    • 空喷漆罐 + 16K ME 存储组件 + 致密能源元件 + HV 4x 电池箱 + HV 马达 + HV 电动泵 + 钢化玻璃 + 液态彩虹桥 144 mB
    • 480 EU/t(HV)15 秒
  • FTB Ultimine:无尽喷漆罐视为有效工具;连锁长度使用 sprayCanChainLength
  • InfiniteSprayCanBehaviourMixin:客户端形状预取 + paintBlocks 批量上色,减轻连锁卡顿
  • ColorSprayBehaviourMixin:适配 GTM tryPaintSpecialBlock 静态签名
  • Tooltip妙妙工具: 无尽喷漆罐 + 操作说明(字面量,避免翻译键未生成时炸显示)

测试计划

  • EMI 能搜到无尽喷漆罐配方,耗能 480 EU/t、15s
  • 右键/滚轮/调色盘行为正常
  • 按住 Ultimine 键连锁喷漆,大面积不明显卡顿
  • 物品 tooltip 显示「妙妙工具」与操作说明

依赖

请先合并或同时 review GTM PR #47。

xinxinsuried and others added 24 commits July 17, 2026 23:05
GTOCore-Main public tree (gtocore + prebuilt libs, dual signed artifacts CI).
History squashed to a single commit.
Root cause of SharedConstantsMixin failure: gtolib.refmap.json was excluded
from the jar and gtocore.refmap was empty, so production had No refMap loaded.
Ship both refmaps under src/main/resources, stop excluding them, and CI-verify
mapping count. Keep Java 25 for Gradle toolchain with bytecode release 21.
Keep signing via org secrets GTO_CERT/GTO_KEY only (no secrets in repo).
CI uses Java 21 like prior successful signed builds; fix multiline python
verify that could fail the packaging check. Refmaps remain in the jar.
When GTOLib is rebuilt with sources, generate/patch refmap and write to
resources + protected jar for no-perm consumers. Always inject a single
copy of gtolib/gtocore refmap into the final gtocore jar (with
ResourceLocationMixn Shadow mappings). No secrets in repo.
CI without GTOLib sources produces a smaller Mixin AP refmap; always pick
the candidate with more mappings so packaged jar keeps ResourceLocationMixn.
Rewrite ResourceLocationMixn to shadow public accessors (production field
@shadow failed despite f_ names in refmap). Rebuild protected prebuild and
ship refmap with ResourceLocationMixn method mappings. Auto-publish refmap
on gtolib package for no-perm consumers.
CI copyPrebuiltGtolib failed because jar was rebuilt (ResourceLocationMixn
accessor fix) while .PROTECTED still recorded the previous jarSha256.
- Drop @shadow (short m_/f_ refmap values failed in production)
- Cast to ResourceLocation for public getNamespace/getPath
- Patch refmap with full owner;name+desc for Overwrite targets only
- Rebuild gtolib-protected prebuild + PROTECTED stamp

Requires Java 21+ at runtime (GTCEu and friends); Java 17 cannot load.
…olib) --build

Root cause: CI submodules:false has no Mixin AP, so ART never renamed
mixin Shadow/Overwrite members. Official maven gtolib-forge-1.20.1-26.7.5
ships already-reobfed f_135804_/m_245413_ class (no refmap entry needed).

- Restore original ResourceLocationMixn (field shadows + overwrites)
- Ship gtolib/gtocore .mappings.tsrg for CI reobfJar
- ensureMixinRefmapMappings after jar; verify SRG names on build
- CI packaging check: f_135804_ + m_245413_ present, no assertValidNamespace
… --build

Old separate GTOLib: reobfJar then encrypt, then GTOCore jarJar finished
artifact with SRG mixin members. Monorepo had sealed Mojmap classes and
relied on fragile outer reobf.

Add reobfGtolibRaw (ART) after packageGtolibJar, before ProGuard/Seal, so
protected hollow/class bins already contain f_135804_/m_245413_ like maven
gtolib-forge-1.20.1-26.7.5. Refresh libs prebuild + PROTECTED stamp.
After ResourceLocation reobf fix, game died with
ClassNotFoundException: com.gto.datasynclib.datastream.DataComponentMap.
Old gtolib pulled datasynclib transitively; sealed dual-mod embed does not.
jarJar like gtceu so the pack is self-contained.
reobf-before-seal left CleanroomFilterType.getSerializedName unmapped
because ART lacked inheritance context; gtocore had m_7912_ only →
NoSuchMethodError at GTOBlocks init. Pass compiled gtocore + GTCEu jars
as ART --lib so StringRepresentable calls reobf correctly.
writeDualModsToml previously emitted only minecraft/forge/gtceu deps,
dropping deeperdarker ordering=AFTER. GTOTagPrefix then called
DDBlocks.SCULK_STONE.get() before DD registered → NPE and cascade failures.
Now dual toml is based on processResources expanded template + gtolib mod.
- gtolib pipeline: keep unprotected jar named for dev (.dev.bin/userdev),
  reobf only raw for the prod chain; compileKotlin rerun guard after seal
  strip; .PROTECTED sidecar sync helper
- AGENTS.md: repo conventions (tests decoupled from builds, cloud sign
  workflow, branch + prebuilt jar rules)
- README/README_EN: dual-repo collaboration section
- version 0.5.7-beta

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… download

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… edits

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Always build protected gtolib unless -PgtolibUnprotected/-PgtolibDebug
(or explicit env/file opt-in). Merge prebuild libs sync into
buildGtolibProtected and remove the obsolete update task aliases.
Update GTOLib submodule pointer for matching docs.
- 组装机配方:空罐 + 16K ME 组件 + 致密能源元件 + HV 4x 电池箱 + HV 马达/泵 + 钢化玻璃 + 液态彩虹桥(480 EU/t,15s)
- FTB Ultimine:允许无尽喷漆罐作为有效工具,连锁长度走 sprayCanChainLength
- InfiniteSprayCanBehaviourMixin:客户端形状预取 + 批量 paintBlocks 降卡
- ColorSprayBehaviourMixin:适配 GTM static tryPaintSpecialBlock
- 物品 tooltip:妙妙工具 + 操作说明
@xinxinsuried

Copy link
Copy Markdown
Contributor

test --build

@github-actions

github-actions Bot commented Jul 18, 2026

Copy link
Copy Markdown

🔨 Build and Sign

状态: ❌ 构建失败

🔗 打开本次构建

触发 PR comment build marker by org member
代码 alcox233/GTOCore-Main@fe0600f9d3cf
Run 29653648991

请打开构建链接查看失败日志。

@xinxinsuried
xinxinsuried changed the base branch from legacy to main July 18, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants