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();
以下是一些值得注意的方法:
- lightWithWater/Item/Fluid - 这些方法允许你控制如何激活传送门。
- onlyLightInOverworld - 仅允许在主世界中激活以到达你选择的目的地。
- flatPortal - 类似末地或暮色森林传送门的平面传送门。
Custom Portal API Reforged
Library mod allowing developers to create portals to their custom dimensions easily. These custom portals will function exactly like nether portals, except being fully customizable. You can control the frame block, portal block, tinting, ignition source, destination, and more!Usage
Add the repository/mod to your 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")
}
Now onto creating and registering the portal itself, this is simple thanks to the CustomPortalBuilder class. We will make use of this in FMLCommonSetupEvent.
The following is a very simple portal that will take us to The End, and is lit by right-clicking the frame with an Eye of Ender:
CustomPortalBuilder.beginPortal()
.frameBlock(Blocks.DIAMOND_BLOCK)
.lightWithItem(Items.ENDER_EYE)
.destDimID(new ResourceLocation("the_end"))
.tintColor(45,65,101)
.registerPortal();
A Nether portal would be registered as follows:
CustomPortalBuilder.beginPortal()
.frameBlock(Blocks.OBSIDIAN)
.destDimID(new ResourceLocation("the_nether"))
.tintColor(131, 66, 184)
.registerPortal();
Some noteworthy methods to mention:
- lightWithWater/Item/Fluid - These allow you to control how the portal is lit.
- onlyLightInOverworld - Only allow the portal to be used in the overworld to your destination of choice
- flatPortal - Flat Portal similar to the End or the Twilight Forest portal.
Based off the main Fabric mod HERE and an older ported mod HERE
下载 Custom Portal API Reforged
下载 Custom Portal API Reforged
下载 Custom Portal API Reforged
下载 Custom Portal API Reforged
下载 Custom Portal API Reforged
下载 Custom Portal API Reforged
下载 Custom Portal API Reforged
下载 Custom Portal API Reforged
下载 Custom Portal API Reforged
下载 Custom Portal API Reforged
v1.4.0
- 移植至 1.21.10(感谢 AnonymousHacker1279)
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
适用于 MC 1.18+ 的 Effekseer 加载器
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