Описание
# English
## Overview
This mod adds three powerful GUI-based visualization features to Carpet Mod, significantly improving the efficiency and user experience of configuring rules and designing systems with Carpet.
---
## Menu
Press **F9** (or your configured menu key)~~(v1.1.0 -) to open a mode selection menu, similar to **F3 + F4**.
~~
---
## Rule Screen

The Rule Screen provides a centralized view of all Carpet rules and vanilla Gamerules, offering a clear and comprehensive interface for browsing and managing them:
* **Full Rule Preview**: Displays all available states and values for each rule
* **State Comparison**: Highlights whether a rule has been modified in real time
* **Favorites**: Mark frequently used rules for quick access
* **Client-side Cache**:
Allows browsing rules in multiplayer even if the server does not have CarpetGUI installed
* **Save Configuration**: Press **Ctrl + S** to save the current rules as a rule group
> In multiplayer, the interface cannot be opened if the server does not have Carpet installed.
> For the full experience, it is recommended to install CarpetGUI on the server as well.
---
## Rule Group Screen

The Rule Group Screen displays user-defined rule groups and provides a fast and convenient way to switch configurations:
* **Batch Rule Execution**:
Select a saved rule group and click the button at the bottom-left to execute all included commands at once
* **Create Rule Group**:
Clicking **New** opens the Rule Screen described above. Changes made here are not applied immediately, but saved as a rule group. A save prompt will appear when exiting
* **Client-side Support**:
Can be used in multiplayer even if the server does not have CarpetGUI installed
> For the full experience, it is recommended to install CarpetGUI on the server as well.
---
## Rule History Screen

The Rule History Screen provides a lightweight, GitHub-like rule change tracking system, allowing switching, saving, and reverting configurations:
* **Track Rule Changes**:
Uses a stack-based model.
* **Push**: Saves the current rule state as a new layer
* **Revert**: Restores the previous state by removing the top layer
* **Manage Presets**:
Save rule configurations as presets for different environments and switch between them quickly
* **/rulestack Command**:
A helper command for servers that integrates with the Rule History Screen.
Usage mirrors the GUI. `/rulestack prefab` is used for managing presets
> In multiplayer, the interface cannot be opened if the server does not have CarpetGUI installed.
---
# 中文
## 总览
本模组为 Carpet Mod 提供了三个强大的 GUI 可视化功能,旨在显著提升玩家在进行规则配置与工程设计时的效率与使用体验。
---
## 菜单
按下 **F9**(或自定义菜单按键)~~(1.1.0 - ),将弹出一个类似 **F3 + F4** 的模式选择菜单。~~

---
## 规则界面

规则界面集中展示所有 Carpet 规则以及原版 Gamerule,提供直观、完整的浏览与管理能力:
* **完整规则预览**:清晰展示每条规则的所有可用状态与取值
* **状态对比**:实时标识规则是否被修改,便于快速定位变更
* **收藏功能**:支持标记常用规则,提高访问效率
* **客户端缓存**:
即使服务器未安装 CarpetGUI,也可以在多人游戏中浏览规则
* **保存配置**:按下 **Ctrl + S** 可将当前规则保存为规则组
> 在多人游戏中,如果服务器未安装 Carpet,则该界面无法打开。
> 为获得完整功能体验,建议在服务器端同时安装 CarpetGUI。
---
## 规则组界面

规则组界面展示玩家自定义的规则组,提供快速切换和批量配置能力:
* **批量执行规则**:
选择一个规则组,点击左下角按钮即可一键执行其中所有指令,实现批量修改 Carpet 规则
* **创建规则组**:
点击“新建”按钮将打开规则界面。此时对规则的修改不会立即应用,而是作为规则组保存;退出界面时会弹出保存提示
* **客户端支持**:
即使服务器未安装 CarpetGUI,也可以在多人游戏中使用
> 为获得完整功能体验,建议在服务器端同时安装 CarpetGUI。
---
## 规则记录界面

规则记录界面提供类似 GitHub 的轻量级规则变更管理系统,用于规则的切换、存档与回退:
* **规则变更存档**:
采用栈(Stack)结构管理规则状态:
* **Push**:保存当前规则状态(入栈)
* **Revert**:回退至上一个状态(出栈)
* **规则预设管理**:
可将不同环境所需规则保存为预设,实现快速切换
* **/rulestack 指令**:
与规则记录界面配合使用的服务器指令,功能与 GUI 基本一致
* `/rulestack prefab`:用于管理规则预设
> 在多人游戏中,如果服务器未安装 CarpetGUI,则该界面无法打开。