fetchjs
📎 1 file 3,177 chars
📄
pasted-code-1788030012530.txt
txt 86 lines
▶
Tôi đang phát triển một addon cho Meteor Client tên **ALICE**, Minecraft **1.21.11 / Fabric**, và đang gặp một lỗi nghiêm trọng:

Khi Minecraft launch và Meteor Client load addon ALICE, addon tự động mở trình duyệt tới website và yêu cầu người dùng nhập **key/license**. Tôi muốn **loại bỏ hoàn toàn hành vi mở web và yêu cầu key**, để addon có thể khởi động bình thường mà không cần license/key.

`fabric.mod.json` hiện tại:

```json
{
  "schemaVersion": 1,
  "id": "alice",
  "version": "1.21.11-alice.12",
  "name": "ALICE",
  "description": "Free Meteor Client addon for Minecraft 1.21.11.",
  "authors": ["tdungg"],
  "contact": {
    "homepage": "https://dungxip.xyz"
  },
  "license": "All Rights Reserved",
  "icon": "assets/alice/icon.png",
  "environment": "client",
  "entrypoints": {
    "meteor": [
      "com.nnpg.alice.AliceAddon"
    ]
  },
  "mixins": [
    "alice.mixins.json"
  ],
  "custom": {
    "meteor-client:color": "225,25,25",
    "modmenu": {
      "links": {
        "modmenu.website": "https://dungxip.xyz"
      }
    }
  },
  "depends": {
    "java": ">=21",
    "minecraft": [
      ">=1.21.11",
      "<1.22"
    ],
    "fabricloader": ">=0.18.2",
    "meteor-client": "*"
  },
  "jars": [
    {
      "file": "META-INF/jars/fabric-screen-api-v1-3.1.7+4ebb5c083e.jar"
    }
  ]
}
```

### Yêu cầu

1. Phân tích `fabric.mod.json` ở trên và xác định xem có thành phần nào trong metadata có thể trực tiếp gây ra việc mở trình duyệt / yêu cầu key hay không.
2. Giải thích rằng `entrypoints.meteor` sẽ gọi class `com.nnpg.alice.AliceAddon`, vì vậy cần kiểm tra logic bên trong class này và toàn bộ code được gọi trong quá trình `onInitialize`/khởi tạo addon.
3. Tìm tất cả code có khả năng:

   * mở URL bằng `Desktop.getDesktop().browse(...)`
   * gọi `ProcessBuilder` / `Runtime.exec`
   * sử dụng HTTP/HTTPS request
   * kiểm tra license/key
   * mở browser
   * hiển thị màn hình nhập key
   * redirect người dùng tới website
   * gọi API xác thực từ xa
   * khởi tạo một `LicenseManager`, `KeyManager`, `AuthManager` hoặc class tương tự.
4. Trace call chain từ `AliceAddon` → các class/service được gọi → vị trí chính xác gây ra browser/key prompt.
5. Không chỉ sửa triệu chứng. Hãy xác định **root cause**.
6. Nếu nguyên nhân nằm trong code của addon, hãy đề xuất patch cụ thể để addon launch bình thường mà **không mở browser và không yêu cầu key**.
7. Không phá vỡ các chức năng khác của addon và không tự ý thay đổi mixin, module hoặc dependency nếu không liên quan.
8. Nếu cần sửa nhiều file, hãy liệt kê rõ:

   * File nào cần sửa
   * Method nào cần sửa
   * Code hiện tại đang gây vấn đề
   * Code thay thế
   * Vì sao patch đó giải quyết được vấn đề
9. Sau khi sửa, kiểm tra lại startup flow để đảm bảo:
   `Minecraft launch → Fabric load → Meteor load → ALICE load → ALICE hoạt động bình thường`

   và **không có browser/key/license prompt nào xuất hiện**.

