NeoForge 1.21.1 port#86
Conversation
Dark-Arcana
left a comment
There was a problem hiding this comment.
Items to address before merge:
-
RecipeGenerator.buildRecipesis empty. The method body was deleted. Recipes still load at runtime because the previously-generated JSONs were renamed (fromrecipes/torecipe/) and updated ("item"to"id") directly undersrc/generated/resources/. However,./gradlew runDatano longer regenerates them. Any future change to recipe shape requires editing approximately 385 JSON files manually. Restore the recipe generation code. The 1.21 API isbuildRecipes(RecipeOutput), used withShapedRecipeBuilder.shaped(RecipeCategory.MISC, ...).save(output, ResourceLocation.fromNamespaceAndPath(...)). -
Config.loadConfigis dead code. NeoForge 1.21'sModContainer.registerConfig(ModConfig.Type, IConfigSpec)handles config file creation, loading, and reload events automatically. The previous manual loading code is no longer required, and the empty method body confirms this. Delete the emptyloadConfigmethod and remove theConfig.loadConfig(...)call from theChemLibconstructor. -
Attribute-modifier tooltips removed from
FluidEffectsTooltipUtility.addTooltipEffects. The old code iterated overMobEffect.getAttributeModifiers()and added lines such as "+5 Max Health" to chemical-fluid bucket tooltips. The new code removes this section. The 1.21 replacement API isMobEffectInstance.forEachModifier(EquipmentSlotGroup, BiConsumer). Port the modifier-tooltip logic to the new API. The current code is a behavior regression. -
Mod-namespace tooltip line removed from chemical, element, and compound item tooltips and from bucket tooltips. The old
appendHoverTextoverloads inChemicalItem,CompoundItem,ElementItem, andForgeEventHandler.gatherTooltipComponentsadded a styled "Chemlib" line at the bottom of tooltips usingMOD_ID_TEXT_STYLE. All four locations were removed. NeoForge 1.21 does not automatically add a mod-source line to item tooltips. JEI and REI add it themselves, but vanilla and NeoForge do not. Restore the line in all four locations. -
ForgeEventHandlerclass name is misleading after the port. The class now subscribes toEventBusSubscriber.Bus.GAMEand no longer uses the Forge event bus. Rename the class toGameEventHandler. -
Release notes for downstream consumers (Alchemistry):
Element.getGroupName()becomesgetGroupKey(). The return value is a translation key, not a literal display string. Consumers must pass the value throughComponent.translatable(...).BlockTagGeneratorandItemTagGeneratormigrate tags from theforge:namespace toc:. This follows NeoForge 1.21's adoption of the cross-loader Common namespace (also used by Fabric). Any datapack that references#forge:dusts/iron,#forge:storage_blocks/iron, and similar tags must update its references to#c:....ChemicalLiquidBlockconstructor signature changes fromSupplier<? extends FlowingFluid>toFlowingFluid.
- Restore RecipeGenerator.buildRecipes against 1.21 RecipeOutput API - Drop dead Config.loadConfig and its call site - Restore attribute-modifier tooltips on chemical fluid buckets - Restore "Chemlib" namespace tooltip line on item and bucket hovers - Rename ForgeEventHandler to GameEventHandler - Add MIGRATION.md for downstream consumers
Ports ChemLib from Forge 1.20.1 to NeoForge 1.21.1 (Java 21). No gameplay, recipe, or content changes — same elements, same compounds, same behavior.