贴图和模型路径
首先来说贴图和模型文件位置,跟拔刀剑1差不多
1.用解压工具打开拔刀剑mod.jar本体
2.进入压缩包中目录/assets/slashblade/model
3.然后就可以把贴图和模型文件丢进去了,但推荐先建一个资料夹再丢,档案名字随意(但要是英文)
合成配方路径
有了外观之后,再来添加它的合成配方
1.用解压工具打开拔刀剑mod.jar本体
2.进入压缩包中目录/data/slashblade/recipes
3.在里面创建一个json档案,但推荐先建一个资料夹再丢,档案名字随意(但要是英文)
添加合成配方
接下来涉及到MC本身的json格式,比较复杂,所以就直接贴模板上来,照着改就行
{"type":"minecraft:crafting_shaped","pattern":[
"#ND",
"RSL",←对应工作台的格子
"ICG"
],"key": {
↓以下9行为合成配方,对应上面的9格(具体详情请见"关于合成配方")
"#":{"item":"minecraft:emerald_block"},
"N":{"item":"minecraft:netherite_block"},
"D":{"item":"minecraft:diamond_block"},
"R":{"item":"minecraft:redstone_block"},
"S":{"item":"slashblade:proudsoul_sphere"},
"L":{"item":"minecraft:lapis_block"},
"I":{"item":"minecraft:iron_block"},
"C":{"item":"minecraft:coal_block"},
"G":{"item":"minecraft:gold_block"}
},"result":{"item":"slashblade:slashblade","nbt":{"ForgeCaps":{"slashblade:bladestate":{"Energy":0,"State":{"ShareTag":{},
"translationKey":"item.slashblade.custom.dios",←内部id,也是拔刀的名字(需到lang档解码)
"TextureName":"slashblade:model/named/custom/dios/texture.png",←贴图路径
"ModelName":"slashblade:model/named/custom/dios/model.obj",←模型路径
"SummonedSwordColor":-13421569,←刀光颜色(十進制,可到這选SA颜色后生成命令,然后复制SummonedSwordColor:后面那一串数字)
"rarityType":3,←名字颜色,0=白色,1=黄色,2=蓝色,3=紫色
"baseAttackModifier":1.0,←攻击基础值
"AttackAmplifier":0.0,←攻击加成
"RepairCounter":0,←锻造数
"isSealed":0,←是否像白鞘一样断刀后无法用刀魂复原,0=否,1=是
"isDestructable":0,←是否像木偶一样,断刀后整把刀消失,0=否,1=是
"isNoScabbard":0,←是否有鞘(仅影响第一人称视角和物品栏图标),0=有,1=无
"isBroken":0←是否为断刀(仅影响预设状态,不影响合成),0=否,1=是
}}},"id":"slashblade:slashblade","Count":1,"tag":{"ShareTag":{}}}}}
添加合成配方(箱子版)
{"type":"minecraft:crafting_shaped","pattern":[
"#ND",
"RcL",
"ICG"
],"key":{
"#":{"item":"minecraft:emerald_block"},
"N":{"item":"minecraft:netherite_block"},
"D":{"item":"minecraft:diamond_block"},
"R":{"item":"minecraft:redstone_block"},
"c":{"item":"minecraft:chest"},
"L":{"item":"minecraft:lapis_block"},
"I":{"item":"minecraft:iron_block"},
"C":{"item":"minecraft:coal_block"},
"G":{"item":"minecraft:gold_block"}
},"result":{
"item":"minecraft:chest",←可以不用箱子,用其它物品替代
"nbt":{"RequiredBlade":{
"broken":0,←锻造合成用的刀是否需为断刀,0=否,1=是
"result":{"ForgeCaps":{"slashblade:bladestate":{"Energy":0,"State":{"ShareTag":{},
"translationKey":"item.slashblade.custom.dios",
"TextureName":"slashblade:model/named/custom/dios/texture.png",
"ModelName":"slashblade:model/named/custom/dios/model.obj",
"SummonedSwordColor":-13421569,
"rarityType":3,
"baseAttackModifier":1.0,
"AttackAmplifier":0.0,
"RepairCounter":0,
"isSealed":0,
"isDestructable":0,
"isNoScabbard":0,
"isBroken":0
}}},"id":"slashblade:slashblade","Count":1,"tag":{"ShareTag":{}}},
"level":20,←锻造合成所需等级
"killCount":0,←锻造合成所需斩杀数
"refine":0,←锻造合成所需锻造数
"noScabbard":0,←是否要鞘(可用作特殊合成配方)
"translationKey":"item.slashblade.simple.iron"←锻造合成用的刀(可用自定拔刀的id)
},
以下为箱子的内容物,基本上把合成配方的东西复制上来就好,当然也可以选择不管,把整大段删掉就好
"BlockEntityTag":{"Items":[
{"Slot":3,←在箱子的第几格(下面7个也一样)
"id":"minecraft:emerald_block",←物品(下面7个也一样)
"Count":1},←数量(下面7个也一样)
{"Slot":4,
"id":"minecraft:netherite_block",
"Count":1},
{"Slot":5,
"id":"minecraft:diamond_block",
"Count":1},
{"Slot":12,
"id":"minecraft:redstone_block",
"Count":1},
{"Slot":14,
"id":"minecraft:lapis_block",
"Count":1},
{"Slot":21,
"id":"minecraft:iron_block",
"Count":1},
{"Slot":22,
"id":"minecraft:coal_block",
"Count":1},
{"Slot":23,
"id":"minecraft:gold_block",
"Count": 1}]
},"display":{
"Name":"{\"translate\":\"item.slashblade.custom.dios.material\"}"},←箱子的名字(需到lang档解码,注意"逗点")
锻造合成所需的附魔,不用的话要把整行删掉(记得把上一行最后的"逗点"删掉)↓
"Enchantments":[{"lvl":2,"id":"minecraft:smite"},{"lvl":2,"id":"minecraft:fire_aspect"}]
}}}
关于合成配方
假设想把合成配方改的跟拔刀剑1的自定义拔刀一样
"# ",
" S ",←除了#以外的格子可用任意大小写英文字母更改,但没用到的格子要用"空格"取代,
" s"
],"key": {
"#":{"item":"slashblade:proudsoul_tiny"},
"S":{"item":"slashblade:slashblade"},←上面没有的下面也要删掉
"s":{"item":"slashblade:proudsoul_sphere"}
假设想把合成配方改的跟拔刀剑1的千鹤一样可是中间的是无铭欸
"###",
"#S#",←同样的东西用相同的字符
"###"
],"key": {
"#":{"item":"slashblade:proudsoul_sphere"}, ←同样的东西打一遍就好
"S":{"item":"slashblade:slashblade"},
这样拔刀就能出现了,但如果还想给它加个成就的话
添加成就
1.用解压工具打开拔刀剑mod.jar本体
2.进入压缩包中目录/data/slashblade/advancements/blade
3.在里面创建一个json档案,但推荐先建一个资料夹再丢,档案名字随意(但要是英文)
一样贴模板上来
{"display":{"title":{
"translate":"adv.item.slashblade.custom.dios"←成就的名字(需到lang档解码)
},"description":{
"translate":"item.slashblade.custom.dios.desc"←成就的内容(需到lang档解码)
},},"icon":{
"item":"slashblade:slashblade",←成就的图标物品,这里用的是拔刀共用id(无铭)
"nbt":"{SlashBladeIcon:{ForgeCaps:{\"slashblade:bladestate\":{Energy:0,State:{←物品nbt,有无附魔之类的(拔刀不能用)
isNoScabbard:0b,←是否有鞘,0b=有,1b=无
isBroken:0b,←是否为断刀,0b=是,1b=否
TextureName:\"slashblade:model/named/custom/dios/texture.png\",←贴图路径
ModelName:\"slashblade:model/named/custom/dios/model.obj\"←模型路径
}}}}}"},
"frame":"task",←成就种类,有task(普通),goal(目标),challenge(挑战)三种
"hidden":false,←是否在完成之前显示在成就中,true=是,false=否
},
"parent":"slashblade:root",←上一个成就(详情请见"关于成就")
"criteria":{"crafting":{
"trigger":"minecraft:inventory_changed",←触发条件,这里是取得后触发(如果要像白鞘一样断刀后触发→minecraft:consume_item)
"conditions":{"items":[{
"item":"slashblade:slashblade",←触发成就所需物品,这里用的是所有拔刀的共用id(无铭)
"nbt":"{ShareTag:{
translationKey:\"item.slashblade.custom.dios\"}}"←触发成就所需物品的nbt,这里用的是自定拔刀的内部id
}]}}},←注意"逗点"
完成成就后的奖励,这里用的是木偶的战利品表
↓ 不要奖励的话要把整行删掉,记得把上一行最后的"逗点"删掉(成就奖励不展开说明,原因请见"关于成就")
"rewards":{"loot":["slashblade:rewards/wood"]}
}
关于成就
MC任何的掉落物都取决于战利品表,成就奖励也一样,但因为拔刀剑2的nbt很"麻烦",所以只能给给像刀魂或无铭之类的奖励,
加上本篇主要在介绍如何添加自定拔刀而不是json格式教学,所以不展开说明,有兴趣的可以自行研究主要还是我菜(狗头)
還有關於拔刀的各個成就煩請大家自行在advancements资料夹中查詢,除了slashblade:root(根目錄)以外格式都是slashblade:資料夾名/檔案名or資料夾名/檔案名or資料夾名/......
lang档案翻译
最后就剩翻译了,先把上面有括号起来说"需到lang档解码"的地方复制下来,然后跟拔刀剑1一样
1.用解压工具打开拔刀剑mod.jar本体
2.进入压缩包中目录/assets/slashblade/lang
3.用文本编辑器把档案解压(这里用日文的档案示范,中文同理)
4.把复制起来的文字贴上去,然后改成自己要的名字(如图,注意逗点,除了最后一行的都要标)
成品范例
基本上只要有贴图和模型都可以添加进来,最后就拿散华来当成品范例