传送门!
这是一个服务端侧的传送门模组。传送门的类型和尺寸限制可以通过数据包进行控制。该模组仍在开发中,如果您发现任何问题,请务必报告。
使用方法
链接传送门
每个传送门都需要提供一个物品来激活,并将与所有使用相同物品的其他传送门链接。自定义物品名称和/或添加自定义模型数据(Custom Model Data)可以将该物品与其他物品区分开来。
示例:
传送门 A 使用名为 下界传送门 的 纸
传送门 B 使用未命名的 纸
传送门 C 使用名为 下界传送门 的 纸
传送门 A 和 传送门 C 将会链接。传送门 B 将处于未链接状态。请注意,尝试使用未链接的传送门可能会导致不可预知的后果。
锁定
支持锁定的传送门类型可以通过潜行并使用控制器方块进行锁定。已锁定的控制器中的物品无法被移除。拥有相应权限的玩家(只要他们有能力在该空间修改方块)可以锁定任何类型的传送门控制器,而不管其具体类型如何。默认情况下,这由以下权限之一控制:
Single Players
Operator
- 在 LuckPerms 等权限模组中的
linkedportals.masterkey 权限节点
数据包配置:
方块标签:
linkedportals:valid_frames - 标识默认传送门类型的有效框架方块。
linkedportals:portal_controller_base - 标识可转换为传送门控制方块的方块。破坏控制器方块会掉落原始方块。
物品标签:
linkedportals:valid_activators - 标识用于将基础方块转换为控制器的消耗品。
传送门类型:
传送门类型通过 data/<namespace>/linkedportals/types/<portal_type_name>.json 路径下的 JSON 文件进行配置。每种传送门类型都将是一个独立的文件。可以通过覆盖默认的 default.json 传送门类型或将 linkedportals:valid_frames 标签替换为空标签来禁用默认传送门类型。
传送门类型使用规则测试(rule tests)来检查有效的框架或内部方块。这支持由模组添加的任何自定义规则测试或标准结构处理器测试。最常见的是 block_match、blockstate_match 或 tag_match。
valid_frame_rule 用于验证框架方块的规则测试。
valid_interior_rule 用于验证框架内部方块的规则测试。默认为空气方块测试。
size_limit 控制传送门框架宽度和高度的最大尺寸。默认为 21。
lockable 控制此传送门类型是否可由玩家锁定。默认为 true。
格式
{
"valid_frame_rule": {
"predicate_type": "minecraft:tag_match",
"tag": "linkedportals:valid_frames"
},
"valid_interior_rule": {
"predicate_type": "minecraft:blockstate_match",
"block_state": {
"Name": "minecraft:air"
}
},
"size_limit": 21,
"lockable": false
}
Portals!
This is a server-side portal mod. Portal types and size limits can be controlled through datapacks. This mod is still very much a work in progress so if you see any issues, please be sure to report it.
Usage
Linking portals
Each portal is activated by providing an item, and will link to all other portals using the same item. Customizing the name of the item and/or adding Custom Model Data will distinguish the item from other items.
Example:
Portal A uses a Paper named Nether Portals
Portal B uses a Paper without a name
Portal C uses a Paper named Nether Portals
Portal A and Portal C will link. Portal B will be unlinked. Beware, attempting to use an unlinked portal may result in unforseen consequences.
Locking
Portal types that support locking can be locked by sneaking and using the controller block. Items cannot be removed from locked controllers. Players with the proper permissions can lock any portal controller, regardless of the portal type (as long as they have the ability to modify blocks in that space). By default this is controlled through one of the following permissions:
Single Players
Operator
linkedportals.masterkey permission node in a permission mod like luckperms
Datapack configuration:
Block Tags:
linkedportals:valid_frames - Identifies valid frame blocks for the default portal type.
linkedportals:portal_controller_base - Identifies blocks that can be converted to portal control blocks. Breaking a controller block will drop the original block.
Item Tags:
linkedportals:valid_activators - Identifies items that are spent to convert base blocks to controllers.
Portal Types:
Portal types are configured with json files in the data/<namespace>/linkedportals/types/<portal_type_name>.json path. Each portal type will be its own file. The default portal type can be disabled by overwriting the default.json portal type or by replacing the linkedportals:valid_frames tag with an empty tag.
Portal types use rule tests to check for valid frames or internal blocks. This supports any custom rule tests added by mods or the standard structure processor tests. The most common will be block_match, blockstate_match, or tag_match.
valid_frame_rule Rule test to validate frame blocks.
valid_interior_rule Rule test to validate blocks inside the frame. Defaults to a block test for air.
size_limit Controls the maximum size of the portal frame width and height. Defaults to 21.
lockable Controls whether this portal type is lockable by players. Defaults to true.
Format
{
"valid_frame_rule": {
"predicate_type": "minecraft:tag_match",
"tag": "linkedportals:valid_frames"
},
"valid_interior_rule": {
"predicate_type": "minecraft:blockstate_match",
"block_state": {
"Name": "minecraft:air"
}
}
"size_limit": 21,
"lockable": false
}
评论 0
登录后参与评分
还没有评论,来抢沙发吧