Fix a bunch of things that broke in the 1.21 port - #2375
Open
digi2303 wants to merge 38 commits into
Open
Conversation
…ird and underminer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 aDamageSourceparameter. 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 thec:namespace on NeoForge 1.21. Positive spawn rules never matched, andno_default_monstersexclusions never applied, so monsters were spawning in mushroom biomes.Straddlers and stradpoles sank into lava.
canStandOnFluidtakes aFluidStatenow instead of aFluid.Global loot modifiers did nothing. The four json files were there, but
data/neoforge/loot_modifiers/global_loot_modifiers.jsonwas 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
dropAllDeathLootoverride went dead, anddie()calls the real one directly, so the boss dropped everything once normally and again through its own routine.Custom melee attacks never ran.
checkAndPerformAttacklost a parameter, so the grizzly bear, kangaroo, capuchin and crocodile dealt damage with no attack animation at all.Armour perks were gone.
getDefaultAttributeModifiersbecame 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.
getBurnTimetakes 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.
setChunkBiomeswas 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
Item.initializeClientdeprecation warnings alone. They still work on 21.1.x, and migrating them touches custom item rendering, which I could not test properly.@Overridewherever 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.