Commit graph

218 commits

Author SHA1 Message Date
copilot-swe-agent[bot]
aeec731ae5 Merge remote-tracking branch 'origin/master' into copilot/modernize-code-to-csharp-14 2026-03-24 08:52:57 +00:00
copilot-swe-agent[bot]
c5df6a49c6 Modernize null-check patterns: use 'is null' and 'is not null'
Replace '== null' with 'is null' and '!= null' with 'is not null'
across 19 core files following modern C# pattern matching conventions.

Only literal null comparisons are changed. Assignments, value
comparisons, and LINQ expressions are left untouched.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 00:28:02 +00:00
copilot-swe-agent[bot]
5147fb42df Replace PPFT/urlPost HTML scraping with OAuth 2.0 device code flow for 2FA support
- Add Microsoft.RequestDeviceCode() and Microsoft.PollDeviceCodeToken() methods
- Remove XboxLive.PreAuth() and XboxLive.UserLogin() (HTML scraping)
- Remove PreAuthResponse struct, PPFT/urlPost regex patterns
- Update XblAuthenticate to always use "d=" prefix for OAuth tokens
- Update MicrosoftMCCLogin to use device code flow
- Skip password prompting for Microsoft device code method
- Add translation strings for device code prompts
- Update config comments and documentation

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/e13b31f3-8d76-4240-bb69-a519a145fc6a
2026-03-23 15:38:47 +00:00
Anon
d44fc22c8a Fix offline Microsoft auth profile-key checks and complete status ping/pong during auto-version detection. 2026-03-22 22:19:59 +01:00
BruceChen
d4014f7c87 feat: add 26.1 packet palette, structured components registry, and version routing
Add PacketPalette261 with new packet types (GameRuleValues, LowDiskSpaceWarning,
Attack, SetGameRule). Create StructuredComponentsRegistry261 with 6 new components
(additional_trade_cost, dye, pig/cow/chicken/cat sound_variant). Update version
routing in PacketType18Handler, EntityMetadataPalette, StructuredComponentsHandler,
and Program.cs to support protocol 775 (26.1).

Made-with: Cursor
2026-03-22 20:04:08 +08:00
Anon
28834e7a86 Implemented .net 10 support. Updated all affected libraries and the code. Not testes yet. 2026-03-21 20:07:20 +01:00
BruceChen
6c36dc341a feat: add version routing, structured components, and metadata for MC 1.21.11
- Add MC_1_21_11_Version constant (protocol 774)
- Create StructuredComponentsRegistry12111 with 104 components (8 new:
  use_effects, minimum_attack_charge, damage_type, attack_range,
  piercing_weapon, kinetic_weapon, swing_animation, zombie_nautilus/variant)
- Add 6 new component classes for 1.21.11 wire formats
- Add RegistryEitherHolderComponent for holderRegistry-backed EitherHolder
- Add ZombieNautilusVariant and HumanoidArm cases in DataTypes.ReadNextMetadata
- Update all version routing in Protocol18, PacketType18Handler,
  EntityMetadataPalette, StructuredComponentsHandler, and ProtocolHandler
- Bump MCHighestVersion to 1.21.11

Made-with: Cursor
2026-03-22 00:56:04 +08:00
BruceChen
2af0409d00 feat: add MC 1.21.9/1.21.10 (protocol 773) version constants and enum values
Register protocol 773 for Minecraft 1.21.9 and 1.21.10 (which share the
same protocol as a hotfix release). Update MCHighestVersion to 1.21.10.

Add 49 new item types (copper tools/armor, shelves, copper chests,
copper golem statue variants, oxidized lightning rods, iron chain, etc.),
2 new entity types (CopperGolem, Mannequin), 38 new block materials,
3 new entity metadata serializer types (CopperGolemState,
WeatheringCopperState, ResolvableProfile), and 6 new packet types
(DebugBlockValue, DebugChunkValue, DebugEntityValue, DebugEvent,
GameTestHighlightPos, CodeOfConduct, AcceptCodeOfConduct).

Chain item/block renamed to IronChain in 1.21.9; old enum values
retained for backward compatibility with older palettes.

Made-with: Cursor
2026-03-21 14:04:42 +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
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
ff1c570a78 Handle non-interactive terminal environments gracefully
When MCC runs in non-interactive terminals (e.g. CI runners, IDE
embedded shells, piped input), several Console APIs throw exceptions
because there is no real console attached.

Changes:
- Program.cs: Wrap Console.KeyAvailable / Console.ReadKey in
  HandleFailure() with try-catch so MCC does not crash on startup
  failure in headless environments.
- Chunk.cs: Wrap Console.BufferWidth / BufferHeight in try-catch
  with fallback values (120x50) to prevent exceptions when rendering
  chunk maps without a console buffer.
- Map.cs: Same treatment for the map rendering path - use safe
  fallback values when Console.BufferWidth/Height are unavailable.
- ReplayHandler.cs: Replace Array.Reverse() (returns void in newer
  .NET) with .AsEnumerable().Reverse() to fix compilation with
  .NET 10 SDK where the void return breaks the fluent chain.

