本篇教程由作者设定使用 CC BY-NC-SA 协议。
开局一本阿卡什宝典,还玩家一个清爽的开局背包
废话不多说,直接上代码:
mods.initialinventory.InvHandler.addStartingItem(<akashictome:tome>.withTag({"akashictome:data": {
// 匠魂手册(标准格式)
tconstruct: {id: "tconstruct:book", Count: 1 as byte, tag: {"akashictome:definedMod": "tconstruct"}, Damage: 0 as short},
// 植物魔法辞典(带精灵知识(额外NBT))
botania: {id: "botania:lexicon", Count: 1 as byte, tag: {"knowledge.minecraft": 1 as byte, "akashictome:definedMod": "botania"}, Damage: 0 as short},
// 生物群系指南针(原本并不被允许通过合成加入阿卡什宝典,但在没修改配置的情况下正常工作并正确的对确实的NBT完成自动补全(虽然最好改一下配置防止拿出来塞不回去))
naturescompass: {id: "naturescompass:naturescompass", Count: 1 as byte, tag: {}, Damage: 0 as short}
}}));