Custom Portal API Reforged
一个库模组,让开发者能够轻松为自定义维度创建传送门。这些自定义传送门的功能与下界传送门完全一致,但可以进行完全自定义。你可以控制框架方块、传送门方块、着色、点火来源、目标位置等等!

用法
将该仓库/模组添加到你的 build.gradle 中。
repositories {
maven {url 'https://maven.azuredoom.com/mods'}
}
dependencies {
//1.20.1
implementation fg.deobf('net.kyrptonaught.customportalapi:customportalapi-reforged:MODVERSION')
//1.20.2+
implementation fg.deobf("net.kyrptonaught.customportalapi:cpapireforged-neo-1.20.2:MODVERSION")
}
现在来创建并注册传送门本身,这要归功于 CustomPortalBuilder 类,这一步非常简单。我们会在 FMLCommonSetupEvent 中使用它。
下面是一个非常简单的传送门,它会把我们传送到末地,并且通过手持末影之眼右键点击框架来点亮:
CustomPortalBuilder.beginPortal()
.frameBlock(Blocks.DIAMOND_BLOCK)
.lightWithItem(Items.ENDER_EYE)
.destDimID(new ResourceLocation("the_end"))
.tintColor(45,65,101)
.registerPortal();
下界传送门可按如下方式注册:
CustomPortalBuilder.beginPortal()
.frameBlock(Blocks.OBSIDIAN)
.destDimID(new ResourceLocation("the_nether"))
.tintColor(131, 66, 184)
.registerPortal();
CustomPortalBuilder 包含大量可用于自定义传送门功能的方法,这些方法都已在该类中进行了文档说明。
一些值得一提的方法:
鸣谢
友情链接: 网易我的世界 | 泰拉瑞亚 | ocent云计算 | 米饭Minecraft插件文档 | 友链合作
历史访问人数:164,577 | 历史访问人次:263,740
今日访问人数:1,492 | 今日访问人次:1,633
昨日访问人数:23,567 | 昨日访问人次:27,193
Copyright © 2019-2026 我的世界服务器列表站. All rights reserved.
❤ Powered by GermMC 京ICP备17023959号-6