- BlockShapeData.json: add the 28 new sulfur/cinnabar blocks by copying
shape entries from analogous blocks (stone, stone_slab, stone_stairs,
stone_brick_wall, pointed_dripstone); state counts verified against the
26.2 server blocks.json. PrismarineJS minecraft-data has no 26.x data
yet, so these should be regenerated once it does.
- MinimapBlockColors.json: add new blocks with MapColor values taken from
the decompiled 26.2 Blocks.java (COLOR_YELLOW / GOLD / COLOR_RED).
Merged by hand because gen_block_color_map.py cannot parse the new
BlockItemIds-based registration format yet.
- MinimapEntityCategories.json: add SulfurCube as hostile
(MobCategory.MONSTER in EntityTypes.java, which now holds entity
registrations instead of EntityType.java).
- AGENTS.md: add the 26.2 row to the version support table.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Add MC_26_2_Version = 776 and bump all upper-bound feature gates
- Route 26.2 to the new item/block/entity palettes and
StructuredComponentsRegistry262
- Reuse PacketPalette261 (play/config packet IDs are unchanged in 26.2;
the only registry change is spectate_entity renamed to spectator_action
at the same ID, which MCC does not send) and EntityMetadataPalette261
(serializer list is identical)
- Add a 26.2 branch for Set Player Team parsing: field order changed to
displayName, prefix, suffix, visibility, collision rule, then color as
Optional<TeamColor> (absent maps to -1) and options byte last
- Register protocol 776 in both supported-protocol lists and the
version string mappings; bump MCHighestVersion to 26.2
JoinGame gained a trailing onlineMode bool and LoginFinished a trailing
session UUID in 26.2; both sit after every field MCC reads, so parsing
is unaffected.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Generated from the 26.2 server data reports (registries.json / blocks.json):
- ItemPalette262 (1537 items, 31 new; IDs shifted by early sulfur/cinnabar inserts)
- Palette262 blocks (1196 blocks, 32366 states, 28 new)
- EntityPalette262 (158 entities, new sulfur_cube)
- StructuredComponentsRegistry262 with new sulfur_cube_content component
at ID 78 (shifts IDs 78-109 up by one); wire format is one ItemStackTemplate
- New ItemType/Material/EntityType enum entries for the sulfur and
cinnabar families, MusicDiscBounce, SulfurSpike and SulfurCube
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add a nullable `Nbt` field to `MccInventorySnapshotSlot`,
`MccInventorySearchMatch`, and `MccItemStackSnapshot` so that callers
can access the full item metadata beyond just material and count.
For 1.20.6+ servers the field is a map of component name
(e.g. "minecraft:custom_data") to the serialized component object.
For legacy servers it is the raw NBT dictionary. The field is omitted
entirely for vanilla items that carry no extra data, so there is no
noise for plain items like Stone or Dirt.
Implementation:
- `StructuredComponent`: add `ComponentName` property (set by the
registry during parse) and mark both it and `TypeId` with
`[JsonIgnore]` so they are excluded from component serialization.
- `StructuredComponentRegistry.ParseComponent`: assign `ComponentName`
after instantiation.
- `MccGameCommon.BuildNbt`: new helper that serializes components by
runtime type (fixing the polymorphism issue with System.Text.Json)
keyed by component name, falling back to the legacy NBT dictionary.
- Snapshot and search query builders updated to call `BuildNbt`.
# Submission Instructions
## Content of this submission
### 1. Synchronize official CSharpRunner.cs
- Synchronize `CSharpRunner.cs` to the latest official version
- **Removed** extended support for non-standard metadata formats (XML, C# style, JS style)
- Restore to the official standard metadata parsing method
### 2. Migrate DataPath.cs
- Migrate `DataPath.cs` to the new version of the code repository
- Maintain the original functionality unchanged:
- `DataPath.Init("ScriptName")` - create a configuration folder
- `DataPath.Get()` - Gets the path of the configuration folder
## Reason for change
1. **Facilitate official merging**: Retaining custom metadata formats increases the risk of conflicts with the official codebase. Removing them allows for smoother acceptance of official updates
2. **Reduce maintenance costs**: The official CSharpRunner.cs undergoes frequent changes, making the maintenance of custom branches a significant workload
3. **Maintain consistency**: Keep consistent with the official version to avoid compatibility issues caused by format differences
## Scope of impact
- Previously supported non-standard metadata formats (XML, C# style, JS style) will no longer be recognized
- Only supports official standard metadata formats
- The functionality of DataPath.cs remains unaffected, and the configuration management function is still operational and available
## Remarks
- DataPath.cs and CSharpRunner.cs have previously been modified, and this time it is only for migration and synchronization purposes
- AI-assisted participation was involved in the previous modification process
Prevents NullReferenceException crash when receiving player head items
with an empty or absent profile name. The Minecraft protocol permits
empty names in the profile component; the serialization path now
falls back to an empty string instead of throwing.
After the dialog system PR (#3143), ResolveHexColors in ClassicConsoleBackend
mapped every §#RRGGBB hex color to the nearest of 16 standard Minecraft colors
via NearestMcColor. This meant all server-sent hex colors were downgraded to
4-bit ANSI regardless of the user's ConsoleColorMode setting.
Replaced the nearest-color lookup with ColorHelper.GetColorEscapeCode, which
generates the right output for each mode: 24-bit ANSI in vt100_24bit mode, 8-bit
in vt100_8bit, 4-bit in vt100_4bit, ConsoleColor in legacy_4bit.
Fixes#3146.