Commit graph

20 commits

Author SHA1 Message Date
Anon
a5423211ad Fixed Script Scheduler bug 2026-06-06 12:09:36 +02:00
Anon
c6ca3dc13d Formatted the code and removed logs from Auto Attack 2026-06-04 11:42:41 +02:00
copilot-swe-agent[bot]
eeb4383099 Fix Roslyn compiler references for WebSocket/HttpListener and fix MCCScript using directive semicolons
Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/6fa57d65-60be-4a4b-b15a-ad3541ac6de3
2026-03-25 14:32:39 +00:00
copilot-swe-agent[bot]
802cc696d6 fix sample http request script on latest runtime
Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/9bf31c0e-e47b-4654-be10-6ea50f27a581
2026-03-24 19:44:05 +00:00
copilot-swe-agent[bot]
da3b2de2ce Fix Roslyn compiler missing netstandard/System.Runtime references (CS0012)
Add netstandard.dll and System.Runtime.dll as metadata references in both
the self-contained and non-self-contained compilation paths. These facade
assemblies are required when scripts reference libraries targeting
netstandard (e.g. Brigadier.NET), preventing CS0012 errors like:
"The type 'Object' is defined in an assembly that is not referenced."

Also make the self-contained path resilient to missing facade assemblies
by catching FileNotFoundException instead of throwing.

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/d34fe951-43e5-412d-8d7f-cf9bee3a0d77
2026-03-24 18:10:04 +00:00
copilot-swe-agent[bot]
687d1746ed Fix command registration for external MCC scripts
- Update Roslyn compiler LanguageVersion from CSharp9 to Latest
- Implement ChatBotCommand.RegisterCommand() (was empty)
- Add RegisterChatBotCommand() helper to ChatBot base class
- Add automatic command cleanup in BotUnLoad via UnregisterChatBotCommands()
- Fix external scripts using Handler.dispatcher (CS0176 static via instance)
- Fix AutoTree.cs wrong Initialize/OnUnload signatures (CS0115)
- EntityCount.cs RegisterChatBotCommand() now works with new helper

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/27fc44b8-50d8-4194-8057-019a29675d4a
2026-03-24 17:43:14 +00:00
copilot-swe-agent[bot]
81b756292e Fix all compilation warnings (CS9107, CS8600, CS8604, CS8618, CS0168, CS0169, CS0649)
- Fix CS9107: Replace lowercase primary constructor parameter refs with
  PascalCase base class properties in 90+ StructuredComponent files
- Fix CS8618: Add null! initializers for late-initialized properties
- Fix CS8600: Use nullable out parameters in World.cs, ChatParser.cs
- Fix CS8604: Add null guard in Compiler.cs, fix null-conditional in McClient.cs
- Fix CS0168: Replace unused variable with discard in DataTypes.cs
- Fix CS0169: Remove unused motionY field from McClient.cs
- Fix CS0649: Remove never-assigned steps field, simplify ClientIsMoving()
- Initialize client/handler with null! to avoid CS8618 cascade

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/milutinke/Minecraft-Console-Client/sessions/7fcee1b2-21e2-4457-b01b-5e0a1f07752f
2026-03-24 01:25:50 +00:00
copilot-swe-agent[bot]
c7bc25aa17 refactor: convert == null / != null to is null / is not null in 31 files
Replace old-style null comparisons with modern C# pattern matching
syntax across Commands, Protocol, Mapping, ChatBots, Physics,
Inventory, Logger, CommandHandler, Scripting, Crypto, and other modules.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 00:42:59 +00: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
breadbyte
ca966a464c
Ensure that the cached version of MCC is refreshed every update (#2760)
fixes #2758

this happened because we added sentry in a future release, but the cache was using an old executable, so it couldn't find the assembly.
2024-07-14 01:46:43 +08:00
breadbyte
74d29321b4
Scripting Hotfix for #2458 (#2460)
* Scripting hotfix

- Fixes #2458
- Change error wording around scripting
- Prevent duplicating the binary for scripting

* Create temporary folder if it doesn't exist
2023-03-28 21:06:56 +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
ef39e8329c [SKIP_BUILD] Change file encoding to UTF-8 with BOM 2022-11-28 13:55:05 +08:00
breadbyte
e006943535
Fix externally referenced DLLs in scripts
External DLL references weren't being used, this commit fixes them so they are used.
2022-10-21 00:29:46 +08:00
breadbyte
78f9c35800
Fix scripting system to provide more information in errors
Also make log lines for scripting more uniform
2022-10-20 20:05:36 +08:00
breadbyte
023cc2e2d4
Fix Linux issues with the scripting system
This fixes bugs in the scripting system in which scripts does not compile and run on Linux.

This commit also changes wording around the logging in the scripting system to avoid confusion between script errors and regular script compilation.
2022-10-14 02:31:31 +08:00
BruceChen
1d52d1eadd
Fix all warnings & Trim (#2226)
* Fix AutoFishing crash
* Fix all warnings
* Remove DotNetZip.
* Fix the usage of HttpClient.
2022-10-02 18:31:08 +08:00
breadbyte
fd7f79402f
Scripting Hotfix for .NET (#2061)
* fix scripting being broken

scripting got broken due to being compiled as a single file application.

* move invoke to a helper function

also move MinecraftClient assembly fetch into the main assembly fetch loop

* Downgrade version of SingleFileExtractor

1.1.0 changed their internal API, so we use 1.0.1 to reduce the amount of reflection we need to do

* add exception messages
2022-08-15 18:30:56 +02:00
breadbyte
d9f1a77ac2
.NET 5+ Support (#1674)
Implement changes to support .NET 5 onwards.
Co-authored-by: ReinforceZwei <39955851+ReinforceZwei@users.noreply.github.com>
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2022-07-03 22:34:07 +08:00