Skip to content

NeoForge 1.21.1 Port#277

Open
theShroo wants to merge 7 commits intoigentuman:1.21-testfrom
theShroo:port/neoforge-1.21.1
Open

NeoForge 1.21.1 Port#277
theShroo wants to merge 7 commits intoigentuman:1.21-testfrom
theShroo:port/neoforge-1.21.1

Conversation

@theShroo
Copy link

@theShroo theShroo commented Mar 4, 2026

Summary

Full port of NuclearCraft Neoteric from Forge 1.20 to NeoForge 21.1.219 / Minecraft 1.21.1 / Java 21.

Note: This PR targets 1.20 because there is no 1.21 branch yet. Please consider creating a 1.21 branch and retargeting this PR before merging.

Migration completed:

  • Build system — Gradle 8.10, NeoGradle, NeoForge 21.1.219
  • Package renamesnet.minecraftforgenet.neoforged.neoforge
  • Registration systemDeferredRegister / DeferredHolder with typed factory methods
  • Capability systemRegisterCapabilitiesEvent + IItemHandler/IFluidHandler/IEnergyStorage
  • NetworkingCustomPacketPayload records via RegisterPayloadHandlersEvent
  • ItemStack dataDataComponents.CUSTOM_DATA via NCItemStacks / NCFluidStacks platform layer
  • Blocks/Items/FluidsLiquidBlock(FlowingFluid), burn time semantics, ArmorMaterial registry
  • RecipesRecipeHolder unwrapping, MapCodec/StreamCodec, RecipeInput
  • Client-sideRegisterColorHandlersEvent, RegisterClientExtensionsEvent, normalized UV coords
  • Compat modules — JEI (NeoForgeTypes), Mekanism (unified Chemical), AE2 (19.2.17), EMI, GregTech
  • Data generation — Tag renames (c: namespace), RecipeOutput, holder-based loot/enchantment APIs
  • Mixins — All active (KubeJS mixin excluded, no 1.21.1 port)
  • World gen — Ore generation, biome modifiers, wasteland biome
  • Entities — Wasteland boss, feral ghoul, projectiles, renderers
  • Platform abstractionigentuman.api.platform package with 15+ wrapper classes

Compat module status:

Module Status
Mekanism Migrated (Gas/Slurry → unified Chemical)
AE2 Re-enabled (19.2.17) with mod-loaded guards
JEI Migrated (ForgeTypes → NeoForgeTypes)
EMI Migrated
ComputerCraft Migrated
GregTech Migrated
The One Probe Migrated
Patchouli Migrated
OC2, TIS-3D, KubeJS, Refined Storage Excluded (no 1.21.1 ports)

Testing done:

  • Server + client launch clean (no NC errors)
  • All 25+ processors tested — energy delivery, recipe processing working
  • Battery blocks render correctly with side configuration
  • Bucket fluid colors render correctly
  • AE2 compat loads without errors
  • EMI recipe categories display correctly

Remaining work:

  • Extended playtesting in modpack environment (FTB Evolution)
  • Multiblock structure validation testing
  • AE2 pattern encoding integration testing

Test plan

  • Install into FTB Evolution (1.21.1 NeoForge) for integration testing
  • Test multiblock structures (fission, fusion, turbine)
  • Test AE2 pattern encoding with NC recipes
  • Test Mekanism chemical conversion recipes
  • Verify world generation (ores, structures)

🤖 Generated with Claude Code

Russell Harland and others added 7 commits March 3, 2026 15:27
Migrated NuclearCraft Neoteric from Forge 1.20 to NeoForge 21.1.219 (MC 1.21.1).
562 files changed across all mod systems: registration, capabilities, networking,
blocks, items, fluids, recipes, client rendering, data generation, world gen,
entities, and compat modules.

Key architectural changes:
- Platform translation layer at igentuman/api/platform/ (25+ wrappers)
- DeferredRegister/DeferredHolder replaces RegistryObject throughout
- DataComponents replaces NBT for ItemStack/FluidStack metadata
- Capability system rewritten (RegisterCapabilitiesEvent)
- Attachments replace capability providers (NCAttachments)
- CustomPacketPayload records replace SimpleChannel networking
- NcIngredient no longer extends Ingredient (final in 1.21.1)
- Recipe system uses MapCodec/StreamCodec via NCRecipeSerializerFactory
- Mekanism compat: Gas/Slurry unified to Chemical API

