Commit graph

1756 commits

Author SHA1 Message Date
Somersault
c9225aac58 Zaman damgalarının son mesaj rengine göre renklenme sorununu çözer. 2026-08-01 19:26:22 +03:00
Anon
dbce402842 fix: accept semicolonless script using directives
Fixes #3195
2026-07-31 19:12:51 +02:00
Anon
3ae1d746fa fix: decode modern chat type holders correctly 2026-07-27 21:58:01 +02:00
Anon
dc472c3df6 chore: update build dependencies 2026-07-27 17:58:08 +02:00
Anon
5655e3fc89 Fix restart publication races (#3186)
Prepare offline routing before restart requests become observable, reject stale route owners, and wait for source-client cleanup before executing automatic retries.

Add deterministic publication-order, cleanup-gate, and stale-route regression tests.
2026-07-27 17:26:52 +02:00
Anon
456a548cbc Fix: make AutoRelog retries single-owner (#3186)
Login rejections could schedule and execute multiple restarts for one failure while leaving no usable console route during reconnect delays.

Changes:
- Bind failure and restart work to immutable connection attempts
- Coalesce automatic retries while allowing explicit settings replacement until commit
- Preserve held bots and offline command routing across failed logins
- Add deterministic retry, ownership, and routing regression tests

Fixes #3186
2026-07-27 17:26:52 +02:00
Anon
eea631f69e fix: preserve queued disconnect reason 2026-07-27 00:35:18 +02:00
Anon
630a5fabef feat: add guided login and authlib URL setup 2026-07-26 14:17:59 +02:00
Anon
9b90b535d8 fix: isolate queued restart settings 2026-07-26 01:16:07 +02:00
Anon
1686d00f30 fix: use selected account for offline reconnect 2026-07-26 01:08:14 +02:00
Anon
64c1dc55e0 Fix Auto Relog reconnect lifecycle 2026-07-19 14:42:10 +02:00
Anon
25bbe35718 fix: exit on failure instead of prompting 2026-07-17 19:16:00 +02:00
Anon
142fb107db
feat: Added Minecraft 26.2 support
Add Minecraft 26.2 support (protocol 776)
2026-07-04 21:58:48 +02:00
Reed Pennock
d1df44aae5 chore: Update physics shapes, minimap data and version table for 26.2
- 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>
2026-07-02 16:43:44 -05:00
Reed Pennock
e4161af158 feat: Wire MC 26.2 (protocol 776) routing and adapt Teams packet parsing
- 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>
2026-07-02 16:43:31 -05:00
Reed Pennock
22685a720c feat: Add MC 26.2 palettes, registries and new sulfur/cinnabar content
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>
2026-07-02 16:43:20 -05:00
Ítalo Seara
f34b8ba989 feat(inventory): expose NBT/component data in inventory MCP tools
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`.
2026-06-27 14:41:41 -03:00
Andy
aee35c3f58
Add English translations to DataPath comments
Updated comments to include English translations for clarity.
2026-06-21 10:53:11 +08:00
Andy
aa1b6f968e
Add DataPath.cs and revert CSharpRunner.cs changes
# 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
2026-06-19 13:18:04 +08:00
Anon
25a2f5a4a3
bugfix: handle null/empty profile name in ProfileComponent serialization
fix: handle null/empty profile name in ProfileComponent serialization
2026-06-17 11:31:17 +02:00
Anon
85fe6b451b fix: handle null/empty profile name in ProfileComponent serialization
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.
2026-06-17 11:27:23 +02:00
Anon
73377685b4 fix: restore full color depth for hex color codes (§#RRGGBB)
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.
2026-06-17 11:04:06 +02:00
Anon
aaa4908f7d
feat: Implement the Dialog System (1.21.6+)
feat: Implement the Dialog System (1.21.6+)
2026-06-14 02:31:50 +02:00
Anon
7f2a71f9fe Messaging improvements + Added auto show dialogs in classic console mode 2026-06-14 02:28:13 +02:00
Anon
c0d983272b Cosmetic changes, UX/UI improvements in TUI mode, added colored text support in dialogs 2026-06-14 02:11:04 +02:00
Anon
2aa85cbb17 Added Docs, Added Translations for Dialog Types 2026-06-14 01:25:18 +02:00
Anon
bd29c7fc5c Fixes to Dialogs + Full integration testing script, Fully Tested in CLI mode 2026-06-14 01:05:12 +02:00
Anon
3d988c932f Dialog System First iteration, not tested 2026-06-13 23:59:44 +02:00
copilot-swe-agent[bot]
a1b542dad6
Tidy script diagnostic helpers 2026-06-13 21:49:12 +00:00
copilot-swe-agent[bot]
7d7b880a7c
Preserve script compile source locations 2026-06-13 21:41:52 +00:00
Anon
5e5fa539bb protocol gap fixes 2026-06-12 01:05:19 +02:00
Anon
98dfde6cc2 Gate empty-packet log under debug, add packet exclusion list
- Change empty packet log from log.Warn to log.Debug so it only
  shows when DebugMessages is enabled
- Add PacketDebugExclusions config (List<string>) to suppress
  specific packet types like KeepAlive, Ping from packet debug output
- Check exclusion in both LogIncomingPacket and LogOutgoingPacket
- Add ConfigComments resource entry for the new setting
2026-06-11 22:03:36 +02:00
Anon
de96462659 Fix structured components: audit fixes, codec helpers, and serialize implementations
- Fix 5 class naming typos: Unbrekable->Unbreakable, Blook->Book,
  Omnious->Ominous, FoodComponentComponent->FoodComponent
- Fix IntangibleProjectileComponent: extends EmptyComponent (Unit type)
- Delete dead code JukeBoxPlayableComponent.cs (duplicated)
- Implement proper Serialize() on BlocksAttacksComponent,
  KineticWeaponComponent, PiercingWeaponComponent
- Extract shared SoundEventHolder/HolderSet codec helpers into
  StructuredComponentCodecHelpers
- Add TypedEntityDataComponent/TypedBlockEntityDataComponent base classes
  for 1.21.9+ typed entity data format
- Fix variable name: uses1218AttributeAndEquippableFormats ->
  uses1216AttributeAndEquippableFormats
- Add entity data version gate (1.21.9+) to v1215 registry
- Fix chicken/variant and zombie_nautilus/variant component types
- Fix empty packet hang in Protocol18 ReadNextPacket loop
- Add structured components integration test harness
2026-06-11 21:33:48 +02:00
Anon
16637f7eba Fix custom model data decoding for 1.21.4 2026-06-11 16:20:42 +02:00
Anon
98d4781d2c add packet debug toggle 2026-06-10 17:24:25 +02:00
Anon
e744ff206b hypixel book fixes 2026-06-10 17:16:30 +02:00
werfrag
2e383403c3
Update TelegramBridge.cs
The names of players containing the "_" symbol were not read.
2026-06-07 01:36:38 +02:00
Anon
eeb89d676b Formatting 2026-06-06 14:12:28 +02:00
Anon
9980e08bac Fixed chat on legacy versions 2026-06-06 14:09:54 +02:00
Anon
a5423211ad Fixed Script Scheduler bug 2026-06-06 12:09:36 +02:00
Anon
6bfcd9e9ca Fix mirrored player inventory sync 2026-06-06 10:22:45 +02:00
Anon
3c59bfe13a Experimental inventory sync 2026-06-06 09:13:19 +02:00
Anon
0a514d1351 Revert inventory sync changes 2026-06-06 09:02:02 +02:00
Anon
4bbc751cc1 Fix offline LAN encrypted login 2026-06-05 22:09:52 +02:00
Anon
29b0087a3a Merge branch 'master' of https://github.com/MCCTeam/Minecraft-Console-Client into fix/inventory-version-regressions
# Conflicts:
#	MinecraftClient/Mapping/World.cs
2026-06-05 21:13:59 +02:00
Anon
b698f122cf
Merge branch 'master' into fix/inventory-version-regressions 2026-06-05 20:52:35 +02:00
Anon
5228670131 Fix inventory handling across protocol versions 2026-06-05 20:26:29 +02:00
copilot-swe-agent[bot]
8757533fb9
Fix Script bots accumulating on reconnect by unloading on disconnect
Script ChatBots were persisted in the static botsOnHold list across
reconnects. When ScriptScheduler triggered new scripts on login, the
old Script bots were still running, causing duplicate commands to be
sent simultaneously. This led to command spam and crashes.

Adding OnDisconnect to the Script ChatBot ensures scripts are removed
from the bots list before they can be saved to botsOnHold, preventing
accumulation of duplicate script instances on reconnect.
2026-06-05 06:29:43 +00:00
copilot-swe-agent[bot]
546345e816
Update AutoAttack bot translation for Cooldown_Time 2026-06-04 19:31:21 +00:00
Anon
c6ca3dc13d Formatted the code and removed logs from Auto Attack 2026-06-04 11:42:41 +02:00