Dimensional Inventories
一个 Minecraft Fabric 模组,用于在不同维度池之间保持独立的物品栏。最初开发目的是通过自定义数据包(示例数据包附在 GitHub 的 releases 页面)为生存服务器添加一个单独的创造模式世界。
基本功能
该模组基于“维度池”(dimension pools)运作。一个维度池可以包含任意数量的维度,但一个维度只能存在于一个维度池中。在同一维度池内,玩家的物品栏(包括常规物品栏、盔甲、副手、末影箱、经验值、分数、食物、饱和度、饥饿值和生命值)以及游戏模式是共享的。
当玩家前往属于不同维度池的维度时,玩家的物品栏会被保存到与源维度池对应的文件中。随后,玩家的物品栏和状态效果会被清除,并从目标维度池的文件中加载其物品栏(如果存在),同时游戏模式会切换为该维度池设定的模式。另一方面,如果非玩家实体从一个维度池移动到另一个维度池,它将被直接删除。
可以为每个维度池启用或禁用进度成就(advancements)。玩家可以在任何维度池中查看他们的成就,但只有在启用了进度成就的维度池中,他们才能推进或完成成就,并解锁配方。类似的设置也适用于统计数据(statistics)。
维度池的数据从 JSON 文件加载并保存。如果未找到该文件,将创建一个名为 default 的池,其中包含维度 minecraft:overworld、minecraft:the_nether 和 minecraft:the_end,游戏模式设置为生存,并启用进度成就和统计数据递增。因此,在普通的生存世界中,该模组默认不会生效。
如果源维度或目标维度未分配到任何维度池,玩家的物品栏和游戏模式将不受影响。这意味着如果玩家在跨越维度池的过程中先前往一个未分配的维度,他们可以保留自己的物品栏。
用法
该模组通过以 diminv 开头的命令使用。最基本的命令仅显示模组版本,任何人都可以使用:
diminv
所有其他命令都需要权限等级 4(操作员)。
管理维度池
列出所有维度池、它们的游戏模式以及包含的维度:
diminv list
列出特定维度池、其游戏模式及包含的维度:
diminv pool <pool_name> list
创建一个新的维度池:
diminv pool <pool_name> create
移除现有的维度池:
diminv pool <pool_name> remove
将维度分配给某个维度池(同时也将其从所有其他池中移除):
diminv pool <pool_name> dimension <dimension_name> assign
从维度池中移除维度:
diminv pool <pool_name> dimension <dimension_name> remove
设置维度池的游戏模式:
diminv pool <pool_name> gamemode <gamemode>
启用或禁用维度池的进度成就:
diminv pool <pool_name> progressAdvancements <boolean>
启用或禁用维度池的统计数据递增:
diminv pool <pool_name> incrementStatistics <boolean>
提示
自定义维度不支持通过传送门进行旅行,因此要实际到达其中一个,需要某种形式的传送。一种方法是结合使用原版的 teleport 命令和 execute 命令:
execute in <dimension_name> run teleport <coordinates>
借助提供传送点(warps)、家园(homes)及其他类似传送功能的模组,可以更轻松地访问自定义维度。为了更方便地跨维度跳跃,还可以允许玩家传送到他们之前的位置——这通常通过 /back 命令实现。提供此类功能的一个模组示例是 Essential Commands。
在拥有创造模式维度的生存服务器上,可以通过传送点进入创造模式维度。玩家可以在该创造模式中设置一个家园,以便轻松访问他们在其中的当前项目,并使用 /back 命令快速返回生存世界。这样,玩家可以轻松地在创造模式下设计建筑,并在生存模式下建造时将其作为参考。
为了管理对这些命令以及其他命令的访问,独立地为不同维度分配权限可能很有用。这可以通过权限模组如 LuckPerms 实现——请参阅其关于 上下文(Contexts) 的 wiki 条目。扩展之前的传送示例,essentialcommands.warp.tp 和 essentialcommands.home.tp 权限可以全局授予,而 essentialcommands.home.set 和 essentialcommands.back 权限则可以仅在创造模式维度中授予。
在此背景下,使用 Vanilla Permissions 或 Universal Perms 来暴露额外的权限节点也可能有用。
alongside Dimensional Inventories 使用另一个模组为自定义维度添加传送门支持可能也是值得关注的。这样的模组示例可以是 Dimension Portal Linker。
模组兼容性
总体而言,在模组兼容性方面,至少有两个有趣的情况:
- 使用原版 Minecraft 系统来添加/移除/修改游戏内容(物品、状态效果、维度等)的模组。这些模组应与 Dimensional Inventories “开箱即用”兼容。
- 影响玩家可用状态类型的模组(额外的背包栏位、货币系统等)。这些模组需要额外的工作才能与 Dimensional Inventories 集成。
对于第二种情况,Dimensional Inventories 提供了一个初步的扩展 API,允许其他模组注册额外的玩家状态处理器(见下方的 Extensions 部分)。
Extensions
Dimensional Inventories 提供了初步的扩展 API,可用于提高与其他模组的兼容性(如上 Mod Compatibility 部分所述),或者在核心 Dimensional Inventories 模组中添加或更改功能。扩展 API 可能会发生变化,即使是小版本之间也可能不同,因此请务必使用特定扩展发布页面上列出的兼容模组版本。
请注意,扩展模组可能由与“主” Dimensional Inventories 模组或其提供支持的目标模组不同的作者开发。你不应该期望模组作者解决由不同作者开发的扩展模组引发的问题。
以下是扩展模组列表:
| Extension | Description | Author |
|---|---|---|
| Dimensional Inventories Extension: Trinkets | 与 Trinkets 的兼容性 | 同 Dimensional Inventories |
| Dimensional Inventories Extension: Warp | 用于跨维度池传送玩家的 Warp 命令 | rofumer (Modrinth; GitHub) |
Dimensional Inventories
A Minecraft Fabric mod for keeping separate inventories across pools of dimensions. Originally developed to add a separate creative world to a survival server using a custom dimension datapack (example datapack attached to releases on GitHub).
Basic Functionality
The mod operates with dimension pools. A dimension pool can contain any number of dimensions, but a dimension can only be present in one dimension pool. A player's inventory (including the regular inventory, armour, offhand, ender chest, experience, score, food, saturation, exhaustion and health) and gamemode is the same within the same dimension pool.
When a player travels to a dimension in a different dimension pool, the player's inventory is saved to a file corresponding to the origin dimension pool. The player's inventory and status effects are then cleared, their inventory is loaded from their file in the destination dimension pool (if present), and their gamemode is switched to the dimension pool's gamemode. On the other hand, when a non-player entity travels from one dimension pool to another, it is simply deleted.
Advancement progress can be enabled or disabled for a dimension pool. Players can view their advancements in any dimension pool, but only when in a pool with advancement progress enabled will they be able to progress or complete advancements, as well as unlock recipes. A separate setting also applies this principle to statistics.
Dimension pools are loaded from and saved to a JSON file. If the file is not found, a pool named default will be created containing the dimensions minecraft:overworld, minecraft:the_nether and minecraft:the_end with the gamemode set to survival, and with advancement progress and incrementation of statistics enabled. Thus, the mod will have no effect out of the box in a regular survival world.
If the origin or destination dimension is not assigned to a dimension pool, the player's inventory and gamemode will be unaffected. This means a player can preserve their inventory while travelling across dimension pools if they travel to an unassigned dimension in between.
Usage
The mod is used via commands starting with diminv. The most basic command simply shows the mod version and is accessible to anyone:
diminv
All other commands require permission level 4 (operator).
Managing Dimension Pools
List all dimension pools, their gamemodes and the dimensions they contain:
diminv list
List a specific dimension pool, its gamemode and the dimensions it contains:
diminv pool <pool_name> list
Create a new dimension pool:
diminv pool <pool_name> create
Remove an existing dimension pool:
diminv pool <pool_name> remove
Assign a dimension to a dimension pool (also removing it from all other pools):
diminv pool <pool_name> dimension <dimension_name> assign
Remove a dimension from a dimension pool:
diminv pool <pool_name> dimension <dimension_name> remove
Set the gamemode for a dimension pool:
diminv pool <pool_name> gamemode <gamemode>
Enable or disable advancement progress for a dimension pool:
diminv pool <pool_name> progressAdvancements <boolean>
Enable or disable incrementation of statistics for a dimension pool:
diminv pool <pool_name> incrementStatistics <boolean>
Tips
Custom dimensions do not support travel via portals, so to actually get to one, a teleport of some sort is required. One way is to use the vanilla teleport command in conjunction with the execute command:
execute in <dimension_name> run teleport <coordinates>
Accessing custom dimensions can be made easier with mods that provide warps, homes and other such teleports. For more convenient dimension hopping, players can also be allowed to teleport to their previous location - typically implemented with a /back command. An example of a mod that provides such functionality is Essential Commands.
On a survival server with a creative dimension, the creative dimension could be accessed with a warp. Players could then set a home in the creative dimension for easy access to their current project there, and they could quickly return to the survival world using a /back command. With this, players could easily design their builds in creative and use them as a reference when building them in survival.
To manage access to these and other commands, it can be useful to assign permissions for different dimensions independently. This can be achieved with a permissions mod such as LuckPerms - see their wiki entry for contexts. Expanding on the teleport example, the essentialcommands.warp.tp and essentialcommands.home.tp permissions could be granted globally, while the essentialcommands.home.set and essentialcommands.back permission could be granted only in the creative dimension.
Use of Vanilla Permissions or Universal Perms to expose additional permission nodes may also be useful in this context.
Adding portal support to custom dimensions using another mod alongside Dimensional Inventories may be of interest. An example of such a mod could be Dimension Portal Linker.
Mod Compatibility
Broadly speaking, there are (at least) two interesting cases when it comes to mod compatiblity:
- Mods that use vanilla Minecraft systems to add/remove/modify game content (items, status effects, dimensions and so on). These should be compatible with Dimensional Inventories "out of the box".
- Mods that affect the types of player state available (extra inventory slots, currency systems and so on). These require additional effort to integrate with Dimensional Inventories.
For the second case, Dimensional Inventories features a preliminary extension API, which allows another mod to register additional player state handlers (see the Extensions section below).
Extensions
Dimensional Inventories features a preliminary extension API, which can be used to improve compatibility with other mods (as described in the Mod Compatibility section above), or to add or change features in the core Dimensional Inventories mod. The extension API may change, even across minor versions, so be sure to use the compatible mod versions listed on a particular extension release.
Note that extension mods may be developed by different people than the "main" Dimensional Inventories mod or the mod they provide support for. You should not expect mod authors to resolve issues caused by an extension mod developed by a different author.
Below is a list of extension mods:
| Extension | Description | Author |
|---|---|---|
| Dimensional Inventories Extension: Trinkets | Compatibility with Trinkets | Same as Dimensional Inventories |
| Dimensional Inventories Extension: Warp | Warp command to teleport players across dimension pools | rofumer (Modrinth; GitHub) |
下载 Dimensional Inventories
下载 Dimensional Inventories
下载 Dimensional Inventories
下载 Dimensional Inventories
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Dimensional Inventories
下载 Dimensional Inventories
下载 Dimensional Inventories
下载 Dimensional Inventories
下载 Dimensional Inventories
下载 Dimensional Inventories
更新到 26.3。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