User Tools

Site Tools


zh_cn:tutorial:custom_portals

This is an old revision of the document!


创建一个自定义传送门用于访问你的新维度

至此,你已经创建了一个新的维度,并为这个维度添加了群系、动物和一些看起来很棒的功能。

那生存玩家怎么访问这个新的维度呢?没错,创建一个传送门!

准备工作

Kyrptonaught 是一个非常有用的库,mod 开发者可以轻松的使用它来创建自定义传送门,作为连接新维度和主世界或其他的维度的桥梁。想了解这个库的更多信息,查看 Kyrptonaught 的 github 主页

首先,在项目的 build.gradle 文件中添加 Kyrptonaught 的仓库。

maven { 
    url = "https://maven.kyrptonaught.dev"
}

之后在 dependencies 依赖项中添加下面代码。

modImplementation 'net.kyrptonaught:customportalapi:<version>'
include 'net.kyrptonaught:customportalapi:<version>'

注意: Kyrptonaught 库可以正常运行的版本有1.16、1.18和1.19。你需要为你的mod选择合适的库版本。 (译者注:截止2023年12月12日,Kyrptonaught 库已经有1.20.2版本发布。)

zh_cn/tutorial/custom_portals.1702343716.txt.gz · Last modified: 2023/12/12 01:15 by flanwuuu