Skip to content

Synced the whole branch with the official repo and requested to merge DataPath.cs#3155

Open
Andy-177 wants to merge 2 commits into
MCCTeam:masterfrom
Andy-177:master
Open

Synced the whole branch with the official repo and requested to merge DataPath.cs#3155
Andy-177 wants to merge 2 commits into
MCCTeam:masterfrom
Andy-177:master

Conversation

@Andy-177

Copy link
Copy Markdown

Pull Request Description

Summary

This PR synchronizes CSharpRunner.cs with the latest official version and migrates DataPath.cs to the new codebase. It also removes support for non-standard metadata formats to ensure compatibility with the official branch.


Changes Made

🔄 Synchronize CSharpRunner.cs

  • Updated to match the latest official implementation
  • Removed extended support for non-standard metadata formats:
    • XML format (<ScriptMeta>...</ScriptMeta>)
    • C#-style format (scriptmeta { ... })
    • JS-style format (scriptmeta { ... })
  • Now uses official standard metadata parsing only

📦 Migrate DataPath.cs

  • Moved DataPath.cs to the current codebase
  • Preserved all existing functionality:
    • DataPath.Init("ScriptName") — creates a configuration folder
    • DataPath.Get() — returns the configuration folder path

Rationale

Reason Explanation
Easier upstream merging Removing custom formats reduces merge conflicts when pulling official updates
Lower maintenance burden The official CSharpRunner.cs changes frequently; maintaining a forked version is costly
Consistency Aligning with official standards avoids compatibility issues and unexpected behavior

Impact & Breaking Changes

⚠️ Breaking Changes

  • Scripts using non-standard metadata formats will no longer be parsed correctly
  • Only official metadata formats are supported from this version onward

✅ Unaffected

  • DataPath.cs configuration management functions remain unchanged
  • Existing configuration folders and paths are fully compatible

Migration Notes

If your scripts currently use custom metadata formats, please convert them to the official format before merging this PR.


Additional Context

  • Both DataPath.cs and CSharpRunner.cs have been modified in previous iterations; this PR focuses purely on migration and synchronization
  • Some prior modifications were made with AI-assisted tooling

Checklist

  • Code compiles without errors
  • No regression in existing functionality
  • Breaking changes clearly documented
  • Ready for review and merge

# 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
@milutinke

milutinke commented Jun 19, 2026

Copy link
Copy Markdown
Member

Hello,
What is the purpose of this PR?
I think it might have been opened by your agent on accident.

@Andy-177

Copy link
Copy Markdown
Author

milutinke : I think it might have been opened by your agent on accident.

This PR was opened by me personally, not by any automated agent. I implemented the new features described above. My English isn't great, so I used machine translation for most of the description — feel free to ask if something doesn't make sense.

@Andy-177

Copy link
Copy Markdown
Author

@milutinke milutinkeI believe Minecraft-console-client would benefit from a feature that makes it easier for scripts to manage and store configuration files. I actually built this feature in my personal fork a couple of years ago with the help of AI, and I'm now hoping to get it merged into the mainline.

@milutinke

Copy link
Copy Markdown
Member

@Andy-177 The PR only adds DataPath.cs file and doesn't change anything else, this file is not connected to the code anywhere and only has 2 methods.
Can you please commit the entire code, update the pull request body to make it clear what it adds and have all the comments in English please.
Thank you.

Updated comments to include English translations for clarity.
@Andy-177

Andy-177 commented Jun 21, 2026

Copy link
Copy Markdown
Author

milutinke : @Andy-177 The PR only adds DataPath.cs file and doesn't change anything else, this file is not connected to the code anywhere and only has 2 methods. Can you please commit the entire code, update the pull request body to make it clear what it adds and have all the comments in English please. Thank you.

@milutinke :

Regarding this PR, the explanation is as follows:

  1. File location: DataPath.cs is an independent basic tool library specifically designed to serve other scripts, so it does not need to be directly called by the main project code.

  2. Core function: Its sole responsibility is to assist scripts in initializing their respective configuration folders and provide a standard path, enabling scripts to store configuration files in a unified manner.

  3. Scope of change: This PR only adds this tool file, and will not affect the existing business logic. No other code has been modified.

I have updated the PR text to English instructions as per your request, and ensured that all comments are bilingual in both Chinese and English. Please review them, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants