欢迎光临散文网 会员登陆 & 注册

我的世界自定义物品方法备忘

2021-02-15 03:42 作者:赵缘  | 我要投稿

用自己的例子来简要说明:


/give @p golden_helmet 基础的指令,没什么好说的。后面大括号里填写自定义的内容

{

display: 这一项里有Name 和 Lore 可填。前者是物品的名称,后者可以写点追加说明背景故事什么的。

{Name:'{"text":"战狂冠冕","color":"#fafad2","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}', text后面是文本,color描述颜色,既可以用MC里的那些预设颜色,也可以使用16进制RGB代码。之后的项分别描述了是否粗体、斜体、下划线、删除线、随机字符。可以都不填,此时默认是斜体。

Lore:['{"text":"戴着它时弱点更加清晰","color":"yellow","italic":false}','{"text":"提升攻击伤害","color":"green"}']}, lore和上述规则一致,lore里的不同项是不同的行。

Unbreakable:1, 这一条附上了不可破坏属性

Enchantments: 附魔。方括号里也可以什么都不填,即是没有附魔,和不写附魔指令效果相同。多一个选项总是更方便不是嘛。

[{id:"protection",lvl:5},{id:"respiration",lvl:5},{id:"aqua_affinity",lvl:1}],

AttributeModifiers: 自定义属性

[

{Slot:"head", Slot描述了这件物品在身上的哪个位置起效。共有mainhand,offhand,head,legs,chest,feet可选。

AttributeName:"generic.armor", AttributeName描述了是要修改的属性。附表在文章后面

Name:"hujia", 这里的Name是你自己起的名字

Amount: 3, 数值。可以是小数。

Operation:0, 操作方式,0为加法,1为加成,2为单独乘区加成。理解的话就是1好比都加的是原神的“元素伤害”,不同装备的元素伤害加成加起来之后乘进公式,而2则每个都是不同的加成效果,全部乘算。1和2时,上述的Amont数值都是加成,比如Amont填0.3,那就是加成了30%,效果变为原来的130%。

UUID:[I;1498693494,1027158888,1898994005,860320115] 不是很懂,反正就是让你给你修改的这些效果一个UUID?但是命名规则是啥咱也不清楚。我想,改一下数字,不让它重复就行了。

},

{Slot:"head",

AttributeName:"generic.armor_toughness",

Name:"hujia",

Amount: 3,

Operation:0,

UUID:[I;1498693494,1027158888,1898994005,860320115]

},

{Slot:"head",

AttributeName:"generic.attack_damage",

Name:"hujia",

Amount: 0.33,

Operation:2,

UUID:[I;1498693494,1027158888,1898994005,860320115]

}

]

}


附上附魔代码表:

装备

保护 protection 

火焰保护 fire_protection 

摔落保护 feather_falling 

爆炸保护 blast_protection 

弹射物保护 projectile_protection 

水下呼吸 respiration 

水下速掘 aqua_affinity 

荆棘 thorns 

深海探索者 depth_strider

冰霜行者 frost_walker 

武器

锋利 sharpness

亡灵杀手 smite

节肢克星 bane_of_arthropods

击退 knock_back

火焰附加 fire_aspect

抢夺 looting

横扫之刃 sweeping_edge

工具

效率 efficiency

精准采集 silk_touch

耐久 unbreaking 

时运 fortune

海之眷顾 luck_of_the_sea

钓饵 lure

弓箭

力量 power

冲击 punch

火矢 flame

无限 infinity

诅咒&宝藏

绑定诅咒 binding_curse

消失诅咒 vanishing_curse

经验修补:mending

冰霜行者 frost_walker

多重射击 multishot

穿透 piercing

快速装填 quick_charge

三叉戟

忠诚 loyalty

激流 riptide

引雷 channeling



自定义属性表:MC维基 https://minecraft-zh.gamepedia.com/%E5%B1%9E%E6%80%A7

简单搬运:

生命上限 generic.max_health 

击退抵抗 generic.knockback_resistance 取值0~1,1为霸体

移动速度 generic.movement_speed 计算公式复杂,推荐用加成办法修改

伤害 generic.attack_damage

盔甲值 generic.armor 作为参考,钻石套盔甲为3 8 6 3。

盔甲韧性 generic.armor_toughness 作为参考,钻石装备为2,下界合金为3

攻击速度 generic.attack_speed 作为参考,剑为1.6,徒手为4

幸运 generic.luck


补充实例:


/give @p golden_helmet

