Fix a bunch of things that silently stopped working in the 1.21 port - #1753
Open
digi2303 wants to merge 28 commits into
Open
Fix a bunch of things that silently stopped working in the 1.21 port#1753digi2303 wants to merge 28 commits into
digi2303 wants to merge 28 commits into
Conversation
…moved getStandingEyeHeight
…boxes stay hidden
…epend on chunk generation order
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.
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.renderToBufferfolded its four float colour argsinto one packed int, and nine models still declare the old eight arg version. Every one of those
bodies exists to shrink the model when
youngis set, so none of it runs.HideableModelBoxWithChildren.renderhas the same problem against Citadel'sBasicModelPart, soboxes that ask to be hidden get drawn anyway. The bodies were already ported (they call
ColorUtil.packColorinside), it's only the signatures that got left behind.Using an empty bucket on a sulfur bud, uranium rod or dinosaur chop crashes.
canPlaceLiquidandpickupBlockboth gained a leadingPlayer, those three blocks kept the old signatures, soSimpleWaterloggedBlock's defaults run instead. The defaultpickupBlockreadsBlockStateProperties.WATERLOGGED, and those blocks don't have it. They use a customLIQUID_LOGGEDint instead.
Same pattern, less dramatic:
isPathfindablelost two params, so mobs path through 10 blocks they shouldn'tgetStandingEyeHeightis gone, eye height lives onEntityDimensionsnow (8 mobs)lerpTodropped its trailing boolean, so 11 entities lost their custom interpolation, submarine includedgetExperienceRewardis final now,getBaseExperienceRewardis the override point (5 mobs)getExpDroptakes aLevelAccessor, so radrock uranium ore stopped dropping xpsetupRotationsgained a scale param,getUpdateTaggained aHolderLookup.Provider,getCloneItemStacktakes aLevelReader,causeFallDamagegained aDamageSourcewere getting culled at a 1x1x1 box
Separate from all that, cave biome lookups are wrong on any world that isn't freshly generated.
MultiNoiseBiomeSourceMixinreadslastSampledWorldSeed, but onlyChunkStatusTasks.generateBiomesever 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:
[3424, 13, 2400][-5856, -51, -2560][3424, 13, 2400][3424, 13, 2400]That affects
/locate biome,getUncachedNoiseBiomeand cave maps, which is the actual way you'remeant to find these biomes.
CommonEvents.onServerAboutToStartalready walks everyLevelStemtoinstall 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:
sizes shared one hitbox
ModFishBucketItemreadsCUSTOM_DATAbut every fish writesBUCKET_ENTITY_DATA, so bucketed fishlose everything
SwappedItemand readsSwappedWeapon, the boundroid winch savesBodyUUIDandreads
HeadUUID, both lose it on every saveSodaBottleProcessor.getTypereturns the underground cabin typesuper.renderdraws it again, so the dimoverlay lands twice
Two mixins were orphaned.
MinecartSoundInstanceMixinhas never been in the config in the repo'shistory, 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.
SpriteResourceLoaderMixintargets a class shape thatdoesn't exist on 1.21 and the
armor_trimsatlas override already does the same job, so I deleted it.Pot patterns work again.
DecoratedPotPatternsisn't data driven on 1.21 the way the porting noteassumed, 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 everynamespace.
One thing worth flagging.
Clamp the abyssal chasm biome check to the world flooris the only committhat changes worldgen output.
Math.min(getMinBuildHeight(), oceanFloorY - 30)can only ever returnthe 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.