Repository navigation
Conversation
Filling a hashmap palette bumped bits_per_entry to 9 and switched to the global palette, but global ids need 15 bits for block states. Debug builds panicked in BitStorage::set and release builds silently masked the ids.
Eight particle types carry options in 26.2 but were unit variants, so any level_particles packet with one of them failed with leftover data.
In 26.2 the occupant's entity_data is a TypedEntityData (entity type id plus a compound), not a bare compound, so any bees component broke the item.
The style was read with a named root but written unnamed, so set_objective packets with a styled format ran out of data.
This branch has not been deployed
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.
Fixes #398. One commit per bug. Every fix has a test that fails without it, and the full stress run from the issue passes on a vanilla 26.2 server.
1. Global palette bit width (
azalea-world)global_bits_per_entry()toPalletedContainerKind.BlockState:ceillog2(MAX_STATE + 1), which is 15 in 26.2 and matches vanilla'sceillog2(registry size).Biome: 16. azalea doesn't know the biome registry size at compile time, and 16 bits covers any datapack.on_resize, when the new kind isGlobal, usemax(requested, global_bits_per_entry())instead ofbits_per_entry + 1.Test
test_resize_to_global_fits_any_state: fill 256 states, setMAX_STATE, check the palette is global at 15 bits and every value reads back. Without the fix it hits the same panic as the live bot.Live: the bot used to die around the 188th distinct block. It now gets through all 1200
setblocks.2. Particle options (
azalea-entity)PowerParticle { power },SpellParticle { color, power }andTrailParticle { target, color, duration }.DragonBreath(PowerParticle),Effect/InstantEffect(SpellParticle),TintedLeaves/Flash(ColorParticle),Trail(Box<TrailParticle>),DustPillar/BlockCrumble(BlockParticle).TrailParticlelikeVibrationParticle, soEntityDataValuestays at 24 bytes (there's a const assert for that).From<ParticleKind>to useDefaultfor the new data.Tests: read
flashwith an ARGB int and check nothing is left over, plus atrailroundtrip.Live: all eight particle kinds are received and parsed, with 0 errors (it was 7
Leftover dataerrors before).3. Beehive occupants (
azalea-inventory)BeehiveOccupant::entity_datafromNbtCompoundtoEntityData(entity kind + compound, same as vanilla'sTypedEntityData).skip_serializing_if = "is_default", sinceEntityDatahas no default and vanilla always writes it.Test: a
Beesroundtrip that checks the bee's entity type id goes on the wire.Live: the
beehive[bees=...]item no longer errors.4. Styled number format (
azalea-chat)NumberFormat::StyledwithNbt::azalea_read(unnamed), matching the existing write.Test: a styled roundtrip. Without the fix it fails with
UnexpectedEof.Live: all six
set_objectivepackets from the scoreboard commands parse.Breaking changes
Particlevariants above now carry data, so matches needParticle::Flash(_), and so on.BeehiveOccupant::entity_datais nowEntityData.PalletedContainerKindhas a new required method.