Commit graph

36 commits

Author SHA1 Message Date
BruceChen
e03b7de959 Preserve full command in mcc-cmd and broaden tests 2026-04-12 19:25:25 +08:00
BruceChen
1be001bdf8 Fix session parser robustness and test assertion 2026-04-12 19:21:07 +08:00
BruceChen
4c6d5b566b Make MCC helpers session-aware and add reset test 2026-04-12 19:10:00 +08:00
BruceChen
d9c6826443 tools: fix tmpfs build root test 2026-04-12 19:04:38 +08:00
BruceChen
fdb6e5db4c tools: harden session helper and tests 2026-04-12 19:00:42 +08:00
BruceChen
3b65085a66 tools: add MCC session and build root helpers 2026-04-12 18:52:17 +08:00
BruceChen
740de13d98 refactor: enhance XLIFF parsing in Crowdin translation script
- Added support for an `include_paths` parameter to filter files based on specified prefixes, taking priority over `exclude_paths`.
- Updated the `parse_xliff` and `process_language` functions to accommodate the new filtering logic.
- Enhanced command-line argument parsing to allow users to specify files for translation directly, improving flexibility in translation management.
2026-04-08 02:52:07 +08:00
BruceChen
698a562156 refactor: update output directory handling in Crowdin translation script
- Removed the default output directory constant and updated the logic to set the output directory based on the provided argument or default to a "translated" subdirectory within the bundle directory.
- Improved help text for the output directory argument to clarify its default behavior.
2026-04-08 01:30:35 +08:00
BruceChen
7ec9d64b5b refactor: optimize translation unit handling in Crowdin script
- Introduced a new variable to track successfully translated units, improving clarity and efficiency in the processing logic.
- Updated the logic for combining existing and new translation units, ensuring accurate output and preventing unnecessary uploads when no new translations are available.
2026-04-08 01:30:35 +08:00
BruceChen
37bda82828 feat: add deduplication for cached domain prompt translations
- Implemented a new function to remove duplicate paragraphs from cached translations, addressing issues with the API returning repeated content.
- Updated the caching logic to apply deduplication both when loading from cache and after generating new translations, ensuring cleaner and more accurate cached data.
2026-04-07 00:52:18 +08:00
BruceChen
5dde778b53 refactor: improve XLIFF file handling in translation script
- Enhanced the `find_xliff_files` function to preserve the order of locales when mapping Crowdin locales to XLIFF paths.
- Updated the logic to return all available locales when no specific locales are provided, ensuring better handling of XLIFF files.
- Simplified the iteration over XLIFF files by removing unnecessary sorting in the final loop.
2026-04-07 00:50:24 +08:00
BruceChen
47f13a815c feat: add Crowdin translation automation script
- Introduced a new Python script for automating the translation of Crowdin XLIFF bundles using the Alibaba Cloud Qwen-MT API.
- Updated .gitignore to include the Crowdin translation working directory, ensuring that temporary files are not tracked.
- The script supports downloading, parsing, translating, and uploading XLIFF files, streamlining the localization process.
2026-04-07 00:30:52 +08:00
BruceChen
6e86edc632 feat: Refactor MapColors class to load color palette from JSON resource 2026-04-05 01:17:57 +08:00
Anon
22e987070a Merge remote-tracking branch 'origin/master' into feat/optimization
# Conflicts:
#	tools/run-creative-e2e.sh
2026-04-03 15:44:59 +02:00
BruceChen
b9b7160e19 Enhance decompile.sh to support version metadata resolution and improved decompilation handling
- Added functionality to fetch version metadata from Mojang's manifest.
- Implemented checks for the presence of Proguard mappings to determine decompilation method.
- Enhanced the script to handle unobfuscated versions by downloading and extracting inner jars when necessary.
- Improved error handling for missing dependencies and added informative output messages during the decompilation process.
2026-03-31 01:28:24 +08:00
milutinke
76e5cab248 Improve MCC testing workflow resilience 2026-03-30 18:02:10 +02:00
BruceChen
6631180f8a Minimap support 2026-03-29 19:53:50 +08:00
Anon
a2f7511ef7 Optimized World.cs 2026-03-25 23:57:02 +01:00
BruceChen
8456e363f5
TUI for MCC (#2976)
* feat: implement interactive TUI inventory viewer

- Added InventoryTui command to open an interactive terminal user interface for inventory management.
- Introduced InventoryApp and InventoryMainView classes for TUI layout and functionality.
- Created InventoryViewModel and SlotViewModel to manage inventory data and display.
- Integrated Consolonia for enhanced console UI experience.
- Updated McClient to support console message handling during TUI operation.

These changes enhance user interaction with inventory management in Minecraft Console Client.

* feat: enhance debugging workflow with mcc-debug.sh and TUI support

- Introduced mcc-debug.sh for streamlined one-step build, server start, and MCC launch.
- Added TUI mode for improved user experience during debugging sessions.
- Updated mcc-env.sh to include new debug helpers and TUI mode functionality.
- Enhanced SKILL.md with detailed instructions for using the new debugging tools and console modes.

These changes significantly improve the debugging process for Minecraft Console Client, making it more efficient and user-friendly.

* feat: introduce TUI console backend and related enhancements

- Added ClassicConsoleBackend and TuiConsoleBackend to support different console I/O modes.
- Implemented IConsoleBackend interface for better abstraction of console operations.
- Enhanced ConsoleIO to utilize the new backend structure for input and output handling.
- Introduced MainTuiView and MccTuiApp for a full-screen TUI experience using Avalonia.
- Updated InventoryTuiHost to manage TUI lifecycle and interactions.

These changes significantly improve the console experience in Minecraft Console Client, providing a more flexible and user-friendly interface.

* refactor: remove InventoryTui command implementation

- Deleted the InventoryTui class, which provided an interactive terminal user interface for inventory management.
- This change simplifies the command structure as part of ongoing improvements to the console experience in Minecraft Console Client.

The removal of this command is aligned with recent enhancements to the console backend and user interface.

* refactor: update InventoryMainView and MainTuiView for improved UI handling

- Changed several fields from readonly to mutable in InventoryMainView to allow for dynamic updates.
- Introduced a new McColorParser class for parsing Minecraft color codes and creating colored text blocks.
- Enhanced MainTuiView to support formatted log lines and improved notification handling.
- Updated chat scrolling behavior to ensure better user experience during text input and log display.

These changes streamline the UI components and enhance the overall console experience in Minecraft Console Client.

* feat: enhance command input handling in MainTuiView

- Updated command input to use event routing for better key handling.
- Added support for Ctrl key shortcuts to improve text manipulation (e.g., word deletion, caret movement).
- Implemented text cleaning on input change to prevent newline characters.
- Improved health and food status bar rendering with a new method for building bar text.

These changes significantly enhance the user experience in the TUI by providing more intuitive command input functionality.

* feat: enhance TUI command suggestion functionality

- Introduced a new CommandSuggestion struct for backend-independent suggestion handling.
- Updated ConsoleIO to streamline suggestion updates for both Classic and TUI backends.
- Enhanced MainTuiView to display command suggestions with improved visibility and interaction.
- Increased the maximum number of displayed suggestions from 6 to 10 for better user experience.

These changes significantly improve the command input experience in the TUI, making it more intuitive and user-friendly.

* feat: enhance offline command autocomplete functionality

- Introduced an OfflineAutocompleteHandler to provide command suggestions for offline commands.
- Added support for tab cycling through suggestions in the TUI.
- Improved command input handling to clear suggestions when necessary and manage user input more effectively.
- Updated TuiConsoleBackend to integrate with the new autocomplete feature.

These changes significantly enhance the user experience by making command input more intuitive and responsive in offline scenarios.

* feat: enhance localization and user feedback in TUI

- Updated various TUI components to utilize localized strings for improved user experience.
- Enhanced debug state output with translated labels for better clarity.
- Improved inventory command help messages with localized text.
- Added new translations for console mode descriptions and inventory viewer prompts.

These changes significantly enhance the usability and accessibility of the TUI in Minecraft Console Client, making it more user-friendly and informative.

* feat: enforce localization for user-facing strings in AGENTS.md

- Added guidelines to ensure all user-facing text, including log messages and error messages, is managed through the translation system.
- Specified the use of `Translations.resx` and `Translations.Designer.cs` for localization, emphasizing the importance of avoiding hardcoded strings in source code.

These changes improve the consistency and accessibility of user-facing content across the application.
2026-03-26 02:08:18 +08:00
copilot-swe-agent[bot]
6c70685d52 Changes before error encountered
Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/e56a9086-4921-4504-ab06-ebb912cf52ce
2026-03-24 21:11:43 +00:00
Anon
445c236914 Improved the development workflow and testing skills using skill-creator and a real server testing + feedback from actual workflow 2026-03-23 15:35:34 +01:00
Anon
9efb7ef767 Remove obsolete 20 TPS smoke harness 2026-03-23 14:37:37 +01:00
Anon
484133f07a Run MCC at true 20 TPS 2026-03-23 14:29:04 +01:00
Anon
bdb561ed4a
Merge pull request #2957 from milutinke/ai-dev-workflow-docs 2026-03-22 16:32:09 +01:00
Anon
5c2c176ba1 Updated the latest version to: 26.1. Fixed Warning, Tip and info blocks not-rendering properly. Updated Physics section to be up to date. Fixed a formatting error on the Installation page. 2026-03-22 16:29:14 +01:00
Anon
535b95f4b9
Merge pull request #2956 from milutinke/ai-dev-workflow-docs 2026-03-22 16:09:02 +01:00
Anon
9613e0df51 Added AI Assisted development documentation. Updated Vuepress to the latest version. Added SEO and Sitemap plugins to Vuepress. 2026-03-22 14:29:02 +01:00
BruceChen
e3d3a86ac2 feat: add 26.1 palette files and new enum values
Add item, block, entity, and entity metadata palettes for Minecraft 26.1.
New enums: GoldenDandelion (item/block), PottedGoldenDandelion (block),
CatSoundVariant, CowSoundVariant, PigSoundVariant, ChickenSoundVariant
(entity metadata). Update gen_entity_metadata_palette.py FIELD_TO_ENUM
mapping for the new sound variant types.

Made-with: Cursor
2026-03-22 20:04:08 +08:00
BruceChen
a3c918e946 feat: implement physics engine for player movement and collision detection
- Introduced a comprehensive physics engine that replicates Minecraft's movement mechanics, including player input handling, gravity, and collision detection.
- Added classes for player physics, movement input, and collision detection, ensuring accurate simulation of player interactions with the game world.
- Integrated AABB (Axis-Aligned Bounding Box) structures for precise collision detection against blocks.
- Enhanced movement capabilities with support for jumping, sneaking, and sprinting, along with step-up mechanics for navigating terrain.

These changes significantly improve the realism and responsiveness of player movement within the game environment.
2026-03-22 15:29:22 +08:00
BruceChen
cca4134e8b feat: enhance decompilation and server management scripts
- Introduced `decompile.sh` to automate the decompilation process, including downloading `MinecraftDecompiler.jar` and server.jar for specified Minecraft versions.
- Added `mc-rcon.sh` for sending RCON commands to a Minecraft server, improving server management capabilities.
- Created `mcc-env.sh` to provide helper functions for managing Minecraft servers, including starting, stopping, and sending commands.
- Implemented `start-server.sh` to launch a Minecraft server in a tmux session with a named pipe for stdin, facilitating easier command input.
- Updated `README.md` to reflect new tools and usage instructions for decompiling and server management.

These changes streamline the workflow for adapting to new Minecraft versions and enhance the overall development experience.
2026-03-22 15:28:57 +08:00
Anon
e2746ae0d1 Implemented new Delcare Command packet for new versions 1.20.6-1.21.11 and fixed it for 1.20.4. 2026-03-22 00:42:43 +01:00
BruceChen
50b4b3c8fe feat: add palettes and enums for MC 1.21.11 (protocol 774)
Add 17 new items (spears, nautilus armor, spawn eggs, netherite horse armor),
4 new entities (CamelHusk, Nautilus, Parched, ZombieNautilus), and 2 new
entity metadata serializer types (ZombieNautilusVariant, HumanoidArm).

Generated ItemPalette12111 (1505 items), EntityPalette12111 (157 entities),
and EntityMetadataPalette12111 (39 serializers) from server reports.

Made-with: Cursor
2026-03-22 00:49:33 +08:00
BruceChen
34671fdab2 feat: enhance palette generation and validation for MC 1.21.9
Updated the SKILL.md documentation to include critical steps for generating server reports and validating decompiled source against server data, emphasizing the importance of using server data since MC 1.21.9. Enhanced the diff_registries.py script to support cross-validation with server registries.json, allowing for accurate palette generation. Added new scripts for generating block and entity palettes from server data, ensuring completeness and correctness of entries.

This update improves the workflow for adapting to new Minecraft versions and ensures that palette generation reflects the latest changes in item and block registration.

Made-with: Cursor
2026-03-21 15:04:20 +08:00
BruceChen
67ad5fcf97 feat: add palettes for MC 1.21.9/1.21.10 (protocol 773)
- Palette1219.cs: 1053 blocks with new copper chests, copper golem
  statues, copper torches, shelves, oxidized lightning rods, iron chain
- EntityPalette1219.cs: 153 entities (+copper_golem at 27, mannequin at 82)
- ItemPalette1219.cs: 1464 items (generated via gen_item_palette.py)
- EntityMetadataPalette1219.cs: 37 serializers (COMPOUND_TAG removed,
  +CopperGolemState, WeatheringCopperState, ResolvableProfile)
- PacketPalette1219.cs: updated clientbound IDs for 4 new debug packets
  and GameTestHighlightPos, plus config CodeOfConduct/AcceptCodeOfConduct

Also update gen_entity_metadata_palette.py FIELD_TO_ENUM with the three
new serializer type mappings.

Made-with: Cursor
2026-03-21 14:04:56 +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
7609832976 chore: add reusable version adaptation scripts
Add tools/ directory with Python scripts for comparing Minecraft version
registries and generating MCC palette files:

- diff_registries.py: Compare Items/EntityTypes/Blocks/DataComponents/
  EntityDataSerializers between two decompiled MC versions, reporting
  which palettes need updating with ID shift analysis.
- gen_item_palette.py: Generate ItemPaletteXXX.cs from Items.java field
  declaration order, with name validation against ItemType.cs.
- gen_entity_metadata_palette.py: Generate EntityMetadataPaletteXXX.cs
  from EntityDataSerializers.java registration order.
- README.md: Usage documentation for all scripts.

Made-with: Cursor
2026-03-20 01:51:56 +08:00