Commit graph

16 commits

Author SHA1 Message Date
BruceChen
88e9c671da feat: add version routing and metadata reading for MC 1.21.9
- Route block/entity/item/packet/metadata palettes to new 1219 variants
  for protocol >= 773, and raise upper-bound guards from MC_1_21_7 to
  MC_1_21_9 so terrain, inventory, and entity handling are enabled.
- Add DataTypes readers for three new entity metadata serializer types:
  CopperGolemState and WeatheringCopperState (both VarInt), and
  ResolvableProfile (composite: Either<GameProfile, Partial> with
  optional name/UUID/properties + PlayerSkin.Patch with 4 optional
  fields for body/cape/elytra texture ResourceLocations and model type).

Made-with: Cursor
2026-03-21 14:05:06 +08:00
BruceChen
5e8d715358 feat: add MC 1.21.7/1.21.8 (protocol 772) support
1.21.7 and 1.21.8 share protocol 772. The only registry change from
1.21.6 is one new item (music_disc_lava_chicken). All other palettes
(blocks, entities, packets, entity metadata, structured components)
are unchanged and reuse 1.21.6 versions.

Changes:
- Add MC_1_21_7_Version (772) constant
- Add "1.21.7" / "1.21.8" version mappings in ProtocolHandler
- Add MusicDiscLavaChicken to ItemType enum
- Generate ItemPalette1217 (1416 items) for the new item palette
- Update all version upper-bound checks from MC_1_21_6 to MC_1_21_7
- Update MCHighestVersion to "1.21.8"

Made-with: Cursor
2026-03-21 13:10:30 +08:00
BruceChen
1b0e27fde7 feat: add palettes and version routing for MC 1.21.6
- ItemPalette1216: 1415 items (generated from decompiled Items.java)
- EntityPalette1216: 151 entities (HappyGhast at index 56, all after +1)
- Palette1216: block states (DriedGhast 32 states at 13826-13857, all after +32)
- PacketPalette1216: clientbound +3 (Waypoint, ClearDialog, ShowDialog),
  serverbound +2 (ChangeGameMode at 0x04 shifting all after, CustomClickAction at end),
  config clientbound +2 (ClearDialog, ShowDialog),
  config serverbound +1 (CustomClickAction)
- Version routing in Protocol18.cs, PacketType18Handler.cs, EntityMetadataPalette.cs
  updated to select 1216 palettes for protocol >= 771
- EntityMetadataPalette reuses 1215 (EntityDataSerializers unchanged)

Made-with: Cursor
2026-03-21 11:44:12 +08:00
BruceChen
8df39ba74a feat: add MC 1.21.5 (protocol 770) support
Full protocol adaptation for Minecraft 1.21.5:

- Protocol version mapping: 770 -> 1.21.5
- Packet palette: AddExperienceOrb removed (S2C), TestInstanceBlockStatus
  added (S2C), SetTestBlock and TestInstanceBlockAction added (C2S)
- Entity metadata palette: 5 new serializer types (OptionalLivingEntityReference,
  CowVariant, WolfSoundVariant, PigVariant, ChickenVariant), OPTIONAL_UUID
  replaced by OPTIONAL_LIVING_ENTITY_REFERENCE
- Item palette: 11 new items (Bush, FireflyBush, DryShortGrass, DryTallGrass,
  Wildflowers, LeafLitter, CactusFlower, TestBlock, TestInstanceBlock,
  BlueEgg, BrownEgg)
- Entity palette: Potion split into SplashPotion and LingeringPotion
- Block palette: 9 new blocks (bush, cactus_flower, firefly_bush, leaf_litter,
  short_dry_grass, tall_dry_grass, test_block, test_instance_block, wildflowers)
- Structured components: 31 new components including tooltip_display, weapon,
  blocks_attacks, potion_duration_scale, provides_trim_material,
  provides_banner_patterns, break_sound, and 25 entity variant components;
  unbreakable changed from Bool to Unit; instrument changed to EitherHolder

Made-with: Cursor
2026-03-21 00:48:27 +08:00
BruceChen
f73148e5ec feat: add MC 1.21.4 (protocol 769) support
Add complete protocol 769 support for Minecraft 1.21.4:

- Version constants: Add 769 to supported versions, MC_1_21_4_Version constant,
  and version string mappings (including 1.21.3 -> 768 compatibility)