{

display:

{Name:'{"text":"战狂冠冕","color":"#fafad2","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}',

Lore:['{"text":"戴着它时能更清晰的看到敌人的弱点","color":"yellow","italic":false}','{"text":"提升攻击造成的伤害","color":"green"}']},

Unbreakable:1,

Enchantments:

[],

AttributeModifiers:

[

{Slot:"head",

AttributeName:"generic.armor",

Name:"hujia",

Amount: 3,

Operation:0,

UUID:[I;1498693494,1027158888,1898994005,860320115]

},

{Slot:"head",

AttributeName:"generic.armor_toughness",

Name:"hujia",

Amount: 3,

Operation:0,

UUID:[I;1498693494,1027158888,1898994005,860320115]

},

{Slot:"head",

AttributeName:"generic.attack_damage",

Name:"hujia",

Amount: 0.33,

Operation:2,

UUID:[I;1498693494,1027158888,1898994005,860320115]

},  有趣的一点是,最后一项后面有逗号也无所谓。这多少提供了一点便利——别小瞧这一点,破MC指令对格式要求可严格得很

]

}


/give @p golden_chestplate

{

display:

{Name:'{"text":"战狂胸甲","color":"#fafad2","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}',

Lore:['{"text":"穿着它时武器似乎变得更加轻便","color":"yellow","italic":false}','{"text":"提升攻击速度","color":"green"}']},

Unbreakable:1,

Enchantments:

[],

AttributeModifiers:

[

{Slot:"chest",

AttributeName:"generic.armor",

Name:"hujia",

Amount: 8,

Operation:0,

UUID:[I;1498693494,1027158888,1898994005,860320116]

},

{Slot:"chest",

AttributeName:"generic.armor_toughness",

Name:"hujia",

Amount: 4,

Operation:0,

UUID:[I;1498693494,1027158888,1898994005,860320116]

},

{Slot:"chest",

AttributeName:"generic.attack_speed",

Name:"hujia",

Amount: 0.33,

Operation:2,

UUID:[I;1498693494,1027158888,1898994005,860320116]

这里就没写逗号。格式更严谨了一些。

]

}


/give @p golden_leggings

{

display:

{Name:'{"text":"战狂护腿","color":"#fafad2","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}',

Lore:['{"text":"穿着它时你的下盘更加稳固","color":"yellow","italic":false}','{"text":"提升击退抗性","color":"green"}']},

Unbreakable:1,

Enchantments:

[],

AttributeModifiers:

[

{Slot:"legs",

AttributeName:"generic.armor",

Name:"hujia",

Amount: 6,

Operation:0,

UUID:[I;1498693494,1027158888,1898994005,860320117]

},

{Slot:"legs",

AttributeName:"generic.armor_toughness",

Name:"hujia",

Amount: 4,

Operation:0,

UUID:[I;1498693494,1027158888,1898994005,860320117]

},

{Slot:"legs",

AttributeName:"generic.knockback_resistance",

Name:"hujia",

Amount: 0.4,  这一条在游戏里会显示击退抗性+4。所以游戏里1点击退抗性是削弱10%的击退效果。

Operation:0,

UUID:[I;1498693494,1027158888,1898994005,860320117]

}

]

}


/give @p golden_boots

{

display:

{Name:'{"text":"战狂之靴","color":"#fafad2","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}',

Lore:['{"text":"穿着它可以更斗志昂扬的追击敌人","color":"yellow","italic":false}','{"text":"提升移动速度","color":"green"}']},

Unbreakable:1,

Enchantments:

[],

AttributeModifiers:

[

{Slot:"feet",

AttributeName:"generic.armor",

Name:"hujia",

Amount: 3,

Operation:0,

UUID:[I;1498693494,1027158888,1898994005,860320118]

},

{Slot:"feet",

AttributeName:"generic.armor_toughness",

Name:"hujia",

Amount: 3,

Operation:0,

UUID:[I;1498693494,1027158888,1898994005,860320118]

},

{Slot:"feet",

AttributeName:"generic.movement_speed",

Name:"hujia",

Amount: 0.4,  

Operation:2, 移动速度+40%。这不会像喝了药水一样给你一个图标,但默认还是会造成视野的变化

UUID:[I;1498693494,1027158888,1898994005,860320118]

}

]

}



/give @p golden_helmet

{

display:

{Name:'{"text":"战狂冠冕","color":"#fafad2","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}',

Lore:['{"text":"戴着它时弱点更加清晰","color":"yellow","italic":false}','{"text":"提升攻击伤害","color":"green"}']},

Unbreakable:1,

Enchantments:

[{id:"protection",lvl:5},{id:"respiration",lvl:5},{id:"aqua_affinity",lvl:1}],  进来一些附魔效果。

AttributeModifiers:

[

{Slot:"head",

AttributeName:"generic.armor",

Name:"hujia",

Amount: 3,

Operation:0,

UUID:[I;1498693494,1027158888,1898994005,860320115]

},

{Slot:"head",

AttributeName:"generic.armor_toughness",

Name:"hujia",

Amount: 3,

Operation:0,

UUID:[I;1498693494,1027158888,1898994005,860320115]

},

{Slot:"head",

AttributeName:"generic.attack_damage",

Name:"hujia",

Amount: 0.33,

Operation:2,

UUID:[I;1498693494,1027158888,1898994005,860320115]

}

]

}




我的世界自定义物品方法备忘的评论 (共 条)

分享到微博请遵守国家法律