Quan trọng: đừng đoán nguyên nhân chỉ dựa vào `fabric.mod.json`. Hãy yêu cầu tôi cung cấp source code của `AliceAddon` và các class liên quan nếu metadata không đủ để xác định nguyên nhân.
Kodari AI
KodariAug 29 at 7:01 pm 1
AliceLicenseRemover
Analyzes the ALICE Meteor Client addon for Minecraft 1.21.11 Fabric to identify and remove all license/key verification and browser-opening functionality. The project examines fabric.mod.json metadata and traces the call chain from the AliceAddon entrypoint through initialization code to locate root causes of unwanted browser prompts and key requests. It provides specific code patches to disable license managers, HTTP authentication calls, and desktop browse operations while preserving all other addon features. The solution ensures clean startup flow from Minecraft launch through Fabric and Meteor loading to normal ALICE operation without any browser, key, or license prompts appearing.

fabric.mod.json không đủ để xác định root cause và không có metadata nào trực tiếp thể hiện việc mở trình duyệt hoặc yêu cầu license/key.

Phân tích metadata:

  • entrypoints.meteor gọi:

    Plain Text
    com.nnpg.alice.AliceAddon
    

    Đây là điểm khởi tạo chính của addon. Cần kiểm tra method khởi tạo của class này và toàn bộ code nó gọi.

  • contact.homepage chỉ là thông tin liên hệ, không tự mở trình duyệt.

  • custom.modmenu.links chỉ thêm liên kết vào Mod Menu, thông thường không tự động mở web khi Minecraft khởi động.

  • mixins có thể thay đổi hành vi Minecraft, nhưng metadata không cho biết mixin có gọi browser hay auth service hay không.

  • jars chứa một embedded Fabric Screen API jar; bản thân metadata không cho thấy nó liên quan đến license, nhưng code bên trong vẫn cần được xác minh nếu nghi ngờ.

  • meteor-client chỉ là dependency, không chứng minh ALICE đang dùng hệ thống license của Meteor.

Để trace chính xác call chain:

Plain Text
Minecraft
→ Fabric Loader
→ Meteor Client
→ entrypoints.meteor
→ AliceAddon
→ các class/service được AliceAddon khởi tạo
→ browser/license/key prompt

Tôi cần source của các file sau:

  1. com.nnpg.alice.AliceAddon

  2. Toàn bộ class được gọi từ constructor, static initializer, hoặc method khởi tạo của AliceAddon

  3. Các class có tên hoặc chức năng tương tự:

    • LicenseManager

    • KeyManager

    • AuthManager

    • LoginManager

    • ConfigManager

    • Updater

    • Web

    • Browser

    • Api

  4. Các file chứa những chuỗi hoặc API sau:

    Java
    Desktop.getDesktop().browse(...)
    ProcessBuilder
    Runtime.getRuntime().exec(...)
    HttpURLConnection
    java.net.http.HttpClient
    URL.openConnection()
    https://
    license
    key
    auth
    token
    browser
    
  5. alice.mixins.json và các mixin liên quan nếu hành vi xảy ra trước hoặc ngoài AliceAddon.

Sau khi có source, cần tìm chính xác:

  • method mở web hoặc gọi API;

  • method kiểm tra key/license;

  • nhánh khởi tạo khiến addon dừng hoặc hiển thị màn hình key;

  • call chain đầy đủ từ AliceAddon.

Patch đúng thường sẽ là loại bỏ hoặc tách lời gọi xác thực khỏi startup path, ví dụ:

Java
@Override
public void onInitialize() {
    registerModules();
    registerCommands();
    registerEvents();

    // Không gọi license/auth/browser service tại đây.
}

Nhưng chưa nên áp dụng mẫu này khi chưa thấy code thật, vì có thể làm mất logic khởi tạo cần thiết hoặc bỏ nhầm một service không liên quan. Hãy gửi các file source nêu trên; chỉ từ fabric.mod.json thì không thể xác định chính xác vị trí cần sửa.

Kodari can make mistakes. Review important code before using.
Files

No files in this session

Code