- Item palette: 10 new items (Resin series + Eyeblossom), generated ItemPalette1214
- Entity palette: Remove CreakingTransient (149 entities, down from 150)
- Block palette: 10 new blocks with correct blockstate ID ranges from server data
- Packet palette: Serverbound packet ID reshuffling - PickItem split into
  PickItemFromBlock/PickItemFromEntity, new PlayerLoaded packet inserted after
  PlayerInput, subsequent IDs shifted accordingly. Clientbound unchanged.
- PlayerLoaded: Send empty PlayerLoaded packet after JoinGame processing (>= 1.21.4)
- EntityMetadata/DataComponents: Reuse 1.20.6 palettes (unchanged registries)
- Update all version guard checks from MC_1_21_2 to MC_1_21_4

Made-with: Cursor
2026-03-20 23:51:56 +08:00
BruceChen
df833ae2a8 feat: add palettes and version constants for MC 1.21.2 (protocol 768)
Add item, entity, block, and metadata palettes for Minecraft 1.21.2:
- ItemPalette1212: 1375 items (42 new: pale oak set, colored bundles,
  creaking heart/spawn egg, banner patterns)
- EntityPalette1212: 150 entity types (boats split into per-wood-type
  entries, generic boat/chest_boat removed; added creaking,
  creaking_transient, pale oak boats)
- Palette1212 (blocks): 1084 block types with state IDs generated from
  official 1.21.2 data reports (24 new pale oak blocks, creaking heart,
  pale moss variants)
- EntityMetadataPalette: reuses 1206 (serializers unchanged in 1.21.2)

Updated version infrastructure:
- Protocol18.cs: MC_1_21_2_Version = 768, palette switch routing
- ProtocolHandler.cs: version mapping 1.21.2 <-> 768
- Program.cs: MCHighestVersion bumped to 1.21.2
- ItemType.cs, EntityType.cs, Material.cs: new enum entries

Note: packet palette, structured components, and protocol handler
changes for 1.21.2 are not yet implemented — this commit covers
palette/registry groundwork only.

Made-with: Cursor
2026-03-20 03:02:43 +08:00
BruceChen
e1cb18c6f8 fix: add EntityMetadataPalette1206 for correct 1.20.6+ entity metadata parsing
1.20.6 introduced three new EntityDataSerializer types compared to 1.20.4:
- PARTICLES (id 18) - list of particles, inserted after PARTICLE
- WOLF_VARIANT (id 23) - wolf variant holder, inserted after CAT_VARIANT
- ARMADILLO_STATE (id 28) - armadillo state, inserted after SNIFFER_STATE

These insertions shifted subsequent serializer IDs, causing the 1.19.4
palette (EntityMetadataPalette1194) to misidentify metadata types on
1.20.6+ servers. This could lead to incorrect byte consumption and
potential packet parse failures when entities with affected metadata
types (e.g. wolves, armadillos, area effect clouds with particles)
were present.

Changes:
- Add Particles, WolfVariant, ArmadilloState to EntityMetaDataType enum
- Create EntityMetadataPalette1206 with correct 31-entry ID mapping
- Route 1.20.6+ to the new palette in EntityMetadataPalette.GetPalette()
- Add read logic for the three new types in DataTypes.cs

Verified on 1.21.1 vanilla server: cat, wolf, frog, armadillo, painting
entities all spawn without metadata parse errors.

Made-with: Cursor
2026-03-20 01:43:48 +08:00
Anon
f83e7c5707 Preliminary 1.21 Support 2024-12-06 16:45:48 +01:00
Anon
08c5c15557 1.20.6 - Not working yet 2024-06-16 01:19:09 +02:00
Anon
790e0bfe55 Implemented 1.20.3 2024-01-30 12:51:47 +01:00
Anon
4f957cee7e 1.20.2 Implementation, not tested 2023-11-15 15:42:27 +01:00
Anon
ae7ce35cc8 Fully Implemented 1.20 2023-06-08 19:27:28 +02:00
ReinforceZwei
21cd24e056 Implement 1.8 Entity MetaData 2023-03-27 18:22:50 +08:00
ReinforceZwei
750295b1e3 Clean up entity metadata palette 2023-03-24 20:51:10 +08:00
ReinforceZwei
f4ad24746c Wire up entity metadata palette 2023-03-24 19:46:25 +08:00
Anon
1a22002bde Fixed entity metadata, fixed a crash with Hurt Data packet, fixed a crash when someone flew by with elyra, added Entity Metadata Palettes (not used yet, requires further work) 2023-03-23 23:41:41 +01:00