我的世界自定義物品方法備忘
用自己的例子來簡要說明:
/give @p golden_helmet 基礎(chǔ)的指令,沒什么好說的。后面大括號里填寫自定義的內(nèi)容
{
display: 這一項里有Name 和 Lore 可填。前者是物品的名稱,后者可以寫點追加說明背景故事什么的。
{Name:'{"text":"戰(zhàn)狂冠冕","color":"#fafad2","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}', text后面是文本,color描述顏色,既可以用MC里的那些預(yù)設(shè)顏色,也可以使用16進制RGB代碼。之后的項分別描述了是否粗體、斜體、下劃線、刪除線、隨機字符??梢远疾惶睿藭r默認是斜體。
Lore:['{"text":"戴著它時弱點更加清晰","color":"yellow","italic":false}','{"text":"提升攻擊傷害","color":"green"}']}, lore和上述規(guī)則一致,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, 數(shù)值??梢允切?shù)。
Operation:0, 操作方式,0為加法,1為加成,2為單獨乘區(qū)加成。理解的話就是1好比都加的是原神的“元素傷害”,不同裝備的元素傷害加成加起來之后乘進公式,而2則每個都是不同的加成效果,全部乘算。1和2時,上述的Amont數(shù)值都是加成,比如Amont填0.3,那就是加成了30%,效果變?yōu)樵瓉淼?30%。
UUID:[I;1498693494,1027158888,1898994005,860320115] 不是很懂,反正就是讓你給你修改的這些效果一個UUID?但是命名規(guī)則是啥咱也不清楚。我想,改一下數(shù)字,不讓它重復(fù)就行了。
},
{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
節(jié)肢克星 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
經(jīng)驗修補: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 計算公式復(fù)雜,推薦用加成辦法修改
傷害 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":"戰(zhàn)狂冠冕","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":"戰(zhàn)狂胸甲","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":"戰(zhàn)狂護腿","color":"#fafad2","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}',
Lore:['{"text":"穿著它時你的下盤更加穩(wěn)固","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":"戰(zhàn)狂之靴","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":"戰(zhàn)狂冠冕","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]
}
]
}