Skip to content

🎨 Cloth Config 設定介面與 ModMenu (MC 26.1.2)

📌 倉庫原始碼聲明:本 Wiki 中的文件反映了倉庫中的當前原始碼狀態,可能包含領先於 CurseForge 與 Modrinth 上公開發布版本的最新未發布提交或開發中功能。

設定資訊面板詳細資訊
設定檔路徑config/ig_magnet.json
GUI 函式庫Cloth Config Fabric (me.shedaniel.cloth:cloth-config-fabric:26.1.154)
ModMenu 入口類別net.instantgratification.magnet.config.ModMenuIntegration
GUI 畫面輔助類別net.instantgratification.magnet.config.ClothConfigScreenHelper
類別載入安全隔離透過 GuiHelper.getOptionalFactory 隔離

📖 設定架構說明

在 Minecraft 26.1.2 中,Magnet, Let me get that! 整合了 Cloth Config FabricModMenu,提供乾淨優雅的遊戲內視覺化設定畫面。

java
public class ModMenuIntegration implements ModMenuApi {
    @Override
    public ConfigScreenFactory<?> getModConfigScreenFactory() {
        return GuiHelper.getOptionalFactory(
                "ig_magnet",
                "net.instantgratification.magnet.config.ClothConfigScreenHelper",
                "createFactory"
        );
    }
}

⚠️ 設定優先順序重要警告

⚠️ 重要提示
在 ModMenu 介面或 config/ig_magnet.json 中進行的修改僅影響新創建世界的基準預設值
若要修改當前已經創建並正在運行的世界設定,請使用遊戲內 ⚙️ 遊戲規則 GameRules 參考(透過 /gamerule 或原版遊戲規則編輯畫面)。


🗂️ 設定分類與可配置項目

Cloth Config 設定畫面 ("Magnet, Let me get that! Configuration")
  ├── 常規設定 (General Settings)
  │     ├── 磁吸啟用 (Magnet Enabled, 預設: true)
  │     ├── 磁吸範圍 (Magnet Range, 預設: 12, 範圍: 1..64)
  │     ├── 瞬間拾取 (Instant Pickup, 預設: false)
  │     └── 穿相移動 (Magnet Noclip, 預設: true)
  ├── 速度與牽引參數 (Speeds & Pull Heuristics)
  │     ├── 物品速度 (Item Speed, 預設: 80, 範圍: 1..1000)
  │     └── 物品加速度 (Item Acceleration, 預設: 10, 範圍: 1..1000)
  ├── 視線檢測 (Line of Sight)
  │     ├── 僅限視線可及 (Line of Sight Only, 預設: true)
  │     ├── 失去視線保持牽引 (Keep Moving if Unseen, 預設: true)
  │     ├── 透明方塊阻擋 (Blocked by Transparent, 預設: false)
  │     ├── 植被草叢阻擋 (Blocked by Flora, 預設: false)
  │     └── 方塊實體阻擋 (Blocked by Block Entities, 預設: false)
  └── 視覺效果與效能 (Visuals & Performance)
        ├── 吸引經驗球 (Attract XP Orbs, 預設: true)
        ├── 磁吸粒子特效 (Magnet Particles, 預設: true)
        ├── 粒子發射數量 (Particle Count, 預設: 1, 範圍: 0..100)
        └── 最大粒子源數 (Max Particle Sources, 預設: 5, 範圍: 0..100)

📄 原始 JSON 結構範例 (config/ig_magnet.json)

json
{
  "configVersion": 1,
  "enabled": true,
  "range": 12,
  "noClip": true,
  "affectsXp": true,
  "particles": true,
  "particleCount": 1,
  "maxParticleSources": 5,
  "speed": 80,
  "acceleration": 10,
  "instant": false,
  "losOnly": true,
  "keepMovingIfUnseen": true,
  "blockedByTransparent": false,
  "blockedByFlora": false,
  "blockedByBlockEntities": false
}

🔗 相關 Wiki 文件

Official documentation & web portal for Dasik Igaijinn mods.