Skip to content

設定とGUI連携 (MC 26.1.2)

本書では、Minecraft 26.1.2 における設定ファイルスキーマ、Cloth Config v2 GUI連携、ModMenuエントリーポイント、ワールド優先順位ルールを解説します。


📊 設定情報ボックス

項目
設定ファイルパスconfig/item-clumps.json
ファイル形式JSON (アトミックスワップ対応のGsonシリアライズ)
現在のスキーマ版configVersion: 1
設定GUIプロバイダーCloth Config v2 via ModMenu
優先順位ルール設定ファイルは新規ワールドの初期値、稼働中はGameRulesが優先

📄 JSONファイルスキーマ (config/item-clumps.json)

json
{
  "configVersion": 1,
  "enableClumping": true,
  "maxClumpSize": 9999,
  "renderLabels": true,
  "mergeRadius": 1
}

フィールド定義

JSONキー初期値説明
configVersionInteger1内部スキーマ移行トラッカー。
enableClumpingBooleantrueメガスタック結合機能の有効/無効。
maxClumpSizeInteger9999集約エンティティごとのアイテム上限 ($64$ 〜 $2,147,483,647$)。
renderLabelsBooleantrueアイテム上空に浮遊数量ラベルを表示。
mergeRadiusInteger1水平方向の探索半径 ($1$ 〜 $10$ ブロック)。

🖥️ グラフィカルUI (Cloth Config & ModMenu)

Item Clumps は Cloth Config v2 および ModMenu によるクライアント設定GUIをサポートしています:

java
// ModMenuIntegration.java (MC 26.1.2)
public class ModMenuIntegration implements ModMenuApi {
    @Override
    public ConfigScreenFactory<?> getModConfigScreenFactory() {
        if (net.fabricmc.loader.api.FabricLoader.getInstance().isModLoaded("cloth-config")) {
            return ClothConfigScreenHelper.createFactory();
        }
        return parent -> null;
    }
}

🔗 関連ドキュメント (MC 26.1.2)

Official documentation & web portal for Dasik Igaijinn mods.