本篇教程由作者设定未经允许禁止转载。
本教程原文件部分截取至官方wiki界面,汉化来源于本人汉化,仅供参考,如有错误,请指正,谢谢。
//效果文件是一个json文件,其工作原理如下:
{ "effects": [ { "type": "potion", "cooldown": "20", "min": 1, "max": 200, "potions": [ { "name": "minecraft:speed", "duration": "40", "amplifier": 1 } ] } ] }
//所有包含效果effects的数组,都需要一个类型来自定义想要给予的效果
以下是所有效果的列表:
Type: "potion" //药水
Description: (Allows to apply a potion Effect on to the player once he has certain weight level) //当玩家身上的重量达到一定数量时,对其施加药水效果
Arguments:
- "cooldown": (How long it should take until the effects get refreshed) //需要多长的时间才会刷新效果
- "min": (Which weight it should activate in.) DoubleNumber //激活该药水需要达到多少重量
- "max": (Which weight the effect should disable at) DoubleNumber //该药水效果在重量达到多少时禁用
- "percent": (If the Min/Max should be a counted as percentage instead of fixed weight values so values between 0-1 for 0% or 100%, defaults to false) Boolean
//如果最小值/最大值应该是百分百而不是固定重量计算,0%-100%需要介于0-1之间,默认关闭
- "effectRidden": (Allows to decide if a Player rides an Entity that it gets effected, default false) Boolean
//允许玩家是否骑着具有重量的实体,默认关闭
- "potions": (The Potion Effects that should be applied) ObjectArray or Object //应该给予的药水效果
- "name": (The Potion Registry name) //药水的注册名
- "duration": (How long the Potion Effect should last) //药水的持续时间
- "amplifier": (How Strong the Potion Effect should be) //药水的等级
- "particles": (If Particles should be seen or not) //是否能够看到粒子效果
Type: "attribute" //属性
Description: (Allows to modify the players Attributes) //允许修改玩家的属性
Arguments:
- "effect": (The Attribute of the Player that should be modified) String //应该修改的玩家属性
- "min": (Which weight it should activate in.) DoubleNumber //激活该药水需要达到多少重量
- "max": (Which weight the effect should disable at) DoubleNumber
- "percent": (If the Min/Max should be a counted as percentage instead of fixed weight values so values between 0-1 for 0% or 100%, defaults to false) Boolean
//如果最小值/最大值应该是百分百而不是固定重量计算,0%-100%需要介于0-1之间,默认关闭
- "effectRidden": (Allows to decide if a Player rides an Entity that it gets effected, default false) Boolean
//允许玩家是否骑着具有重量的实体,默认关闭
- "id": (The ID of the Modification(Unique ID)) String //需要修改玩家属性的id
- "amount": (How much it should be modified) DoubleNumber //需要修改多少
- "modifierType": (Which type of modification should be, 0 = basic addition, 1 = % Multiplier, 2 = Multiplier (Look up the MinecraftDoc that discribes it well)
//修改的属性需要以哪种形式体现,0=加法,1=百分百乘法,2=指数
Type: "exhaustion" //疲劳
Description: (Allows to apply extra exhaustion to the player making them more hungry) //增加玩家的攻击CD并且加快饥饿值消耗
Arguments:
- "amount": (How much Exhaustion should be added) FloatNumber //增加多少CD
- "cooldown": (How many ticks the game should be waiting between each exhaustion addition) IntNumber //每次消耗时需要间隔多少Tick
- "min": (Which weight it should activate in.) DoubleNumber //激活该药水需要达到多少重量
- "max": (Which weight the effect should disable at) DoubleNumber //该药水效果在重量达到多少时禁用
- "percent": (If the Min/Max should be a counted as percentage instead of fixed weight values so values between 0-1 for 0% or 100%, defaults to false) Boolean
//如果最小值/最大值应该是百分百而不是固定重量计算,0%-100%需要介于0-1之间,默认关闭
Type: "advancment" //高级
Description: (Allows to make a advancement cause that the player can hold more weight) //增加玩家的最大能够携带的重量
Arguments:
- "name": (The Advancment that is needed for this weight addition) String //增加重量所需要的条件
- "effectName": (Unique ID for the Weight Expansion) String //增加重量的唯一ID名称
- "amount": (How much it should modifier the weight) DoubleNumber //应该修改的重量
- "effectType": (Which type of modification should be, 0 = basic addition, 1 = % Multiplier, 2 = Multiplier (Look up the MinecraftDoc that discribes it well) IntNumber
//修改的属性需要以哪种形式体现,0=加法,1=百分百乘法,2=指数
Type: "damage" //伤害
Description: (Allows to damage the Player if a certain weight percentage is reached.) //在达到一定重量时伤害玩家一定的生命值
Arguments:
- "amount": (How much Damage it should deal) FloatNumber //应该给予多少伤害
- "cooldown": (How many between each damage to the player) IntNumber //玩家每次受到伤害时需要多久才能再次伤害
- "activation": (At how many % the Damage should activate, 100 = 100% weight, 0 = 0% weight) DoubleNumber
//伤害应该在重量达到多少时激活,100=但玩家重量达到100%时激活,0=一开始就激活
- "effectRidden": (Allows to decide if a Player rides an Entity that it gets effected, default false) Boolean
//允许玩家是否骑着具有重量的实体,默认关闭
Type: "potion_modify" //药水
Description: (Allows to temporary boost the Players Max Weight if he has a Potion Effect) //当玩家拥有某种药水时,能够在药水持续时间内增加其最大重量
Arguments:
- "name": (The Potion Registry effect name) String //药水的注册名
- "passive": (If the Effect should be passive or active (Only tickspeed. Passive does every 10 seconds a check (Performance), Default true) Boolean
//效果应该是主动的还是被动的(被动是每10tick检测一次,这会增加帧数,默认开启)
- "id": (Unique ID for the Weight Expansion) String //增加重量的唯一ID名称
- "amount": (How much it should modifier the weight) DoubleNumber //应该增加多少重量
- "effectType": (Which type of modification should be, 0 = basic addition, 1 = % Multiplier, 2 = Multiplier (Look up the MinecraftDoc that discribes it well) IntNumber
//修改的属性需要以哪种形式提现,0=加法,1=百分百乘法,2=指数
Type: "kill_ridden" //击杀
Description: (Allows to kill a Entity that a player rides if the weight is to high. (Filter based)) //如果玩家的重量超过坐骑能够承受的最大重量时,玩家骑乘的坐骑将会死亡
Arguments:
- "amount": (How much in Weight the Entity can carray) Double, //实体可以承受多少重量
- "name": (The Type of the Entity that it should check for. (Same as commands)) String, //应该检测的实体类型,与命令召唤时一致