Action Regulator
Action Regulator 是一款多功能的 Minecraft 模组,赋予你屏蔽特定游戏内操作的能力。
通过简洁直观的界面,你可以轻松配置精确的规则,以限制你希望阻止的任何行为。
Action Regulator 目前处于早期开发阶段,可能包含错误。请勿在未预先测试的情况下依赖它来执行关键的操作屏蔽。如果遇到任何错误,请通过 Issue Tracker 报告。
如果你在使用或理解用户界面时遇到任何困难,欢迎提交 UI 改进建议!
功能
Action Regulator 允许你创建和管理自定义规则。每条规则由一个主要触发器和多个注册表列表及子条件组成,使你能够精确定义应屏蔽操作的 circumstances。
要屏蔽某项操作,必须满足所有配置的条件、注册表列表和子条件。
目前有两个主要的 触发器 (Triggers):
- Attack(攻击)(左键点击)
- Use(使用)(右键点击)
每条规则针对 方块 (Blocks) 或 实体 (Entities),并且可以额外根据你手中的物品进行过滤。
你还可以选择 Item/Block/Entity 标签,一次性选择多种物品/方块/实体(例如所有类型的木材)。
一个没有列出目标方块或实体的 Use 规则也会屏蔽消耗类物品(食物、药水等)。
你可以在这些列表的行为之间切换 默认 (Default) 和 反转 (Inverted) 模式:
| 模式 |
空列表 |
包含条目的列表 |
| 默认 |
对所有物品/方块/实体生效。 |
仅对列出的物品/方块/实体生效。 |
| 反转 |
对无物品/方块/实体生效。 |
对所有物品/方块/实体生效,除了列出的那些。 |
子条件 (Subconditions)
为了使你的规则更加精确,注册表列表支持子条件。
手持物品子条件:
- 手 (Hand): 选择 Both(双手)、Mainhand(主手)或 Offhand(副手)。
- 耐久度 (Durability): 选择高于或低于某个 剩余 耐久度阈值。无法受损的物品不受此条件影响。
- 自定义名称模式 (Custom Name Mode): 按 Filter(过滤器)、Regex Filter(正则表达式过滤器)、Custom Name(自定义名称) 或 Default Name(默认名称) 匹配。
- 自定义名称过滤器 (Custom Name Filter)
- 模式 → 过滤器 (Filter): 指定物品名称必须包含的文本。
- 模式 → 正则表达式过滤器 (Regex Filter): 指定物品名称必须匹配的正则表达式。
- 附魔 (Enchantments): 手持物品必须携带的一组附魔。它遵循与其他注册表列表相同的 默认 (Default)/反转 (Inverted) 表格,当物品具有列表中 任意 附魔时匹配。
- 已附魔 (Enchanted): 根据物品是否已附魔来限制规则,有三种模式:
- 忽略 (Ignored): 是否存在附魔不影响规则。
- 需要 (Required): 规则仅在物品至少有一个附魔时适用。
- 禁止 (Forbidden): 规则仅在物品没有任何附魔时适用。
目标实体子条件:
- 自定义名称模式 (Custom Name Mode): 按 Filter(过滤器)、Regex Filter(正则表达式过滤器)、Custom Name(自定义名称) 或 Default Name(默认名称) 匹配。
- 自定义名称过滤器 (Custom Name Filter)
- 模式 → 过滤器 (Filter): 指定实体名称必须包含的文本。
- 模式 → 正则表达式过滤器 (Regex Filter): 指定实体名称必须匹配的正则表达式。
目标方块子条件:
- 被水填充 (Waterlogged): 根据目标方块是否被水填充来限制规则,有三种模式:
- 忽略 (Ignored): 方块状态不影响规则。
- 需要 (Required): 规则仅在目标方块被水填充时适用。
- 禁止 (Forbidden): 规则仅在目标方块未被水填充时适用。
其他规则选项
- 维度选择器 (Dimension Selector): 将规则限制在特定维度(例如仅在下界生效)。未选择维度的规则在任何地方都不生效。
- 玩家条件 (Player Conditions): 将规则限制在玩家的当前状态:
- 鞘翅飞行 (Elytra Flying) 和 游泳 (Swimming),每种状态都有三种模式:
- 忽略 (Ignored): 状态不影响规则。
- 需要 (Required): 规则仅在状态激活时适用(例如 仅 在飞行时屏蔽攻击)。
- 禁止 (Forbidden): 规则仅在状态未激活时适用。
- 游戏模式 (Game Mode): 选择规则适用的游戏模式(生存、创造、冒险、旁观者)。
规则仅在处于所选模式之一时适用。
- 生命值 (Health)(以心为单位)和 饥饿值 (Hunger)(以食物点为单位),每种属性都有三种模式:
- 忽略 (Ignored): 数值不影响规则。
- 高于 (Above): 规则仅在达到或超过阈值时适用。
- 低于 (Below): 规则仅在达到或低于阈值时适用。
- 通知 (Notifications): 当规则屏蔽了某些内容时获取提示。可以通过 声音 (Sound)、热键栏上方的红色 符号 (Symbol) 或该位置的自定义 文本 (Text) 获得通知。当然也可以保持 关闭 (Off)。
其他选项
- 全局覆盖快捷键 (Global Override Hotkey): 按住覆盖快捷键(默认为
Right Alt)可临时停用所有 Action Regulator 规则。
共享与导出
规则可以单独导出和导入为 JSON 文件。这使得与他人分享你的自定义配置或在不同整合包之间同步配置变得极其容易。
注意:如果你导入的是旧版本模组创建的规则,Action Regulator 将尝试将其自动迁移到当前版本。但是,强烈建议保持模组更新以确保最大兼容性。
未来计划
Action Regulator 仍处于非常早期的开发阶段,许多功能和改进已计划在未来的版本中推出。以下是一些可能在未来实现的重要功能:
- 更多玩家条件(例如,状态效果)。
- 改进的通知系统(例如,方块名称模板、Minecraft 文本格式等)。
如果您有任何关于功能或改进的建议,欢迎提交一个功能请求问题!
兼容性
Action Regulator 专为最新版本的 Minecraft 构建
模组兼容性:
- 与 Preventer 兼容
- 与大多数添加物品/方块/实体的模组兼容。只要它们遵循正常的添加方式,这些内容应该可以在注册表列表中选择。
我目前没有计划为其他加载器(如 Forge)提供支持,也不打算积极支持除最新版本之外的 Minecraft 版本。
依赖项
Action Regulator
Action Regulator is a versatile Minecraft mod that gives you the power to block specific in-game actions.
Through a clean and intuitive interface, you can easily configure precise rules to restrict exactly what you want.
Action Regulator is currently in early development and may contain bugs. Please do not rely on it for critical action-blocking without prior testing. If you encounter any bugs, please report them via the Issue Tracker
If you experience any difficulties using or understanding the user interface, feel free to open a UI-improvement issue with your suggestions!
Features
Action Regulator lets you create and manage custom rules. Each rule consists of a primary trigger and multiple registry lists and subconditions that allow you to precisely define the circumstances under which an action should be blocked.
For an action to be blocked, all configured conditions, registry lists, and subconditions must be met.
Currently, there are two primary Triggers:
- Attack (Left-clicking)
- Use (Right-clicking)
Each rule targets either Blocks or Entities, and can additionally filter on the item in your hand.
You can also select Item/Block/Entity tags to select multiple items/blocks/entities at once (e.g., all types of wood).
A Use rule that has no target blocks or entities listed also blocks consuming items (food, potions, ...)
You can toggle the behavior of these lists between Default and Inverted:
| Mode |
Empty List |
List with Entries |
| Default |
Activates for all items/blocks/entities. |
Activates only for the listed items/blocks/entities. |
| Inverted |
Activates for no items/blocks/entities. |
Activates for all items/blocks/entities except the listed ones. |
Subconditions
To make your rules even more precise, registry lists support subconditions.
Hand Item Subconditions:
- Hand: Choose between Both, Mainhand, or Offhand.
- Durability: Chose above or below a certain threshold of remaining durability. Items that cannot take
damage are not affected by this condition.
- Custom Name Mode: Match by Filter, Regex Filter, Custom Name, or Default Name.
- Custom Name Filter
- Mode → Filter: Specify text the item name must contain.
- Mode → Regex Filter: Specify a regular expression the item name must match.
- Enchantments: A list of enchantments the hand item must carry. It follows the
same Default/Inverted table as the other registry lists, matching when the item has any of the
listed enchantments.
- Enchanted: Restrict the rule based on whether the item is enchanted at all, with three modes:
- Ignored: Enchantment presence does not affect the rule.
- Required: The rule only applies while the item has at least one enchantment.
- Forbidden: The rule only applies while the item has no enchantments.
Target Entity Subconditions:
- Custom Name Mode: Match by Filter, Regex Filter, Custom Name, or Default Name.
- Custom Name Filter
- Mode → Filter: Specify text the entity name must contain.
- Mode → Regex Filter: Specify a regular expression the entity name must match.
Target Block Subconditions:
- Waterlogged: Restrict the rule based on whether the target block is waterlogged, with three modes:
- Ignored: The block state does not affect the rule.
- Required: The rule only applies while the target block is waterlogged.
- Forbidden: The rule only applies while the target block is not waterlogged.
Additional Rule Options
- Dimension Selector: Restrict rules to specific dimensions (e.g. only active in the Nether). A rule with no
dimension selected never applies anywhere.
- Player Conditions: Restrict rules to the player's current state:
- Elytra Flying and Swimming, each with three modes:
- Ignored: The state does not affect the rule.
- Required: The rule only applies while the state is active (e.g. block attacks only while flying).
- Forbidden: The rule only applies while the state is inactive.
- Game Mode: Select which game modes (Survival, Creative, Adventure, Spectator) the rule applies in.
The rule only applies while in one of the selected modes.
- Health (in hearts) and Hunger (food points), each with three modes:
- Ignored: The value does not affect the rule.
- Above: The rule only applies while at or above the threshold.
- Below: The rule only applies while at or below the threshold.
- Notifications: Get told when a rule blocked something. Either by a Sound, a red Symbol above the
hotbar, or your own Text in that same spot. Of course it can also stay Off.
Additional Options
- Global Override Hotkey: Hold down the override hotkey (Default:
Right Alt) to temporarily deactivate all Action Regulator rules.
Sharing & Exporting
Rules can be individually exported and imported as JSON files. This makes it incredibly easy to share your custom configurations with others or sync them across different modpacks.
Note: If you import a rule created in an older version of the mod, Action Regulator will attempt to auto-migrate it to the current version. However, keeping the mod updated is highly recommended to ensure maximum compatibility.
Future Plans
Action Regulator is still in very early development and there are many features and improvements already planned for future versions. Here are some of the most important ones which may or may not come in the future:
- More player conditions (e.g., Status Effects).
- Improved notification system (e.g., templates for block names, Minecraft text formatting, etc.).
If you have any suggestions for features or improvements, feel free to open a feature request issue!
Compatibility
Action Regulator is built for the latest version of Minecraft
Mod Compatibility:
- Compatible with Preventer
- Compatible with most mods that add items/blocks/entities. As long as they follow the normal way for adding these they should be selectable in the registry lists.
I currently have no plans to add support for other mod loaders like Forge or active support for versions other than the latest Minecraft version.
Dependencies
评论 0
登录后参与评分
还没有评论,来抢沙发吧