本篇教程由作者设定未经允许禁止转载。
基本格式详见此处
{ "block_pools" : [ { "name": "XXX", "type": { "type": "block", "name": "minecraft:nether_brick" }, "clicktype": "both", "properties": [ { "type": "require_sneak" } ], "drops": [ { "name": "minecraft:iron_ingot" } ] } ] }
这是一段最基本的脚本,
"properties"为条件,所有条件都以 {"type":"什么条件"}组成
条件有
{"type": "add_hunger","exhaustion": "true","amount": "0.5f"} 减饥饿值0.5(半个鸡腿)
{"type": "require_empty_hand" } 需要空手
加入冷却时间(括号里的字不在脚本内)
{
"type":"playercooldown"(意为玩家冷却),
"time"(意为时间): 40(为40Tick,就是两秒)
}
加上前面的基本脚本就是这样
{ "block_pools" : [ { "name": "XXX", "type": { "type": "block", "name": "minecraft:nether_brick" }, "clicktype": "left", "properties": [ { "type": "require_sneak" },{"type":"playercooldown", "time": 40}], "drops": [ { "name": "minecraft:iron_ingot" } ] } ] }
整段为用左手撸下界砖块掉铁锭,需蹲下,冷却为2秒
打开游戏,用/scavenge reload重载一下,如果聊天框里是No Error Found,就没事了。