
OpenPortals
一个简单易用的库,用于实现自定义维度传送门。

一个用于实现自定义维度传送门的简易库
OpenPortals 是一个轻量级库模组,让创建自定义传送门变得简单。它非常适合用于 Jar-in-Jar 场景。
安装设置
要在你的模组中使用 OpenPortals,请在 build.gradle 文件中将其添加为依赖:
repositories {
maven {
name "AnonymousHacker1279"
url "https://maven.anonymoushacker1279.tech/releases"
}
}
dependencies {
implementation "tech.anonymoushacker1279.openportals:OpenPortals:<version>"
}
最新版本可以在仓库的 releases 部分找到。
使用方法
在模组设置期间,只需一步即可创建传送门,例如:
@SubscribeEvent
public static void onCommonStartUp(FMLCommonSetupEvent event) {
new CustomPortalBuilder()
.frame(Blocks.GLOWSTONE)
.destination(Identifier.withDefaultNamespace("the_nether"))
.lightWithFluid(Fluids.WATER)
.tintColor(255, 0, 255)
.build();
}
所有传送门构建器方法均有文档说明,请参阅 Javadocs 获取更多信息。
许可证
OpenPortals 采用 MIT 许可证。
正在加载版本记录…
正在加载评论…
评论在新手盒子客户端中发表,这里同步展示。