Sync every 2 weeks. A mirror of original repository.
Find a file
BruceChen 56f2426c1f Fix StructuredComponent serialization correctness for 1.20.6
Audited all 58 StructuredComponent subclasses against the official Minecraft
1.20.6 decompiled source to verify Parse()/Serialize() symmetry. Found and
fixed four bugs across four components:

1. ContainerComponent: Parse() skipped null item slots (empty slots in a
   container) but Serialize() looped NumberOfItems times using Items[i],
   causing IndexOutOfRangeException when any slot was empty. The official
   ItemContainerContents uses OPTIONAL_STREAM_CODEC which serializes empty
   slots as VarInt(0). Fixed: Parse now stores all slots including nulls,
   Serialize uses Items.Count and iterates all entries. GetItemSlot(null)
   correctly writes VarInt(0) for empty slots.

2. ChargedProjectilesComponent: Used Items.OfType<Item>() in Serialize()
   which silently dropped null entries, causing the serialized count to
   differ from the written VarInt header. The official ChargedProjectiles
   uses STREAM_CODEC (non-optional, no empty slots allowed). Fixed: Items
   list is now List<Item> (non-nullable), Parse defensively skips nulls,
   Serialize writes Items.Count matching the actual list.

3. BundleContentsComponent: Same issue as ChargedProjectilesComponent.
   Applied the same fix pattern.

4. FoodComponentComponent: Two type mismatches vs the official
   FoodProperties.DIRECT_STREAM_CODEC:
   - Saturation was declared as bool and read with ReadNextBool (1 byte),
     but the protocol sends it as float (4 bytes). This caused all
     subsequent fields in the component to be read at wrong offsets,
     corrupting CanAlwaysEat, SecondsToEat, and the effects list.
   - NumberOfEffects was serialized with GetFloat() instead of GetVarInt(),
     writing 4 bytes of IEEE 754 float instead of a variable-length integer.
   Fixed both Parse and Serialize to use correct types.

Also removed redundant NumberOfItems/NumberOfEffects fields from components
where the count is derivable from the list length, and replaced
ArgumentNullException with cleaner patterns.

Tested end-to-end on vanilla 1.20.6 server: item receiving (diamond_sword,
golden_apple, diamond_pickaxe), inventory slot movement (click to pick up
and place), and inventory listing all work correctly with no server-side
protocol errors.

Made-with: Cursor
2026-03-19 01:37:56 +08:00
.github Merge branch 'master' into 1.20.6 2025-12-02 00:06:16 +08:00
.idea [SKIP_BUILD] Fix document build failure 2022-11-28 14:10:55 +08:00
ConsoleInteractive@db2be2a7f8 Update ConsoleInteractive for preliminary docker support 2023-09-24 18:03:59 +08:00
DebugTools [SKIP_BUILD] Change file encoding to UTF-8 with BOM 2022-11-28 13:55:05 +08:00
Docker [skip ci] Update docker image to use updated releases 2024-08-14 18:22:05 +08:00
docs [skipci]Merge pull request #2852 from MCCTeam/dependabot/npm_and_yarn/docs/prismjs-1.30.0 2025-05-22 13:39:59 +02:00
MinecraftClient Fix StructuredComponent serialization correctness for 1.20.6 2026-03-19 01:37:56 +08:00
MinecraftClientGUI [SKIP_BUILD] Change file encoding to UTF-8 with BOM 2022-11-28 13:55:05 +08:00
.gitattributes [skip ci] Set repository line endings to LF 2023-09-15 14:43:24 +08:00
.gitignore [SKIP_BUILD] Fix unintended HTML tags. 2023-01-28 14:53:15 +08:00
.gitmodules [SKIP_BUILD] Fix document build failure 2022-11-28 14:10:55 +08:00
crowdin.yml Store the text resources of the setting file separately. 2022-11-30 16:22:48 +08:00
LICENSE.md Add LICENSE.md 2023-04-10 18:47:52 +02:00
MinecraftClient.sln legacy color support 2022-12-14 14:45:51 +08:00
MinecraftClientGUI.sln Added Minecraft Client GUI v1.0 to the repository 2013-08-21 14:31:57 +02:00
README.md Add Sentry Error Tracking (#2670) 2024-06-22 06:41:13 +08:00

Logo

Minecraft Console Client (MCC)

Documentation | Download | Installation | Configuration | Usage

GitHub Actions build status Discord server

About

Minecraft Console Client (MCC) is a lightweight cross-platform open-source Minecraft TUI client for Java edition that allows you to connect to any Minecraft Java server, send commands and receive text messages in a fast and easy way without having to open the main Minecraft game.

Download

Get development builds from the Releases section

How to use 📚

Getting Help 🙋

Check out the Website, README and existing Discussions: Maybe your question is answered there. If not, please open a New Discussion and ask your question. If you find a bug, please report it in the Issues section.

Discord

We now have a Discord server, click here to join.

Helping Us ❤️

We are a small community so we need help to implement upgrades for new Minecraft versions, fixing bugs and expanding the project. We are always looking for motivated people to contribute. If you feel like it could be you, please have a look at the issues section :)

How to contribute 📝

If you'd like to contribute to Minecraft Console Client, great, just fork the repository and submit a pull request on the Master branch. To contribute to the website / online documentation see also the Website repository.

Alt

Translating Minecraft Console Client 🌍

To improve translations for MCC, please visit: Crowdin - Minecraft Console Client.

Building from the source 🏗️

This section has been moved to our new Documentation website.

License ⚖️

Unless specifically stated, the code is from the MCC Team or Contributors, and available under CDDL-1.0. Else, the license and original author are mentioned in source file headers. The main terms of the CDDL-1.0 license are basically the following:

  • You may use the licensed code in whole or in part in any program you desire, regardless of the license of the program as a whole (or rather, as excluding the code you are borrowing). The program itself may be open or closed source, free or commercial.
  • However, in all cases, any modifications, improvements, or additions to the CDDL code (any code that is referenced in direct modifications to the CDDL code is considered an addition to the CDDL code, and so is bound by this requirement; e.g. a modification of a math function to use a fast lookup table makes that table itself an addition to the CDDL code, regardless of whether it's in a source code file of its own) must be made publicly and freely available in source, under the CDDL license itself.
  • In any program (source or binary) that uses CDDL code, recognition must be given to the source (either project or author) of the CDDL code. As well, modifications to the CDDL code (which must be distributed as source) may not remove notices indicating the ancestry of the code.

More info at http://qstuff.blogspot.fr/2007/04/why-cddl.html Full license at http://opensource.org/licenses/CDDL-1.0

Uses technologies from