MoreRequirement 为 Tetra 添加了以下要求:
要求
"mr:advancement"
└ advancement (Required) String
检查玩家是否已获得该进度。
示例:
"requirement":{
"type":"mr:advancement",
"advancement":"minecraft:end/find_end_city"
}
"mr:biome"
└ biome (Required) String
检查工作站是否位于指定的生物群系中。
示例:
"requirement":{
"type":"mr:biome",
"biome":"minecraft:end_highlands"
}
"mr:mbd"
├ blocks (Required) Map<String,Integer>
│ 检查在给定范围内是否存在指定数量的方块。
├ x (Optional) Integer
│ 从工作站沿 X 轴延伸的距离(两个方向)。
├ y (Optional) Integer
│ 从工作站沿 Y 轴延伸的距离(两个方向)。
└ z (Optional) Integer
从工作站沿 Z 轴延伸的距离(两个方向)。
示例:
"requirement":{
"type":"mr:mbd",
"x":5,
"y":5,
"z":5,
"blocks":{
"minecraft:end_portal_frame":10,
"minecraft:end_stone":5
}
}
"mr:entities"
├ entities (Required) Map<String,Integer>
│ 检查在给定范围内是否存在指定数量的实体。
├ x (Optional) Integer
│ 从工作站沿 X 轴延伸的距离(两个方向)。
├ y (Optional) Integer
│ 从工作站沿 Y 轴延伸的距离(两个方向)。
└ z (Optional) Integer
从工作站沿 Z 轴延伸的距离(两个方向)。
示例:
"requirement":{
"type":"mr:entities",
"x":5,
"y":5,
"z":5,
"entities":{
"pig":10
}
}
"mr:dimension"
└ dimension (Required) String
要检查的维度 ID。
示例:
"requirement":{
"type":"mr:dimension",
"dimension":"the_end"
}
"mr:height"
├ min (Optional) Integer
│ 工作站的最低所需 Y 等级(默认值:-99)。
└ max (Optional) Integer
工作站的最高所需 Y 等级(默认值:333)。
示例:
"requirement":{
"type":"mr:height",
"min":255
}
"mr:moon_phase"
└ moonPhase (Required) Integer
月相,有效值为 [1~8] 范围内的整数。
示例:
"requirement":{
"type":"mr:moon_phase",
"moonPhase":"1"
}
"mr:potion"
├ effect (Required) String
│ 要检查的药水效果 ID。
├ duration (Optional) Integer
│ 最低所需持续时间(以刻为单位,默认值:0)。
└ amplifier (Optional) Integer
最低所需强化等级(0 = I 级,与命令语法一致;默认值:0)。
示例:
"requirement":{
"type":"mr:potion",
"effect":"minecraft:darkness",
"duration":200
}
"mr:see_sky"
└ 无需参数。如果工作站暴露在天空下则返回 true。
示例:
"requirement":{
"type":"mr:see_sky"
}
"mr:time"
└ time (Required) String
有效选项:
├ "day" – 白天
└ "night" – 夜晚
示例:
"requirement":{
"type":"mr:time",
"time":"day"
}
"mr:other_module"
将要求检查重定向到指定槽位中的模组。
├ slot (Required) String
│ 目标槽位标识符。
└ requirement (Required) Requirement
在目标模组上评估的另一个要求。
示例:
"requirement":{
"type":"mr:other_module",
"slot":"sword/hilt",
"requirement": {
"type": "tetra:improvement",
"improvement": "hilt_hone/damage"
}
}
"mr:weather"
└ weather (Required) String
有效选项:
├ "clear" – 晴天
├ "rain" – 下雨
└ "thunder" – 雷暴
示例:
"requirement":{
"type":"mr:weather",
"weather":"test"
}
"mr:custom" (新版本)
此要求本身不执行任何操作,始终返回 true。
你可以使用 KubeJS 实现自定义逻辑。
它使用“key”进行识别,允许你自由定义多个自定义要求。
本地化键为:"more_requirement.holo.custom_requirement.key"(将“key”替换为你在数据包中定义的键)。
// In startup_scripts
let $CustomRequirement = Java.loadClass('net.yiran.morerequirement.requirements.CustomRequirement');
$CustomRequirement.registerCustomFunction("key", cxt => true);
示例:
"requirement":{
"type":"mr:custom",
"key":"key"
}
"mr:custom" (旧版本 – 自 1.0.3 起已弃用)
此要求本身不执行任何操作,始终返回 true。
你可以使用 KubeJS 实现自定义逻辑。
// In startup_scripts
let $CustomRequirement = Java.loadClass('net.yiran.morerequirement.requirements.CustomRequirement');
$CustomRequirement.setCustomFunction(cxt => true);
示例:
"requirement":{
"type":"mr:custom"
}
"mr:group"
[见下文了解如何定义组]
├ key (Required) String
│ 用于检索特定的组。
└ hideExtend (Optional) Boolean
是否隐藏组的各个条件(默认值:false)。
示例:
"requirement":{
"type":"mr:group",
"group":"test"
}</code></pre>
<h3>Group</h3>
<hr>
<p>将组定义文件放置在 <code>data/morerequirement/group/</code> 中。</p>
<pre><code>├ requirements (Required) Requirement[]
│ 引用此组时需检查的要求列表。所有要求都必须通过。
├ key (Optional) String
│ 默认情况下,key 会自动分配为组文件夹下的文件路径。
│ 例如,"group/test/a.json" 默认的 key 为 "test/a"。
│ 你可以手动指定自定义 key。
├ translation (Optional) String
│ 本地化键。默认为 "more_requirement.group." + key。
└ hideExtend (Optional) Boolean
是否隐藏组的单独条件(默认:false)。</code></pre>
<p>示例:</p>
<pre><code>{
"key": "test",
"requirements": [
{
"type": "mr:mbd",
"blocks": {
"minecraft:chain": 8,
"minecraft:birch_stairs": 12,
"minecraft:stripped_birch_log": 9
}
},
{
"type": "mr:see_sky"
},
{
"type": "mr:weather",
"weather": "clear"
},
{
"type": "mr:height",
"min": 200
}
]
}</code></pre>
<p>你还可以在其他组内嵌套组:</p>
<pre><code>{
"key": "combination_test",
"requirements": [
{
"type": "mr:group",
"key": "test1"
},
{
"type": "mr:group",
"key": "test2",
"hideExtend": true
}
]
}</code></pre>
MoreRequirement has added the following requirements for Tetra:
Requirements
"mr:advancement"
└ advancement (Required) String
Checks whether the player has this advancement.
Example:
"requirement":{
"type":"mr:advancement",
"advancement":"minecraft:end/find_end_city"
}
"mr:biome"
└ biome (Required) String
Checks whether the workstation is located in the specified biome.
Example:
"requirement":{
"type":"mr:biome",
"biome":"minecraft:end_highlands"
}
"mr:mbd"
├ blocks (Required) Map<String,Integer>
│ Checks whether the specified number of blocks exists within a given range.
├ x (Optional) Integer
│ Distance to extend along the X-axis from the workstation (both directions).
├ y (Optional) Integer
│ Distance to extend along the Y-axis from the workstation (both directions).
└ z (Optional) Integer
Distance to extend along the Z-axis from the workstation (both directions).
Example:
"requirement":{
"type":"mr:mbd",
"x":5,
"y":5,
"z":5,
"blocks":{
"minecraft:end_portal_frame":10,
"minecraft:end_stone":5
}
}
"mr:entities"
├ entities (Required) Map<String,Integer>
│ Checks whether the specified number of entities exists within a given range.
├ x (Optional) Integer
│ Distance to extend along the X-axis from the workstation (both directions).
├ y (Optional) Integer
│ Distance to extend along the Y-axis from the workstation (both directions).
└ z (Optional) Integer
Distance to extend along the Z-axis from the workstation (both directions).
Example:
"requirement":{
"type":"mr:entities",
"x":5,
"y":5,
"z":5,
"entities":{
"pig":10
}
}
"mr:dimension"
└ dimension (Required) String
The dimension ID to check against.
Example:
"requirement":{
"type":"mr:dimension",
"dimension":"the_end"
}
"mr:height"
├ min (Optional) Integer
│ Minimum required Y-level for the workstation (default: -99).
└ max (Optional) Integer
Maximum required Y-level for the workstation (default: 333).
Example:
"requirement":{
"type":"mr:height",
"min":255
}
"mr:moon_phase"
└ moonPhase (Required) Integer
Moon phase, valid values are in the range [1~8].
Example:
"requirement":{
"type":"mr:moon_phase",
"moonPhase":"1"
}
"mr:potion"
├ effect (Required) String
│ The ID of the potion effect to check.
├ duration (Optional) Integer
│ Minimum required duration in ticks (default: 0).
└ amplifier (Optional) Integer
Minimum required amplifier level (0 = level I, consistent with command syntax; default: 0).
Example:
"requirement":{
"type":"mr:potion",
"effect":"minecraft:darkness",
"duration":200
}
"mr:see_sky"
└ No parameters required. Returns true if the workstation is exposed to the sky.
Example:
"requirement":{
"type":"mr:see_sky"
}
"mr:time"
└ time (Required) String
Valid options:
├ "day" – daytime
└ "night" – nighttime
Example:
"requirement":{
"type":"mr:time",
"time":"day"
}
"mr:other_module"
Redirects the requirement check to a module in the specified slot.
├ slot (Required) String
│ Target slot identifier.
└ requirement (Required) Requirement
Another requirement to evaluate on the target module.
Example:
"requirement":{
"type":"mr:other_module",
"slot":"sword/hilt",
"requirement": {
"type": "tetra:improvement",
"improvement": "hilt_hone/damage"
}
}
"mr:weather"
└ weather (Required) String
Valid options:
├ "clear" – clear weather
├ "rain" – raining
└ "thunder" – thunderstorm
Example:
"requirement":{
"type":"mr:weather",
"weather":"test"
}
"mr:custom" (New Version)
This requirement does nothing by itself and always returns true.
You can implement custom logic using KubeJS.
It uses a "key" for identification, allowing you to define multiple custom requirements freely.
The localization key is: "more_requirement.holo.custom_requirement.key" (replace "key" with the one you defined in your datapack).
// In startup_scripts
let $CustomRequirement = Java.loadClass('net.yiran.morerequirement.requirements.CustomRequirement');
$CustomRequirement.registerCustomFunction("key", cxt => true);
Example:
"requirement":{
"type":"mr:custom",
"key":"key"
}
"mr:custom" (Legacy Version – Deprecated since 1.0.3)
This requirement does nothing by itself and always returns true.
You can implement custom logic using KubeJS.
// In startup_scripts
let $CustomRequirement = Java.loadClass('net.yiran.morerequirement.requirements.CustomRequirement');
$CustomRequirement.setCustomFunction(cxt => true);
Example:
"requirement":{
"type":"mr:custom"
}
"mr:group"
[See below for how to define groups]
├ key (Required) String
│ Used to retrieve the specific group.
└ hideExtend (Optional) Boolean
Whether to hide the group's individual conditions (default: false).
Example:
"requirement":{
"type":"mr:group",
"group":"test"
}
Group
Place group definition files in data/morerequirement/group/.
├ requirements (Required) Requirement[]
│ A list of requirements to check when this group is referenced. All must pass.
├ key (Optional) String
│ By default, the key is automatically assigned as the file path under the group folder.
│ For example, "group/test/a.json" defaults to key "test/a".
│ You may manually specify a custom key.
├ translation (Optional) String
│ Localization key. Defaults to "more_requirement.group." + key.
└ hideExtend (Optional) Boolean
Whether to hide the group's individual conditions (default: false).
Example:
{
"key": "test",
"requirements": [
{
"type": "mr:mbd",
"blocks": {
"minecraft:chain": 8,
"minecraft:birch_stairs": 12,
"minecraft:stripped_birch_log": 9
}
},
{
"type": "mr:see_sky"
},
{
"type": "mr:weather",
"weather": "clear"
},
{
"type": "mr:height",
"min": 200
}
]
}
You can also nest groups within other groups:
{
"key": "combination_test",
"requirements": [
{
"type": "mr:group",
"key": "test1"
},
{
"type": "mr:group",
"key": "test2",
"hideExtend": true
}
]
}
评论 0
登录后参与评分
还没有评论,来抢沙发吧