Skip to content

Fix a bunch of things that silently stopped working in the 1.21 port - #1753

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

Fix a bunch of things that silently stopped working in the 1.21 port#1753
digi2303 wants to merge 28 commits into
AlexModGuy:1.21.1from
digi2303:polish-1.21.1

Conversation

@digi2303

@digi2303 digi2303 commented Aug 6, 2026

Copy link
Copy Markdown

Same story as the Alex's Mobs PR. Most of this is methods whose signature changed in 1.21. They still
compile, they just quietly stop overriding anything, so the behaviour disappears and nothing warns you.

The two you notice most in game:

Baby dinosaurs render at full adult size. Model.renderToBuffer folded its four float colour args
into one packed int, and nine models still declare the old eight arg version. Every one of those
bodies exists to shrink the model when young is set, so none of it runs.
HideableModelBoxWithChildren.render has the same problem against Citadel's BasicModelPart, so
boxes that ask to be hidden get drawn anyway. The bodies were already ported (they call
ColorUtil.packColor inside), it's only the signatures that got left behind.

Using an empty bucket on a sulfur bud, uranium rod or dinosaur chop crashes. canPlaceLiquid and
pickupBlock both gained a leading Player, those three blocks kept the old signatures, so
SimpleWaterloggedBlock's defaults run instead. The default pickupBlock reads
BlockStateProperties.WATERLOGGED, and those blocks don't have it. They use a custom LIQUID_LOGGED
int instead.

Same pattern, less dramatic:

  • isPathfindable lost two params, so mobs path through 10 blocks they shouldn't
  • getStandingEyeHeight is gone, eye height lives on EntityDimensions now (8 mobs)
  • lerpTo dropped its trailing boolean, so 11 entities lost their custom interpolation, submarine included
  • getExperienceReward is final now, getBaseExperienceReward is the override point (5 mobs)
  • getExpDrop takes a LevelAccessor, so radrock uranium ore stopped dropping xp
  • setupRotations gained a scale param, getUpdateTag gained a HolderLookup.Provider,
    getCloneItemStack takes a LevelReader, causeFallDamage gained a DamageSource
  • block entity render bounds moved onto the renderer, so magnets, hologram projectors and tesla bulbs
    were getting culled at a 1x1x1 box

Separate from all that, cave biome lookups are wrong on any world that isn't freshly generated.
MultiNoiseBiomeSourceMixin reads lastSampledWorldSeed, but only ChunkStatusTasks.generateBiomes
ever writes it. Reload a world and the spawn chunks come off disk, generation never runs, and the field
is still 0, so the Voronoi layout gets built against seed 0. Same world, seed 12345:

fresh after restart
before [3424, 13, 2400] [-5856, -51, -2560]
after [3424, 13, 2400] [3424, 13, 2400]

That affects /locate biome, getUncachedNoiseBiome and cave maps, which is the actual way you're
meant to find these biomes. CommonEvents.onServerAboutToStart already walks every LevelStem to
install the biome map and runs before any level loads, so I push the seed and dimension in there too.
Generation itself doesn't change, a fresh world gives the same coordinates either way.

A few that aren't signature changes:

  • the caramel cube's size dependent hitbox got renamed to a private method nothing calls, so all three
    sizes shared one hitbox
  • ModFishBucketItem reads CUSTOM_DATA but every fish writes BUCKET_ENTITY_DATA, so bucketed fish
    lose everything
  • the deep one saves SwappedItem and reads SwappedWeapon, the boundroid winch saves BodyUUID and
    reads HeadUUID, both lose it on every save
  • SodaBottleProcessor.getType returns the underground cabin type
  • the spelunkery table draws its own background and then super.render draws it again, so the dim
    overlay lands twice

Two mixins were orphaned. MinecartSoundInstanceMixin has never been in the config in the repo's
history, even though it was written in the same commit as its ridden cart twin, so mag-lev rails only
silenced the cart you were actually sitting in. SpriteResourceLoaderMixin targets a class shape that
doesn't exist on 1.21 and the armor_trims atlas override already does the same job, so I deleted it.

Pot patterns work again. DecoratedPotPatterns isn't data driven on 1.21 the way the porting note
assumed, it's a code registry with a private hard coded item map. So this registers the four patterns
and mixes into getPatternFromItem. No new assets needed, the vanilla atlas already scans every
namespace.

One thing worth flagging. Clamp the abyssal chasm biome check to the world floor is the only commit
that changes worldgen output. Math.min(getMinBuildHeight(), oceanFloorY - 30) can only ever return
the world floor, so the check the javadoc describes never actually happens. Fixing it does change which
vanilla features get suppressed near the chasm though, so happy to drop that one if you'd rather keep
generation identical.

digi2303 added 28 commits August 6, 2026 11:39
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