Skip to content

NeoForge 1.21.1 port#369

Closed
F0x06 wants to merge 5 commits into
SmashingMods:1.20.1from
F0x06:1.21.1
Closed

NeoForge 1.21.1 port#369
F0x06 wants to merge 5 commits into
SmashingMods:1.20.1from
F0x06:1.21.1

Conversation

@F0x06

@F0x06 F0x06 commented May 11, 2026

Copy link
Copy Markdown

Ports Alchemistry from Forge 1.20.1 to NeoForge 1.21.1 (Java 21). No gameplay, recipe, or content changes — same elements, same compounds, same behavior.

F0x06 added 4 commits May 9, 2026 15:15
Port rewrite of getRecipeByGroupAndId bypassed getRecipesByGroup,
losing the setId side-effect that saveAdditional needs to sync.

@Dark-Arcana Dark-Arcana left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Items to address before merge:

  1. SideModeScreen.render paints the title under the background. The current call order is:

    render(...) →
        renderBackground(...)            // dirt-blur + 9-patch
        drawCenteredString(title, ...)   // title text
        super.render(...)                // 1.21's Screen.render() calls this.renderBackground() AGAIN
    

    Screen.render in 1.21 calls this.renderBackground internally. The explicit renderBackground call and the title draw both happen before super.render, so the second background pass inside super.render paints over the title. Fix: remove the explicit renderBackground(...) call from render(...), call super.render(...) first, then call drawCenteredString to draw the title last.

  2. All datagen classes were deleted, not ported. The entire datagen package was removed: BlockLootTables, BlockStateGenerator, BlockTagGenerator, DataGenerators, LocalizationGenerator, LootTableGenerator, RecipeGenerator, RecipeUtils, the per-machine providers (Atomizer, Combiner, Compactor, Dissolver, Fission, Fusion, Liquifier), and the cross-mod sources ChemlibRecipes.java, MinecraftRecipes.java, ThermalRecipes.java. NeoForge 1.21 still uses datagen. RecipeProvider, LanguageProvider, BlockStateProvider, BlockTagsProvider, ItemTagsProvider, LootTableProvider, and the rest all exist. All deleted classes must be restored against the 1.21 datagen APIs. Manually editing the committed JSON files is not acceptable.

  3. 713 committed recipe JSONs reference forge: tags that no longer exist. ChemLib PR #86 migrates its tag namespace from forge: to c: (the NeoForge 1.21 Common namespace). Every "tag": "forge:dusts/iron" style reference under src/generated/resources/data/alchemistry/recipe/ will silently fail to match at runtime. Verified by git grep -E -l 'tag.*forge:' pr369 -- 'src/generated/resources/data/alchemistry/recipe/', which returns 713 files. After datagen is restored (item 2), regenerate the recipes against ChemLib 2.0.20's c: tags. This will fix all 713 files automatically.

  4. License changed from LGPLv2.1 to GPL-2.0-only. ChemLib and AlchemyLib reformatted their license declarations to LGPL-2.1-only (same license, updated SPDX-id syntax). This PR changes the license from LGPL to GPL, which is a different license with different terms. This change is not authorized. Revert the mod_license value in gradle.properties to LGPL-2.1-only to match the companion mods.

  5. Patchouli dependency removed. patchouli_version is gone from gradle.properties, and both compileOnly and runtimeOnly Patchouli dependencies are removed from build.gradle. The deleted LocalizationGenerator still referenced alchemistry.patchouli.book_name and alchemistry.patchouli.landing_text, so the in-game guidebook is gone. Research whether Patchouli has a working NeoForge 1.21.1 port, or whether an alternative guidebook library (for example Modonomicon) is available for NeoForge 1.21.1. If a working option exists, restore the guidebook integration using that library. If no working guidebook library is available for NeoForge 1.21.1, document the loss of the guidebook in the changelog as a temporary regression and add a TODO comment in the code where the integration used to live.

  6. Config.loadConfig is dead code. Same issue as ChemLib PR #86. NeoForge 1.21's ModContainer.registerConfig handles loading automatically. Delete the empty loadConfig method and remove the Config.loadConfig(...) call from the Alchemistry constructor.

  7. assemble(...) override removed from AtomizerRecipe, CombinerRecipe, CompactorRecipe, and FusionRecipe. The old override returned the recipe output. The new code only overrides getResultItem(HolderLookup.Provider). AlchemyLib's AbstractProcessingRecipe.assemble(RecipeInput, HolderLookup.Provider) default returns ItemStack.EMPTY. JEI and the block entities call getOutput() directly, so internal behavior is unaffected. However, any external consumer (other mods, KubeJS scripts) that calls recipe.assemble(...) now receives ItemStack.EMPTY instead of the output. Restore the assemble(...) overrides on all four recipe classes.

  8. Release notes for datapack authors. The recipe result schema changed: "item": "..." becomes "id": "...", and fluid "amount" is now an integer instead of a string. Any datapack that overrides Alchemistry recipes must update to the new schema.

  - Fix SideModeScreen render order so title isn't repainted over
  - Restore deleted datagen package against 1.21 RecipeOutput API
  - Regenerate recipes against ChemLib c: tag namespace
  - Revert mod_license to LGPL-2.1-only
  - Restore Patchouli guidebook on 1.21.1-93-NEOFORGE
  - Drop dead Config.loadConfig and its call site
  - Restore assemble() override on Atomizer/Combiner/Compactor/Fusion recipes
  - Document 1.21.1 datapack schema changes in changelog
@F0x06 F0x06 closed this Jun 11, 2026
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