Made-with: Cursor
2026-03-19 00:11:13 +08:00
Anon
f83e7c5707 Preliminary 1.21 Support 2024-12-06 16:45:48 +01:00
Anon
58a5260b5b Merge branch 'master' of github.com:milutinke/Minecraft-Console-Client into 1.20.6 2024-06-30 11:57:57 +02:00
breadbyte
08551097c6
Add Sentry Error Tracking (#2670)
* Add Sentry Error Tracking

* Omit personally identifiable information and add additional sentry context

* Remove debug message

* Make sentry opt-out and add related notices and strings

Also add Minecraft Version to error context

* Update build to send release info to sentry

* Adjust sentry error tracking

- Send the user-friendly Minecraft Version in the error logs
- Capture exceptions in more parts of the application

We now capture exceptions from the following locations:
- Protocol18 (1.8+) Packet errors
- Errors during client initialization phase (When client is about to start, session keys are NEVER sent to sentry)

* Make Sentry DSN configurable and repository-specific

The Sentry DSN will automatically be filled out on the main repository through the Github Actions build.

* Update build-and-release.yml

Update sed command

* style: change variable name

nitpick, just to make it a little bit more descriptive

* Add Sentry branding in README.

* remove old code (merge conflict)
2024-06-22 06:41:13 +08:00
Anon
08c5c15557 1.20.6 - Not working yet 2024-06-16 01:19:09 +02:00
yaggod
d0caf4c9ee fixed typo in word heAlper lol 2024-04-16 21:21:08 +03:00
breadbyte
f5c7a2801f Add an extra autorelog guard on HandleFailure 2024-03-17 02:10:14 +08:00
breadbyte
706a41ee26 Revert "Fix offline client reconnecting as a microsoft account"
Could no longer reproduce said issue without this code, and a bug was reported regarding this change, so reverting it.
This reverts commit 873bd79fd6.
2024-03-17 01:33:00 +08:00
breadbyte
c78245c056 Fix Server Version prompt
Actually use the provided server version when reconnecting to a server that doesn't broadcast their protocol version
2024-03-07 09:37:55 +08:00
breadbyte
873bd79fd6 Fix offline client reconnecting as a microsoft account
Consider an empty string as a blank password as well as the default dash.
2024-03-07 07:21:11 +08:00
breadbyte
b2ef5cb23b
(skip ci) update supported versions (visual change) 2024-02-19 02:47:07 +08:00
oldkingOK
2c8b15b02e Fix bug: Yggdrasil client can't send message upper 22w17a
When try to send message in yggdrasil-auth server with `enforce-secure-profile=true`
and `online-mode=true` enabled, will fail with message in red:
Chat disabled due to missing profile public key. Please try reconnecting.
So yggdrasil-auth-client also has to encrypt chat messages like Microsoft-auth-client
to send out messages.
2024-01-13 03:29:00 +08:00
Anon
480f0d85f0 Fixed merge conflicts 2023-12-02 13:34:11 +01:00
Polaris_Light
a97096cddf ImplPlayerSection 2023-11-16 00:04:56 +08:00
Anon
4f957cee7e 1.20.2 Implementation, not tested 2023-11-15 15:42:27 +01:00
Polaris_Light
3c97193b70 AddYggdrasilLogin 2023-11-12 21:04:20 +08:00
ReinforceZwei
37bcad37e0 [skip ci] Normalize all line endings 2023-09-15 14:44:11 +08:00
Anon
7c7b58e941 Implemented 1.20.1 2023-06-22 22:10:55 +02:00
Anon
ae7ce35cc8 Fully Implemented 1.20 2023-06-08 19:27:28 +02:00
Anon
5d4ea515a7 Implemented 1.19.4, first pass, light testing 2023-03-21 20:28:05 +01:00
ReinforceZwei
e52fe6cb8b Catch and throw exceptions 2023-01-19 17:54:22 +08:00
BruceChen
ba0d9ba3fc merge brigadier-dev into milutinke:1.19.3 2023-01-14 20:42:15 +08:00
ReinforceZwei
657fc6117b Upgrade protocol to 1.19.3 2023-01-10 18:27:48 +08:00
BruceChen
9c8afb7d3c Bug fix 2023-01-02 18:52:49 +08:00
BruceChen
7ee08092d4 legacy color support 2022-12-14 14:45:51 +08:00
BruceChen
5e11ed3896 Tooltip support & Bug fix 2022-12-11 13:00:19 +08:00
BruceChen
892999ac98 Merge into master 2022-12-06 20:32:46 +08:00
BruceChen
84cf749344 Implement command completion suggestions. 2022-12-06 15:50:17 +08:00
BruceChen
28827b720a Support downloading updates via command. 2022-12-01 22:55:48 +08:00
BruceChen
6c3bfb82ee Remove color code from text 2022-11-30 16:08:55 +08:00
BruceChen
0b5a562f7f [SKIP_DEPLOY] Support account alias in configs 2022-11-06 16:20:38 +08:00
BruceChen
ae23ead4c3 [SKIP_BUILD] FIx "/reco" and "/connect" not working properly 2022-11-05 20:27:10 +08:00
BruceChen
077e3a5e9f
Crowdin localization support (#2310)
* Switching to use resource files

* Update Crowdin configuration file

* Code cleanup
2022-10-28 11:13:20 +08:00
BruceChen
d4f8dd0bfb Upgrade AutoFishing & Bug fix 2022-10-21 19:05:49 +08:00
BruceChen
b949db57cf Support control by command (/fish) 2022-10-17 13:50:56 +08:00
BruceChen
e9f227ca5b Bug fix 2022-10-17 10:03:01 +08:00
BruceChen
db6d6c80bf Bug fix 2022-10-16 20:37:07 +08:00
BruceChen
89b7110839 Update Map Bot 2022-10-13 19:34:49 +08:00
BruceChen
4cb95731bf Bugfix 2022-10-08 10:06:11 +08:00
BruceChen
c1a04fe5bf Bug fix 2022-10-07 21:49:05 +08:00