CTNH-Lib is the shared support module for CTNH code. It contains common proxies, registrate builder wrappers, dynamic datapack helpers, language annotations, and the in-repo lang provider support code.
- Mod entry:
src/main/java/tech/vixhentx/mcmod/ctnhlib/CTNHLib.java. Library mod initialization. - Registrate helpers:
src/main/java/tech/vixhentx/mcmod/ctnhlib/registrate/.CNRegistrate, networking, builder wrappers. - Builder APIs:
src/main/java/tech/vixhentx/mcmod/ctnhlib/registrate/builders/. Shared block/item/machine/material/recipe builders. - Dynamic data:
src/main/java/tech/vixhentx/mcmod/ctnhlib/data/CTNHDynamicDataPack.java. Runtime datapack support. - Ponder framework:
src/main/java/tech/vixhentx/mcmod/ctnhlib/client/ponder/CTNHPonderSceneBuilder.javaandCTNHPonderLang.java. Provides shared baseplate/camera helpers,title/showTextbilingual text registration via module-suppliedLangRegistrar, and shared Ponder scene lang extraction for datagen. - Lang annotations:
src/main/java/com/ctnhlang/.@CN,@EN, category/domain annotations. - Datagen bugfix mixin:
src/main/java/tech/vixhentx/mcmod/ctnhlib/mixin/MiscForgeHelperMixin.java. Fixes Forge datagen shutdown behavior.
- Registrate API:
registrate/CNRegistrate.javaextends GTCEuGTRegistrateand provides CTNH item/block/entity/recipe helpers. - Builders:
registrate/builders/CTNHItemBuilder.java,CTNHBlockBuilder.java,CTNHEntityBuilder.java,CTNHMachineBuilder.java,CTNHMultiblockMachineBuilder.java,CTNHRecipeType.java,CTNHMaterial.java,CTNHTagPrefix.java. - Runtime helper item:
common/CommonProxy.javaregistersMultiblockHelperthrough GTCEu's registrate. - Networking/datapack:
registrate/CTNHLibNetworking.java,data/CTNHDynamicDataPack.java. - Lang/datagen support:
registrate/lang/RegistrateCNLangProvider.javaandcom.ctnhlang.*annotations. - Ponder support:
client/ponder/CTNHPonderSceneBuilder.javais reusable scene infrastructure andCTNHPonderLang.javais reusable datagen lang extraction; modules pass their mod id and registrate lang callback from adapter builders and pass their ownPonderPlugintoCTNHPonderLang.init(...). - Do not add normal gameplay items/blocks here; add shared registration helpers only.
- Main library namespace is
tech.vixhentx.mcmod.ctnhlib; lang annotation namespace iscom.ctnhlang. - Resource count is intentionally tiny compared with gameplay modules.
- Changes here can affect all CTNH modules through shared builders, annotations, and shared Ponder support.
./gradlew :modules:CTNH-Lib:build
./gradlew :modules:CTNH-Lib:runData
./gradlew :modules:CTNH-Lib:spotlessCheck- Do not add gameplay-specific logic to CTNH-Lib unless it is genuinely shared.
- Do not move module-specific Ponder scene/tag/plugin code or Energy's AE2 cable helper into CTNH-Lib.
- Do not rename lang annotations without checking the custom
com.ctnhlang.langproviderplugin usage.