Compat modules excluded (no 1.21.1 ports): OC2, TIS-3D, KubeJS,
Refined Storage, AE2. BFR integration stubbed out.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add TODO markers to all disabled compat call sites (TiC, BFR, KubeJS,
  AE2, RS) indicating we're waiting on those mods to port to NeoForge 1.21.1
- Annotate build.gradle exclusions with mod names and TODO header
- Verify Mekanism 10.7.18 API against JAR: split MekRadiationManager mixin
  into MekRadiationManager + MekRadiationUtil (getRadiationResistance moved
  to RadiationUtil in 10.7.x); register both in nuclearcraft.mixins.json
- Remove stale TODO from MekInteractions (Capabilities.CONFIGURABLE confirmed)
- Fix client crash: ScreenEvent.KeyPressed/KeyReleased are abstract in 1.21.1,
  use .Pre subclasses
- Fix client crash: ColorHandler.register() was adding MOD bus events to game
  bus (already registered via @EventBusSubscriber)
- Fix client crash: TickHandler.onTick @SubscribeEvent on static method
  rejected by NeoForge instance-based bus registration
- Fix client crash: rendertype_blackhole.vsh remove IViewRotMat (removed in
  1.20.5) and update fog_distance to 2-arg signature (Position, FogShape)
- Fix client crash on join: WorldEvents.onLevelTick add isClientSide() guard
  to prevent ClassCastException (ClientLevel -> ServerLevel)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…t check

- Fix barrier items in generated recipes: use NcIngredient.toJson() instead
  of asIngredient() which resolves tags at datagen time (empty → barrier)
- Fix solar panel/dimensional blend recipes using dustIngredient().asIngredient()
- Fix blockItem() loop bug checking wrong variable in AbstractRecipeProvider
- Fix forgeFluid() namespace (forge → neoforge) and forgeIngredient() (c: tags)
- Comment out chemical reactor recipes for materials without fluid forms
  (coal, graphite, chromium, osmium, silicon, niobium, titanium, etc.)
- Fix xenorium fusion recipe typo (xenorium298 → xenorium/298)
- Skip xenorium/quantite _ox/_ni/_za variants in chemical reactor
- Fix Item.toString() returning namespaced IDs in 1.21.1 breaking HashMap
  lookups in TurbineCoilBlock, TurbineCoilBE, TurbineBladeBE, CommonConfig
- Fix negative burn time crash: burnTime default -1 → 0 in MultitoolItem,
  NCBaseItem, RadShieldingItem (NeoForge 1.21.1 throws on negative)
- Fix ItemStackIngredient.copy() crash: RegistryAccess.EMPTY → built-in
  registries (stream codecs need item registry for serialization)
- Add 7 missing sound subtitle translations (boss, blackhole, laser)
- Add black_hole blockstate JSON with powered variants
- Add 19 missing EMI c: namespace tag translations
- Fix RuntimeFuelModelGenerator missing parent directory
- Add EMI particle_source_info category translation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…anslations

- Fix battery block UV coordinates (0-16 → 0-1) for NeoForge 1.21.1 normalized sprites
- Migrate 523 bucket model JSONs from forge: to neoforge: (fluid_container loader + parent)
- Migrate fluid color system from deprecated FluidType.initializeClient() to RegisterClientExtensionsEvent
- Implement direct FluidEntry item-identity bucket color lookup (bypasses broken IClientFluidTypeExtensions resolution)
- Re-enable AE2 compat module (AE2 19.2.17 for NeoForge 1.21.1) with mod-loaded guards
- Fix empty Fuel Reprocessor EMI category translation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adapted for NeoForge 1.21.1:
- Kept useWithoutItem() signatures (NeoForge API)
- Added onPlace/onRemove multiblock tracking for accelerator ports
- Added isAcceleratorTooHot() method
- Dropped getOCDevice() (OC2 not ported, LazyOptional removed in NeoForge)
- Removed redundant ParticleSources.init() from onConstruction

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…f List for validators

The TOML config system was stuck in an infinite correction loop because:
1. Enum config values used define() instead of defineEnum(), causing type
   mismatch on deserialization (String vs enum)
2. List validators used instanceof ArrayList, but TOML reader returns
   generic List implementations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@igentuman igentuman changed the base branch from 1.20 to 1.21-test March 5, 2026 13:10
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.

1 participant