Commit graph

2166 commits

Author SHA1 Message Date
BruceChen
512445cb1d fix: prevent TUI StackOverflowException from excessive log controls
The TUI log view used an ItemsControl with 5000 max entries and no UI
virtualization. Avalonia's composition renderer traverses the entire
visual tree on each frame -- with thousands of TextBlock controls, the
recursive Render/RenderCore calls exceed the thread stack size on
constrained devices (especially ARM where each stack frame is larger
due to ABI differences), causing a StackOverflowException in
ServerCompositionContainerVisual.Render.

Changes:
- Enable VirtualizingStackPanel on the log ItemsControl so Avalonia
  only creates visuals for the rows currently in the viewport.
- Add [Console.General] TUI_Log_Scrollback config option so users can
  control max log lines in TUI mode. Default is 0 (automatic: 3000 on
  x86/x64, 500 on ARM/ARM64).

Made-with: Cursor
2026-04-03 03:17:53 +08:00
BruceChen
2003786608 fix: resolve AutoRelog reconnect errors (#3036)
- Reset _BotRecoAttempts on successful game join so retry counter
  does not carry stale state across sessions
- Display "unlimited" instead of near-int.MaxValue retry count when
  Retries is set to -1 (infinite)
- Guard SendText with CanSendMessage check to prevent
  NullReferenceException when bots call send after disconnect
- Catch SocketException/IOException in Protocol18 Updater thread so
  a closed socket triggers OnConnectionLost gracefully instead of an
  unhandled exception

Made-with: Cursor
2026-04-03 01:28:26 +08:00
BruceChen
2441c67178 fix: work around Consolonia libcoreclr.so DllNotFoundException on Linux single-file publish
Consolonia's Unix.Terminal uses [DllImport("libcoreclr.so")] to load
dlopen/dlsym on .NET Core. It ships a SetDllImportResolver that maps
the library name to the current process handle, but the resolver is
guarded by #if NET6_0 (exact TFM match) instead of NET6_0_OR_GREATER.
Since Consolonia targets net8.0, the resolver is never compiled in.

On self-contained single-file publishes, libcoreclr.so is bundled
inside the host binary and does not exist on disk. Without the
resolver the OS linker cannot find it, causing a DllNotFoundException
that crashes the TUI on startup. This primarily affects ARM64 Linux
users (e.g. Raspberry Pi / Debian Trixie) who almost exclusively use
self-contained publishes.

This commit registers an AssemblyLoadContext.Default.ResolvingUnmanagedDll
handler in Program.Main (before TUI init) that returns (IntPtr)(-1) for
libcoreclr.so, which the runtime interprets as the current process.

This is a temporary workaround until the upstream fix lands:
https://github.com/Consolonia/Consolonia/pull/605

Made-with: Cursor
2026-04-03 01:11:36 +08:00
Anon
82ebdd00ee
feat: Added automatic tool switching feature to Auto Dig
feat: Add low-durability tool switching to AutoDig
2026-03-31 11:43:22 +02:00
copilot-swe-agent[bot]
737a94475a fix: clarify autodig switch log formatting
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/e83f9c2a-a85c-4763-821b-c5b4a0db75a6

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
2026-03-31 08:50:43 +00:00
copilot-swe-agent[bot]
1a86655dfb feat: add autodig tool switching
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/e83f9c2a-a85c-4763-821b-c5b4a0db75a6

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
2026-03-31 08:44:23 +00:00
copilot-swe-agent[bot]
65dec59687 Initial plan 2026-03-31 08:14:25 +00:00
Anon
5f9549586a
feat: Added in-game teams support 2026-03-31 02:05:40 +02:00
copilot-swe-agent[bot]
4c54d2bbb7 docs: add /teams command entry and scoreboard teams bot API section
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/5dff6cc2-149d-431b-b0b1-2b29128a428e

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
2026-03-31 00:02:38 +00:00
copilot-swe-agent[bot]
fdbffcc5bb feat: add Teams packet support (parsing, state tracking, /teams command, bot API)
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/72ea891e-ba62-4dfc-bbba-f197cd1d0404

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
2026-03-30 23:41:11 +00:00
copilot-swe-agent[bot]
cf65c6f241 Initial plan 2026-03-30 23:31:09 +00:00
Anon
ee48c24f69
feat: Improved Auto Fishing detection 2026-03-31 01:03:08 +02:00
Anon
c9b0913c1a feat(autofishing): add velocity and sound bite detection 2026-03-31 00:18:31 +02:00
Anon
d5358d3d1a
feat: Add automatic mining-speed and dig-duration handling 2026-03-30 21:41:06 +02:00
Anon
5de72de234 Fixed a wrong effect decoding on 1.20.4 2026-03-30 21:37:53 +02:00
Anon
d158bfdf21 Fixed bugs 2026-03-30 20:20:58 +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
BruceChen
35dd3c4f06 Add support for ItemStackTemplate in DataTypes and Protocol18
- Implemented ReadNextItemStackTemplate method to read ItemStackTemplate data with item-first encoding.
- Updated Protocol18 to utilize ReadItemStackTemplateLabel for improved item display handling.
- Enhanced item component parsing to accommodate new structured components.
2026-03-31 01:28:24 +08:00
BruceChen
eae96a8fbc Cave mode for minimap 2026-03-31 01:28:24 +08:00
Anon
be20b97478
Merge branch 'master' into copilot/implement-automatic-mining-handling 2026-03-30 19:13:39 +02:00
Anon
1e35a4c624
[skipci]Merge pull request #3029 from MCCTeam/codex/improve-mcc-testing-workflow 2026-03-30 19:09:42 +02:00
BruceChen
354a498f21
Add icon startup banner 2026-03-31 00:05:54 +08:00
BruceChen
435887cc04 Update translation for banner label to clarify supported Minecraft versions 2026-03-31 00:05:22 +08:00
BruceChen
f7bc817408 Refactor color definitions in MccBannerPanelBuilder for improved clarity
- Removed unused color definitions for screen and dark screen.
- Updated pixel array to use the new screen background color consistently.
- Adjusted prompt text colors for better visibility in the TUI.
2026-03-31 00:03:29 +08:00
BruceChen
eaf4704473 Add icon banner display option and refactor startup banner logic
- Introduced a configuration option `Display_Icon_Banner` to control the visibility of the startup icon banner.
- Refactored `ProcessStartupState` to utilize TUI for displaying the banner if enabled, falling back to a classic banner display otherwise.
- Added new methods for building the banner panel and icon grid for improved visual representation.
- Updated translations and resource comments to support the new banner features.
2026-03-31 00:03:29 +08:00
milutinke
76e5cab248 Improve MCC testing workflow resilience 2026-03-30 18:02:10 +02:00
Anon
6b5435629f
feat: Added achievements/advancements support
feat: Add achievements/advancements support
2026-03-30 17:31:47 +02:00
milutinke
62740ee94e Document achievements feature 2026-03-30 17:28:15 +02:00
milutinke
0881cbaa1c Fix legacy achievements and add test harness 2026-03-30 17:25:08 +02:00
copilot-swe-agent[bot]
22455905a7 Add automatic mining-speed and dig-duration handling
- Add BlockHardness.cs with hardness data for all 1053 blocks from MC 1.21.11
- Add MiningCalculator.cs with version-aware dig duration computation
  - Tool speed from ToolComponent (1.20.6+) or legacy hardcoded tables
  - Efficiency enchantment (legacy: level^2+1, 1.21.11+: mining_efficiency attribute)
  - Haste/Conduit Power/Mining Fatigue effects
  - BLOCK_BREAK_SPEED attribute (1.20.6+)
  - MINING_EFFICIENCY and SUBMERGED_MINING_SPEED attributes (1.21.11+)
  - Underwater penalty with Aqua Affinity support (legacy) or attribute (modern)
  - Airborne penalty
  - Correct tool for drops check (30 vs 100 divisor)
- Modify McClient.DigBlock to auto-compute duration for survival/adventure mode
- Cache player attributes from OnEntityProperties in McClient
- Expose duration parameter in ChatBot.cs scripting wrapper
- Add /downloads/ to .gitignore

Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/579df446-a335-4174-9a8b-4d66173c82b1

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
2026-03-30 08:24:00 +00:00
copilot-swe-agent[bot]
962c8b1ab2 Fix 26.1 RecipeBookAdd crash: update SlotDisplay registry IDs for 26.1
MC 26.1 changed the minecraft:slot_display registry, inserting 3 new
types (with_any_potion, only_with_component, dyed) and shifting all
existing IDs. This caused MCC to misparse recipe display data, leading
to a Queue empty crash in SkipItemHolderSet.

Add version-gated ReadSlotDisplayLabel with correct 26.1 type mapping
and reader methods for the 3 new slot display types.

Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/47b0c937-1491-4216-8ee0-1aca866e99ab

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
2026-03-30 08:09:33 +00:00
copilot-swe-agent[bot]
c55d32bb70 Diagnose root cause of 26.1 RecipeBookAdd crash
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/47b0c937-1491-4216-8ee0-1aca866e99ab

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
2026-03-30 08:03:56 +00:00
copilot-swe-agent[bot]
c95fe131e3 Initial plan 2026-03-30 07:40:08 +00:00
copilot-swe-agent[bot]
0f3289dfdf Fix criteria version boundary: criteria list removed from wire format in MC 1.20.2, not 1.20.6
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/5da0ec37-35e2-4aae-b165-66ddd82df985

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
2026-03-29 21:16:45 +00:00
copilot-swe-agent[bot]
5705df43bd Fix Advancements packet parsing: sendsTelemetryEvent added in 1.20, deduplicate requirements reading
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/5da0ec37-35e2-4aae-b165-66ddd82df985

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
2026-03-29 21:07:17 +00:00
copilot-swe-agent[bot]
7b3e5ee492 Address code review: eliminate unnecessary allocation in progress-only updates
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/9db483a8-4a5f-47b1-a6f4-30b6e39075bd

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
2026-03-29 20:27:12 +00:00
copilot-swe-agent[bot]
65ef3dde6b Implement unified achievements feature: data model, protocol handling, state management, ChatBot API, and /achievement command
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/9db483a8-4a5f-47b1-a6f4-30b6e39075bd

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
2026-03-29 20:22:31 +00:00
copilot-swe-agent[bot]
6dc42d9bd1 Initial plan 2026-03-29 20:10:15 +00:00
Anon
1165f32bb7
[skipci]chores: Add Quick Install section to README 2026-03-29 22:08:01 +02:00
copilot-swe-agent[bot]
534e337f10 Add Quick Install section to README with one-liner install commands
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/0a622d0a-bb4e-4cba-96f6-df2afa3bf4b7

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
2026-03-29 20:05:16 +00:00
copilot-swe-agent[bot]
031dbb16d4 Initial plan 2026-03-29 20:03:11 +00:00
Anon
ec53f53f42
[skipci]chores: Added one line install scripts 2026-03-29 22:01:36 +02:00
copilot-swe-agent[bot]
f10556a162 fix: use Console::Write for progress bar to avoid duplicate bars when piped via iex
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/2c598307-7028-46d4-ac37-045f5ce125ed

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
2026-03-29 19:45:40 +00:00
copilot-swe-agent[bot]
46fdd687c7 feat: add ASCII progress bars to both install scripts
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/00d3b725-2246-40c5-93e4-d9813d95c333

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
2026-03-29 19:39:58 +00:00
copilot-swe-agent[bot]
53afc252ea fix: use precise regex in install.ps1 asset matching
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/bfeecfa8-81d9-45da-b1a7-b2dd6804b34f

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
2026-03-29 19:31:26 +00:00
copilot-swe-agent[bot]
8c4acb0ad5 chore: remove Sentry cache dir and add to .gitignore
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/bfeecfa8-81d9-45da-b1a7-b2dd6804b34f

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
2026-03-29 19:30:24 +00:00
copilot-swe-agent[bot]
d08cf803b8 feat: add install.sh and install.ps1 download scripts with docs update
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/bfeecfa8-81d9-45da-b1a7-b2dd6804b34f

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
2026-03-29 19:30:05 +00:00
copilot-swe-agent[bot]
301ea6b9db Initial plan 2026-03-29 19:25:17 +00:00
Anon
ef106c80c2
feat: Implemented the Recipe Book into MCC 2026-03-29 21:05:38 +02:00
copilot-swe-agent[bot]
d97861888d docs: document recipebook command
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/1287ecfd-6d64-45ee-9aaf-96cbce9c3713

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
2026-03-29 18:52:32 +00:00