Skip to content

Fix a bunch of things that broke in the 1.21 port - #2375

Open
digi2303 wants to merge 38 commits into
AlexModGuy:1.21from
digi2303:polish-1.21.1
Open

Fix a bunch of things that broke in the 1.21 port#2375
digi2303 wants to merge 38 commits into
AlexModGuy:1.21from
digi2303:polish-1.21.1

Conversation

@digi2303

@digi2303 digi2303 commented Aug 5, 2026

Copy link
Copy Markdown

Hi! I went through the 1.21 branch looking for things that broke during the port, and found more than I expected. This is 37 small commits, one per fix, so you can drop any individual one you disagree with.

Most of these share the same cause. The codebase rarely uses @Override, so when Mojang changed a method signature in 1.21, the old method stopped overriding anything. It still compiled fine, it just silently never ran again. The compiler had no way to warn about it.

The bigger ones

Mobs take fall damage again. 40 entities declare causeFallDamage(float, float), but 1.21 added a DamageSource parameter. Hummingbirds, crows, bald eagles, flying fish, sugar gliders, the laviathan and 34 others were all taking full fall damage.

Spawn biome tags are dead. Every forge:is_* tag in DefaultBiomes moved to the c: namespace on NeoForge 1.21. Positive spawn rules never matched, and no_default_monsters exclusions never applied, so monsters were spawning in mushroom biomes.

Straddlers and stradpoles sank into lava. canStandOnFluid takes a FluidState now instead of a Fluid.

Global loot modifiers did nothing. The four json files were there, but data/neoforge/loot_modifiers/global_loot_modifiers.json was missing, so none of them were registered. That covers bananas from jungle leaves, blossoms, ancient darts and pigshoes.

Citadel was not declared as a dependency. The block in neoforge.mods.toml was commented out, so the game crashed with a NoClassDefFoundError instead of saying Citadel was missing.

The void worm dropped its loot twice. Its empty dropAllDeathLoot override went dead, and die() calls the real one directly, so the boss dropped everything once normally and again through its own routine.

Custom melee attacks never ran. checkAndPerformAttack lost a parameter, so the grizzly bear, kangaroo, capuchin and crocodile dealt damage with no attack animation at all.

Armour perks were gone. getDefaultAttributeModifiers became the ItemAttributeModifiers component. Base armour still worked, but moose headgear lost its attack knockback, flying fish boots lost swim speed, the kimono lost its reach bonus, and crocodile armour lost swim speed and knockback resistance.

Seal rewards were broken. The seal_reward loot table used "name" for a nested loot table entry, which is "value" in 1.21, so the whole table failed to load.

Ambergris would not burn. getBurnTime takes a RecipeType now.

Fleet Footed leaked speed. If the effect expired while you were in the air, the +0.2 movement speed modifier was never removed and stayed on you permanently.

Mungus could not change biomes. setChunkBiomes was an empty method, so the server never applied the change, even though the client packet handler was doing its half correctly.

Smaller ones

Same dead override problem: the crash reading the Power Down effect for star brightness, flying fish boots jump detection, spawn setup for orcas, platypuses, seals and void worms, experience rewards, leashing on a few mobs, walk animations on the caiman and rain frog, fullbright rendering on the spectre, sunbird and underminer, end pirate flag particles, the hummingbird feeder blocking pathfinding, ender residue pick block, oversized block entity renders getting culled, straddleboard rider and eye height, and tossed items losing their owner on save.

I also trimmed the access transformer. 25 of the 27 lines used old SRG names that do not resolve on 1.21, or named classes that no longer exist, so only two were actually doing anything.

Last, I moved the Citadel dependency from a hardcoded local jar path to Curse Maven, so the branch builds on a clean checkout.

Notes

  • One commit, "Correctly restrict skelewags spawned at structures", is a forward port of your own 1.20 commit 09755da that never reached 1.21. Happy to drop it if you would rather merge 1.20 into 1.21 yourself.
  • I left the Item.initializeClient deprecation warnings alone. They still work on 21.1.x, and migrating them touches custom item rendering, which I could not test properly.
  • Worth considering later: adding @Override wherever it applies. It is mechanical, and it would have caught almost every bug in this PR at compile time.

Tested on 1.21.1 with NeoForge 21.1.248 and Citadel 2.7.1.

digi2303 added 30 commits August 5, 2026 17:34
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