|
|
SimpleJsonVillagerTrades (SJVT)Github |相关wiki |源站链接支持: fabricSimpleJsonVillagerTrades(SJVT)是一个可以通过数据包修改添加删除村民交易的简单且易于操作的库。
*对于数据包作者*
你可以通过 `data//trade_offers/` 目录下的 JSON 文件来修改商人的交易。
例如:
{
\"__COMMENT\": \"This adds a ruined portal map to the Cartographer\'s trades.\",
\"profession\": \"minecraft:cartographer\",
\"replace\": false,
\"offers\": {
\"apprentice\": [
{
\"type\": \"minecraft:sell_map\",
\"price\": 5,
\"name_key\": \"filled_map.ruined_portal\",
\"feature_tag\": \"minecraft:ruined_portal\",
\"icon\": \"target_x\",
\"max_uses\": 10,
\"experience\": 2
}
]
}
}Copy已复制!
要获取更多关于修改商人交易的教程和信息,请参阅https://github.com/aws404/SimpleJsonVillagerTrades/wiki]维基页面。
*兼容性*
SJVT使用Minecraft的硬编码交易映射作为数据包的基础,因此它应该可以在大多数模组上运行,即使那些添加了新的村民职业的模组也可以兼容。
您还可以通过运行 `sjvt:build` 命令,将硬编码映射(包括非原生支持的模组)导出为数据包。
*对于模组开发者*
你可以使用以下存储库和依赖项在你的 `build.gradle` 中包含该模组(其中 `[TAG]` 是最新版本):
repositories {
maven {
name = \"Modrinth\"
url = \"https://api.modrinth.com/maven\"
content {
includeGroup \"maven.modrinth\"
}
}
}
dependencies {
modImplementation include(\"maven.modrinth:sjvt:[TAG]\") //以包含(jij)在你的模组中
modImplementation \"maven.modrinth:sjvt:[TAG]\" // 要求该模组被单独安装
}Copy已复制!
*自定义交易订单工厂*
要创建一个交易订单工厂,实现 `SerializableTradeOfferFactory` 接口。
然后将编解码器注册到 `TradeOfferFactories.TRADE_OFFER_FACTORY_REGISTRY` 注册表中。
你还可以使用 `CodecHelper` 类中的方法和字段来辅助创建编解码器。
然后查看“对于数据包作者”部分。
来自Modrinth所有游戏版本1.20-pre11.19-pre31.19-pre11.18.21.18.1所有类型fabric1.3.0-pre1+1.20-pre1SimpleJsonVillagerTrades-946916555d0de41df37d5377ac0ee988b19e7681.jar下载1.3.0-pre1+1.20-pre1#BetaUpdate to 1.20-pre1展开版本: 1.3.0-pre1+1.20-pre1支持游戏: 1.20-pre1类型:FabricBeta下载次数: 1341.2.0+pre6SimpleJsonVillagerTrades-1.2.0+pre6.jar下载1.2.0+pre6#AlphaFixed an issue requiring ARRP to be present.展开版本: 1.2.0+pre6支持游戏: 1.19-pre3类型:FabricAlpha下载次数: 1111.2.0+pre5sjvt-1.2.0+pre5.jar下载1.2.0+pre5#Alpha* Update to 1.19+pre3* Improved codec handling* Add `sjvt:type_aware` factory type展开版本: 1.2.0+pre5支持游戏: 1.19-pre3类型:FabricAlpha下载次数: 801.2.0+pre4sjvt-1.2.0+pre4.jar下载1.2.0+pre4#Alpha展开版本: 1.2.0+pre4支持游戏: 1.19-pre1类型:FabricAlpha下载次数: 91Pre3sjvt-1.2.0+pre3.jar下载1.2.0+pre3#Alpha展开版本: 1.2.0+pre3支持游戏: 1.19-pre1类型:FabricAlpha下载次数: 931.2.0+pre1sjvt-1.2.0+pre1.jar下载1.2.0+pre1#AlphaUpdate to 1.19展开版本: 1.2.0+pre1支持游戏: 1.19-pre1类型:FabricAlpha下载次数: 1,849Release 1.1.0sjvt-1.1.0.jar下载1.1.0#Release- Update to MC1.18.2- Added `sjvt:build` command to export the hardcoded map (including other mods) to a datapack file- Refactored:- Now using codecs for serialization/deserialization- Better support for other mods to create custom trade offers- Now includes exported vanilla trades in the testmod! (https://github.com/aws404/SimpleJsonVillagerTrades/tree/1.18/src/testmod/resources/data/minecraft/trade_offers)- Breaking change: `minecraft:sell_map` factory type now uses a feature tag and requires a item translation key (https://github.com/aws404/SimpleJsonVillagerTrades/wiki/Trade-Offer-Factory-Types#minecraftsell_map)展开版本: 1.1.0支持游戏: 1.18.2类型:FabricRelease下载次数: 194Bug Fix 1.0.1sjvt-1.0.1.jar下载1.0.1#Release- Fix swapped argument names (`price` and `count`) in the `minecraft:sell_item` factory.展开版本: 1.0.1支持游戏: 1.18.1类型:FabricRelease下载次数: 109Initial Relasesjvt-1.0.0.jar下载1.0.0#Release展开版本: 1.0.0支持游戏: 1.18.1类型:FabricRelease下载次数: 117全部版本
markdown_parsed
文章类型:收录
layui.use([\'form\'], function(){
var form = layui.form;
});
SimpleJsonVillagerTrades |
楼主
2025-8-10 19:18:02
回复(0)
收起回复
|