服务器传送门
注册服务端传送门,可使用配置的方块建造,使用物品激活并在访问时执行命令。兼容原版客户端。如果该模组也安装在客户端上,传送门框架可以根据服务器配置显示不同颜色。
注意:v1.0 - 目前尚未支持在客户端安装,因为使用未授权客户端进行本地调试非常困难。我目前正在开发一个构建脚本插件以实现本地认证功能,否则无法进行此类调试。我不会在没有附加调试器的情况下浪费几个小时来复制粘贴 jar 文件。
安装
要安装此插件,需要 fabric、fabric API 和 owo-lib。
此模组可在 modrinth 找到,slug 为 server-portals。
项目源码托管于 github/michiruf,最新
自述文件见 此处。
内部而言,此插件打包了 kyrptonaught's customportalapi、 kyrptonaught's CustomPortalApi-Polymer 以及 因此依赖 Polymer。
使用说明
注意:必须重启服务器才能加载这些更改!因此每次更改传送门后,请(不幸地)重启服务器。
列出已配置的传送门:
/serverportals list
注册一个传送门
/serverportals register NAME FRAME_BLOCK LIGHT_UP_ITEM COLOR COMMAND
例如:/serverportals register test minecraft:bone_block minecraft:ender_eye black "say hello" 将注册一个
传送门,以骨块作为框架,末影之眼作为手持右键激活的物品,当玩家踏入时会打印出由用户发出的 "hello"。
通过索引注销传送门
/serverportals unregister NAME
示例配置文件
配置文件位于 /config/server-portals.json5。
请注意,在服务器运行时更改配置将被配置传送门的命令覆盖。
LogLevel 当前未被使用。
{
"logLevel": 0,
"portals": [
{
"index": "say_hello_portal",
"frameBlockId": "minecraft:bone_block",
"lightWithItemId": "minecraft:ender_eye",
"color": 0,
"command": "say \"hello world\""
},
{
"index": "tp_portal",
"frameBlockId": "minecraft:gold_block",
"lightWithItemId": "minecraft:ender_eye",
"color": 5592575,
"command": "tp @p 0 100 0"
}
]
}
与 ProxyCommands 配合使用
ProxyCommands 可在 此处 找到。要创建通往其他服务器的传送门, 请使用以下命令:
/serverportals register NAME BLOCK ITEM COLOR "proxycommand \"server SERVERNAME\""
例如:
/serverportals register server_creative minecraft:bone_block minecraft:ender_eye black "proxycommand \"server creative\""
服务器日志中的已知错误报告
customportalapi 会检查是否注册了没有维度的传送门,并在每次启动服务器时打印以下内容:
[xx:xx:xx] [main/INFO] (Minecraft) [STDOUT]: [customportalapi]ERROR: Dimension is null
配置的命令仍会被执行。
更新日志
每个发布周期的更新日志可在 此处 找到。 此更新日志包含从一个版本到下一个版本的信息。
许可证
进一步阅读(面向开发者)
- LoomProductionEnv 可能适合真实测试
Server Portals
Register serverside portals, which can be built using configured blocks, items to light them up and execute a command when accessed. Works with vanilla clients. If this mod is installed on the client as well, the portal frame can get displayed in different colors configured on the server.
NOTE v1.0 - installing on a client does not work yet due to the fact, that debugging locally with non-authenticated clients is pretty insane. I'm currently working on a build script plugin to get local authentication to work, because you cannot debug like this. I'm not going to waste hours of copy pasting jars around, without a debugger attached.
Installation
To install this plugin fabric, fabric API and owo-lib is required.
This mod is available on modrinth with slug server-portals.
The project source is available on github/michiruf with the latest
readme here.
Internally this plugin is packed with kyrptonaught's customportalapi, kyrptonaught's CustomPortalApi-Polymer and because of that with Polymer.
Usage instructions
NOTE: The server must get restarted to load these changes!So after every change of the portals, restart the server (unfortunately)!
List configured portals:
/serverportals list
Register a portal
/serverportals register NAME FRAME_BLOCK LIGHT_UP_ITEM COLOR COMMAND
For example: /serverportals register test minecraft:bone_block minecraft:ender_eye black "say hello" will register a
portal, with bone blocks as frame, ender eyes as light up activation item to hold in hand while right-clicking and
printing out hello from the user that steps into it.
Unregister a portal by its index
/serverportals unregister NAME
Example configuration file
The configuration is location in /config/server-portals.json5.
Note that changing the configuration while the server is running, will be overwritten by
commands that configure portals.
LogLevel is currently unused.
{
"logLevel": 0,
"portals": [
{
"index": "say_hello_portal",
"frameBlockId": "minecraft:bone_block",
"lightWithItemId": "minecraft:ender_eye",
"color": 0,
"command": "say \"hello world\""
},
{
"index": "tp_portal",
"frameBlockId": "minecraft:gold_block",
"lightWithItemId": "minecraft:ender_eye",
"color": 5592575,
"command": "tp @p 0 100 0"
}
]
}
Usage together with ProxyCommands
ProxyCommands can be found here. To create a portal to another server use the command:
/serverportals register NAME BLOCK ITEM COLOR "proxycommand \"server SERVERNAME\""
For example:
/serverportals register server_creative minecraft:bone_block minecraft:ender_eye black "proxycommand \"server creative\""
Known error reports in server logs
The customportalapi will check if a portal without a dimension is registered and will print this on every launch of the server:
[xx:xx:xx] [main/INFO] (Minecraft) [STDOUT]: [customportalapi]ERROR: Dimension is null
The configured command will get executed nevertheless.
Changelog
Changelog per release cycle can be found here. This changelog contains information from one release to the next one.
License
Further reading (for devs)
- LoomProductionEnv could be good for real testing
下载 Server Portals
下载 Server Portals
下载 Server Portals
下载 Server Portals
下载 Server Portals
下载 Server Portals
下载 Server Portals
下载 Server Portals
下载 Server Portals
支持 MC 1.19 - 1.20.2
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
可定制的鞘翅模组,支持装饰纹饰、旗帜图案等更多功能!
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
适用于 MC 1.18+ 的 Effekseer 加载器
模组
新增 50+ 个独特生物群系,为你的世界增添新树木、花卉等更多元素!
模组
添加全屏世界地图,显示你在世界中已探索的区域。与 Xaero's Minimap 搭配使用效果极佳。
模组
基于 GTCEu 1.12.2 的现代 GregTech
评论 0
登录后参与评分
还没有评论,来抢沙发吧