Pocket Islands
一个适用于 Fabric、Forge 和 NeoForge 的 Minecraft 模组,为每位玩家提供专属的持久化口袋维度岛屿。
支持版本:
| Minecraft |
Fabric |
Forge |
NeoForge |
| 1.20.1 |
✓ |
✓ |
|
| 1.20.4 |
✓ |
|
|
| 1.21.11 |
✓ |
|
✓ |
功能特性
- Pocket Islands:每位玩家拥有独立的隔离岛屿维度
- 持久化存储:主世界重置后岛屿数据依然保留
- 传送门访问:建造传送门框架,使用绿宝石激活
- 邀请系统:邀请好友访问你的岛屿
- 虚空生成:从零开始的虚空世界,附带初始岛屿
前置要求
- Minecraft 1.20.1、1.20.4 或 1.21.11
- Fabric: Fabric Loader (1.20.x 需 0.15.0+,1.21.x 需 0.18.4+) 以及 Fabric API
- Forge (1.20.1): Forge 47 或更高版本。无需其他依赖:Infiniverse 已打包在 JAR 文件中
- NeoForge (1.21.11): NeoForge 21.11.45 或更高版本。无需其他依赖:Infiniverse 已打包在 JAR 文件中
- 客户端和服务器端都必须安装此模组
服务器端设置
- 在服务器上安装 Fabric Loader、Forge 或 NeoForge
- 下载对应 MC 版本和加载器的 Pocket Islands JAR 文件
- 将其放入服务器的
mods/ 文件夹中
- 如果使用 Fabric,请确保此处也安装了 Fabric API
- 启动服务器
客户端设置
- 安装 Fabric Loader、Forge 或 NeoForge
- 下载对应 MC 版本和加载器的 Pocket Islands JAR 文件
- 将其放入你的
mods/ 文件夹中
- 如果使用 Fabric,请确保此处也安装了 Fabric API
- 启动 Minecraft
重要提示: 模组必须在客户端和服务器端同时安装。详情请参阅
常见问题解答。
加载器差异
在所有加载器上岛屿的工作方式相同,例外情况如下:
|
Fabric |
Forge 1.20.1 / NeoForge 1.21.11 |
| 运行时维度 |
Fantasy(内置) |
Infiniverse(内置) |
| 权限管理 |
通过 fabric-permissions-api 使用 LuckPerms,否则使用 OP 等级 |
通过加载器的 PermissionAPI 使用 LuckPerms,否则使用 OP 等级 |
| 岛屿时间 |
独立时钟;doDaylightCycle: false 会冻结时间 |
跟随主世界时间;doDaylightCycle 对岛屿无影响 |
| 世界种子(OVERWORLD/FLAT 类型岛屿) |
每个岛屿独立 |
使用主世界的种子。虚空岛屿不受影响 |
控制台命令方块在使用 /pi 相关权限时始终使用 OP 等级进行判断。
不支持在不同加载器之间移动整个世界:切换加载器意味着更换整个整合包。单个岛屿可以迁移:将 world/dimensions/personalworlds/ 复制到另一台服务器(相同的 Minecraft 版本),岛屿即可直接打开而无需转换。岛屿注册表、返回位置和邀请信息仍保留在原服务器世界中。随后生成的 OVERWORLD/FLAT 类型岛屿的新区块将使用新加载器的种子(参见上表)。
使用方法
创建传送门
此部分可配置,以下说明基于默认配置。
使用下界砖搭建框架(宽 4 x 高 5):
N N N N
N N
N N
N N
N N N N
右键点击框架内部以绿宝石激活。
进入你的岛屿
走进已激活的传送门即可进入你的口袋岛屿。首次进入时,你的岛屿将根据你传送门类型的岛屿层级进行生成。新岛屿上没有返回传送门。
返回
最快的返回方式是跳下你的岛屿:在 Y=0 下方时,你会被传送回进入时的位置,且不会受到虚空伤害。
若要通过传送门返回,请在你的岛屿上搭建框架并按照之前的方式激活它(携带框架方块和激活物品)。进入该传送门将带你回到原始位置。
命令
玩家命令:
/pi invites - 查看你的邀请记录(发出和收到的)
/pi invite <player> - 邀请一名玩家到你的岛屿
/pi invite <player> always - 添加“永久欢迎”状态的邀请(如果已启用)
/pi uninvite <player> - 撤销某玩家的邀请
/pi togglewelcome <player> - 切换现有邀请的“永久欢迎”状态(如果已启用)
/pi portals - 查看所有配置的传送门类型及你的岛屿状态
管理员命令(OP 等级 2+):
/pi admin list - 列出所有岛屿
/pi admin info <player> - 查看岛屿详情
/pi admin tp <player> - 传送至某岛屿
/pi admin delete <player> [confirm] - 删除岛屿(需要 OP 4 等级)
调试命令(OP 等级 4):
/pi debug perf enable - 启用性能监控
/pi debug perf disable - 禁用性能监控
/pi debug perf status - 显示性能状态
/pi debug perf reset - 重置性能计数器
注意: 通常不需要使用调试命令,但它们可能有助于检查问题。
配置
配置文件: config/pocketislands.json
Pocket Islands 提供了广泛的自定义选项,特别是针对岛屿组成。你可以定义多种传送门类型,每种类型创建具有不同材质和属性的岛屿。
示例配置
{
"portalTypes": [
{
"frameBlock": "minecraft:nether_bricks",
"activationItem": "minecraft:emerald",
"islandLayers": [
"minecraft:grass_block",
"minecraft:dirt",
"minecraft:stone"
],
"portalColor": "red"
}
],
"consumeActivationItem": false,
"maxInvitationsPerPlayer": 20,
"enableAlwaysWelcome": false,
"unloadEmptyDimensionDelayTicks": 600,
"cleanupIntervalTicks": 600,
"sanitizeChunksOnLoad": false,
"sanitizeRemoveOrphanBlocks": false,
"enableTeleportParticles": true,
"enableTeleportSounds": true,
"enablePortalActivationEffects": true,
"enableInvitationNotifications": true,
"dimensionGameRules": {
"doMobSpawning": false
}
}
配置选项
传送门类型(岛屿自定义)
定义多种传送门类型以创建具有不同材质的岛屿:
frameBlock — 用于传送门框架的方块(例如 "minecraft:nether_bricks")
activationItem — 用于激活传送门的物品(例如 "minecraft:emerald")
islandLayers — 自定义你的起始岛屿平台(最多 5 层,从上到下排列)
- 示例:
["minecraft:grass_block", "minecraft:dirt", "minecraft:stone"]
- 创建主题岛屿:草/泥土/石头、下界岩/灵魂沙/黑曜石、末地石等
- 每种类型的传送门都会生成独特的岛屿组成
- 每层厚度为 1 个方块;若要两层泥土,请在数组中重复该材质
portalColor — 传送门效果的颜色(默认值:"red")
- 可用颜色:
"white"、"light_gray"、"gray"、"black"、"brown"、"red"、"orange"、"yellow"、"lime"、"green"、"cyan"、"light_blue"、"blue"、"purple"、"magenta"、"pink"
- 有助于在视觉上区分不同类型的传送门
邀请功能
maxInvitationsPerPlayer — 每位玩家的最大邀请数量(设为 -1 表示无限制)
enableAlwaysWelcome — 启用“始终欢迎”功能(默认值:false,需要重启服务器)
“始终欢迎”功能
默认情况下,访客仅在你在线且位于你的岛屿上时才能进入。 “始终欢迎” 功能允许岛屿所有者授予特定访客永久访问权限,从而绕过这些限制。
启用该功能
将配置文件中的 enableAlwaysWelcome 设置为 true 并重启服务器:
{
"enableAlwaysWelcome": true
}
注意: 此设置需要重启服务器才能生效。当禁用时,所有“始终欢迎”命令将被隐藏,现有的标志也会被忽略。
使用“始终欢迎”
启用后,岛屿所有者有两种方式授予“始终欢迎”状态:
选项 1:发送带有“始终欢迎”的邀请
/pi invite Steve always
这将立即创建一个已启用“始终欢迎”的新邀请。
选项 2:切换现有邀请的状态
/pi togglewelcome Steve
这将切换现有邀请上的“始终欢迎”状态。再次运行以禁用。
查看“始终欢迎”状态
使用 /pi invites 查看你发出的邀请。当该功能启用时,每个邀请旁边会显示一个可点击的星形指示器:
Sent (players who can visit you):
- Steve [★] [Revoke] ← 绿色星星:始终欢迎已开启
- Alex [☆] [Revoke] ← 灰色星星:始终欢迎已关闭
点击星星可以直接从聊天窗口切换状态。
访问控制行为
| 邀请类型 |
房主在线 + 在家 |
房主在线 + 离开 |
房主离线 |
| 标准 |
✓ 允许 |
✗ 拒绝 |
✗ 拒绝 |
| 始终欢迎 |
✓ 允许 |
✓ 允许 |
✓ 允许 |
说明:
- 管理员(OP 等级 2+)始终可以绕过所有访问限制
- 岛屿所有者始终可以访问自己的岛屿
- “始终欢迎”访客仍需要有效的邀请(撤销邀请将移除访问权限)
性能相关
unloadEmptyDimensionDelayTicks — 卸载空维度前的延迟时间(默认值:600 = 30 秒)
cleanupIntervalTicks — 检查空维度的频率(默认值:600 = 30 秒)
区块清理器
sanitizeChunksOnLoad — 在区块加载时清除孤立的实体块和未知的容器物品(默认值:false;需手动启用)
sanitizeRemoveOrphanBlocks — 在清理过程中还移除失去有效支撑的方块(如火把、红石、雪层等)(默认值:false;仅在启用 sanitizeChunksOnLoad 时使用)
视觉效果
enableTeleportParticles — 传送期间显示粒子效果
enableTeleportSounds — 传送期间播放音效
enablePortalActivationEffects — 激活传送门时显示效果
enableInvitationNotifications — 收到邀请通知时播放声音
高级选项
consumeActivationItem — 是否在使用物品激活传送门时消耗该物品(默认值:false)
维度游戏规则
口袋维度默认继承主世界的所有游戏规则。你可以使用 dimensionGameRules 配置覆盖特定规则:
{
"dimensionGameRules": {
"keepInventory": true,
"randomTickSpeed": 3,
"doMobSpawning": false
}
}
此配置将:
- 强制
keepInventory 为 true(玩家死亡后保留物品)
- 强制
randomTickSpeed 为 3(作物和植物生长倍率)
- 强制
doMobSpawning 为 false(生物无法自然生成)
- 所有其他规则均继承自主世界
特定版本的游戏规则名称:
Minecraft 1.21.x 重命名了许多游戏规则。请使用适合你服务器版本的名称:
| 功能 |
1.20.x (驼峰命名法) |
1.21.x (蛇形命名法) |
| 死亡保留物品 |
keepInventory |
keep_inventory |
| 生物生成 |
doMobSpawning |
spawn_mobs |
| 作物/植物生长速度 |
randomTickSpeed |
random_tick_speed |
| 生物掉落物品 |
doMobLoot |
mob_drops |
| 方块掉落 |
doTileDrops |
block_drops |
| 生物破坏方块 |
mobGriefing |
mob_griefing |
| 立即重生 |
doImmediateRespawn |
immediate_respawn |
默认行为:
- 1.20.x:
{"doMobSpawning": false} — 创建没有生物的虚空岛屿
- 1.21.x:
{"spawn_mobs": false} — 使用重命名后的规则实现相同行为
注意: 预期行为是在口袋维度中禁用生物生成,因为这是一个 VOID(虚空)类型的世界,启用它毫无意义。但如果你确实想这样做,可以在配置中将 doMobSpawning / spawn_mobs 设置为 true。
这是一个不受支持的功能,不会被视为 bug 进行处理。
若要继承主世界的所有规则且不做任何更改,请使用空地图:
{
"dimensionGameRules": {}
}
创建多种传送门类型
你可以定义多种传送门类型以创建不同的岛屿主题。玩家可以使用不同的传送门材料来选择他们想要的岛屿类型:
{
"portalTypes": [
{
"frameBlock": "minecraft:nether_bricks",
"activationItem": "minecraft:emerald",
"islandLayers": [
"minecraft:grass_block",
"minecraft:dirt",
"minecraft:stone"
],
"portalColor": "red"
},
{
"frameBlock": "minecraft:blackstone",
"activationItem": "minecraft:nether_star",
"islandLayers": [
"minecraft:netherrack",
"minecraft:soul_sand",
"minecraft:basalt"
],
"portalColor": "red"
},
{
"frameBlock": "minecraft:end_stone_bricks",
"activationItem": "minecraft:ender_pearl",
"islandLayers": [
"minecraft:end_stone"
],
"portalColor": "cyan"
}
]
}
注意: 玩家使用的第一个传送门类型将永久决定其岛屿构成。
重载配置
使用 /pi admin reload 可在不重启服务器的情况下重载配置。对传送门类型的更改仅影响新创建的岛屿。
翻译
Pocket Islands 使用 Fabric 的标准语言文件系统来处理所有面向用户的消息。这允许服务器管理员和整合包制作者自定义消息或为不同语言添加翻译。
语言文件位置
语言文件位于:
src/main/resources/assets/personalworlds/lang/
模组默认包含英文(美国)翻译:
lang/en_us.json
添加自定义语言
要为其他语言(例如德语、荷兰语、西班牙语)添加支持:
-
使用适当的区域代码创建新的语言文件:
-
复制 en_us.json 的内容作为模板
-
翻译消息值(保持键不变):
{
"pocketislands.message.invite_sent": "Eingeladen %s zu deiner Dimension",
"pocketislands.message.invite_received": "%s hat dich zu ihrer Dimension eingeladen",
// ...
}
- 将文件放置在资源包或模组 JAR 中的
assets/personalworlds/lang/ 下
自定义消息
要在保留英语的同时自定义消息:
- 创建资源包或直接编辑
assets/personalworlds/lang/en_us.json
- 修改翻译值(每行右侧的部分)
- 保持翻译键(左侧部分)不变
- 使用
%s 表示字符串参数,%d 表示数字
示例:
{
"pocketislands.message.invite_sent": "You invited %s to your island!",
"pocketislands.message.invite_received": "%s wants you to visit their island!"
}
可用的翻译键
所有翻译键均在 lang/en_us.json 中记录。主要类别包括:
pocketislands.message.* — 面向玩家的消息(邀请、踢出、传送)
pocketislands.command.* — 命令反馈和信息
pocketislands.command.error.* — 错误消息
pocketislands.invitations.* — 邀请列表界面文本
pocketislands.command.perf.* — 性能监控消息
pocketislands.command.list.* — 管理员列表命令输出
pocketislands.command.info.* — 管理员信息命令输出
pocketislands.command.delete.* — 管理员删除命令警告
pocketislands.command.portals.* — 传送门类型列表和岛屿状态
技术细节
维度存储
每个口袋岛屿存储在以下路径:
world/dimensions/personalworlds/pw_<uuid>/
其中 <uuid> 是不带连字符的玩家 UUID。
元数据恢复
每个维度文件夹都包含一个 .metadata 文件,以便在主注册表损坏时进行恢复。该文件包含:
- 拥有者 UUID
- 拥有者名称
- 维度 ID
- 创建时间戳
- 出生点
- 生成器类型
处理的边缘情况
- 玩家在口袋岛屿断开连接:位置被保留,即使维度未加载,重新连接时也会恢复维度
- 离线时维度未加载:玩家将恢复到其岛屿;如果恢复失败,则回退到床的出生点或世界出生点
- 服务器崩溃:恢复处理器会检查权限并在必要时疏散玩家
- 两名玩家同时进入传送门:并发传送门守卫防止竞态条件
- 返回位置被阻挡:安全出生点查找器会定位附近的安全位置
- 离线期间撤销邀请:玩家在下一次登录时被疏散,并采用回退链(返回数据 → 床 → 出生点)
- 玩家从岛屿坠落:在受到虚空伤害之前自动传送回岛屿
- 未知方块或容器物品:启用
sanitizeChunksOnLoad 后,区块在加载时会被清理——孤立方块实体(支撑方块现在为空气)将被清除,容器中的未知物品将被清空。或者,按需运行 /pi admin sanitize。
性能
该模组旨在高效处理 15 个以上的并发岛屿:
- 岛屿在空置时会自动卸载(延迟 30 秒)
- 虚空世界的内存高效区块生成
- 可通过调试命令进行性能监控
致谢
首先,我要感谢我的朋友 Bktwone,他不仅启发了这个模组的开发,还提供了测试平台。
- 基于 Fantasy 构建,用于运行时维度创建
- 使用 Fabric API 进行模组钩子
Pocket Islands
A Minecraft mod for Fabric, Forge and NeoForge that gives each player their own persistent
pocket dimension island.
Supported Versions:
| Minecraft |
Fabric |
Forge |
NeoForge |
| 1.20.1 |
✓ |
✓ |
|
| 1.20.4 |
✓ |
|
|
| 1.21.11 |
✓ |
|
✓ |
Features
- Pocket Islands: Each player gets their own isolated island dimension
- Persistence: Islands survive main world resets
- Portal-Based Access: Build a portal frame, activate with emerald
- Invitation System: Invite friends to visit your island
- Void Generation: Clean slate void worlds with a starter island
Requirements
- Minecraft 1.20.1, 1.20.4, or 1.21.11
- Fabric: Fabric Loader (0.15.0+ for 1.20.x, 0.18.4+ for 1.21.x) and Fabric API
- Forge (1.20.1): Forge 47 or newer. Nothing else: Infiniverse is bundled in the jar
- NeoForge (1.21.11): NeoForge 21.11.45 or newer. Nothing else: Infiniverse is bundled in the jar
- Both client and server must have the mod installed
Server
- Install Fabric Loader, Forge or NeoForge on your server
- Download the Pocket Islands JAR for your MC version and loader
- Place in the server's
mods/ folder
- On Fabric, make sure Fabric API is also installed here
- Start the server
Client
- Install Fabric Loader, Forge or NeoForge
- Download the Pocket Islands JAR for your MC version and loader
- Place in your
mods/ folder
- On Fabric, make sure Fabric API is also installed here
- Launch Minecraft
Important: The mod must be installed on both client and server. See
FAQ for details.
Loader Differences
Islands work the same on every loader, with these exceptions:
|
Fabric |
Forge 1.20.1 / NeoForge 1.21.11 |
| Runtime dimensions |
Fantasy (bundled) |
Infiniverse (bundled) |
| Permissions |
LuckPerms through fabric-permissions-api, else OP levels |
LuckPerms through the loader's PermissionAPI, else OP levels |
| Island clock |
Own clock; doDaylightCycle: false freezes it |
Follows the overworld; doDaylightCycle has no effect on the island |
World seed (OVERWORLD/FLAT islands) |
Per island |
The overworld's seed. Void islands are not affected |
Console and command blocks always use OP levels for /pi permissions.
Moving a whole world between loaders is not supported: switching loaders replaces
the entire modpack. Individual islands can move: copy world/dimensions/personalworlds/ to
the other server (same Minecraft version) and the islands open without conversion. The
island registry, return positions and invitations stay with each server's own world. New
chunks of OVERWORLD/FLAT islands then generate with the other loader's seed (see the
table above).
Usage
Creating a Portal
This can be configured, this explanation uses the default configuration.
Build a frame using Nether Bricks (4 wide x 5 tall):
N N N N
N N
N N
N N
N N N N
Right-click the inside of the frame with an Emerald to activate.
Entering Your Island
Walk into the activated portal to enter your pocket island. On first entry, your
island is generated from your portal type's island layers. There is no return portal
on a new island.
Returning
The quickest way back is to jump off your island: below Y=0 you're teleported back to
where you entered, before taking any void damage.
To return by portal instead, build a frame on your island and activate it like the
first one (bring the frame blocks and activation item). Entering it takes you back to
your original location.
Commands
Player commands:
/pi invites - View your invitations (sent and received)
/pi invite <player> - Invite a player to your island
/pi invite <player> always - Invite with Always Welcome status (if enabled)
/pi uninvite <player> - Revoke a player's invitation
/pi togglewelcome <player> - Toggle Always Welcome for an existing invitation (if enabled)
/pi portals - View all configured portal types and your island status
Admin commands (op level 2+):
/pi admin list - List all islands
/pi admin info <player> - View island details
/pi admin tp <player> - Teleport to an island
/pi admin delete <player> [confirm] - Delete an island (op 4)
Debug commands (op level 4):
/pi debug perf enable - Enable performance monitoring
/pi debug perf disable - Disable performance monitoring
/pi debug perf status - Show performance status
/pi debug perf reset - Reset performance counters
Note: You should not need the debug commands, but they may be useful for
checking.
Configuration
Config file: config/pocketislands.json
Pocket Islands offers extensive customization options, particularly for island
composition. You can define multiple portal types, each creating islands with
different materials and properties.
Example Configuration
{
"portalTypes": [
{
"frameBlock": "minecraft:nether_bricks",
"activationItem": "minecraft:emerald",
"islandLayers": [
"minecraft:grass_block",
"minecraft:dirt",
"minecraft:stone"
],
"portalColor": "red"
}
],
"consumeActivationItem": false,
"maxInvitationsPerPlayer": 20,
"enableAlwaysWelcome": false,
"unloadEmptyDimensionDelayTicks": 600,
"cleanupIntervalTicks": 600,
"sanitizeChunksOnLoad": false,
"sanitizeRemoveOrphanBlocks": false,
"enableTeleportParticles": true,
"enableTeleportSounds": true,
"enablePortalActivationEffects": true,
"enableInvitationNotifications": true,
"dimensionGameRules": {
"doMobSpawning": false
}
}
Configuration Options
Portal Types (Island Customization)
Define multiple portal types to create islands with different materials:
frameBlock — Block used for portal frames (e.g., "minecraft:nether_bricks")
activationItem — Item used to activate portals (e.g., "minecraft:emerald")
islandLayers — Customize your starter island platform (up to 5 layers, top to bottom)
- Example:
["minecraft:grass_block", "minecraft:dirt", "minecraft:stone"]
- Create themed islands: grass/dirt/stone, netherrack/soul_sand/basalt, end_stone, etc.
- Each portal type creates a unique island composition
- Each layer is 1 block thick, for 2 dirt block layers, repeat the material in the array
portalColor — Color of the portal effect (default: "red")
- Available colors:
"white", "light_gray", "gray", "black", "brown", "red", "orange", "yellow", "lime", "green", "cyan", "light_blue", "blue", "purple", "magenta", "pink"
- Helps visually distinguish different portal types
Invitations
maxInvitationsPerPlayer — Maximum invitations per player (-1 for unlimited)
enableAlwaysWelcome — Enable the Always Welcome feature (default: false, requires restart)
Always Welcome Feature
By default, visitors can only enter your island when you are online and present
on your island. The Always Welcome feature allows island owners to grant
specific guests permanent access, bypassing these restrictions.
Enabling the Feature
Set enableAlwaysWelcome to true in your config and restart the server:
{
"enableAlwaysWelcome": true
}
Note: This setting requires a server restart to take effect. When disabled,
all Always Welcome commands are hidden and existing flags are ignored.
Using Always Welcome
Once enabled, island owners have two ways to grant Always Welcome status:
Option 1: Invite with Always Welcome
/pi invite Steve always
This creates a new invitation with Always Welcome enabled immediately.
Option 2: Toggle existing invitation
/pi togglewelcome Steve
This toggles the Always Welcome status on an existing invitation. Run it again
to disable.
Viewing Always Welcome Status
Use /pi invites to see your sent invitations. When the feature is enabled,
each invitation shows a clickable star indicator:
Sent (players who can visit you):
- Steve [★] [Revoke] ← Green star: Always Welcome ON
- Alex [☆] [Revoke] ← Gray star: Always Welcome OFF
Click the star to toggle the status directly from the chat.
Access Control Behavior
| Invitation Type |
Host Online + Home |
Host Online + Away |
Host Offline |
| Standard |
✓ Allowed |
✗ Denied |
✗ Denied |
| Always Welcome |
✓ Allowed |
✓ Allowed |
✓ Allowed |
Notes:
- Admins (OP level 2+) always bypass all visit restrictions
- The island owner can always access their own island
- Always Welcome guests still need an active invitation (uninviting removes access)
Performance
unloadEmptyDimensionDelayTicks — Delay before unloading empty dimensions (default: 600 = 30 seconds)
cleanupIntervalTicks — How often to check for empty dimensions (default: 600 = 30 seconds)
Chunk Sanitizer
sanitizeChunksOnLoad — Purge orphaned block entities and unknown container items on chunk load (default: false; opt-in)
sanitizeRemoveOrphanBlocks — Also remove blocks left without valid support (fires, torches, redstone, snow layers) during sanitization (default: false; only used when sanitizeChunksOnLoad is enabled)
Visual Effects
enableTeleportParticles — Show particle effects during teleportation
enableTeleportSounds — Play sound effects during teleportation
enablePortalActivationEffects — Show effects when activating portals
enableInvitationNotifications — Play sounds for invitation notifications
Advanced Options
consumeActivationItem — Whether the activation item is consumed on portal activation (default: false)
Dimension Game Rules
Pocket dimensions inherit all game rules from the overworld by default. You can override specific rules using the dimensionGameRules configuration:
{
"dimensionGameRules": {
"keepInventory": true,
"randomTickSpeed": 3,
"doMobSpawning": false
}
}
This configuration will:
- Force
keepInventory to true (players keep items on death)
- Force
randomTickSpeed to 3 (crop and plant growth multiplier)
- Force
doMobSpawning to false (mobs cannot spawn naturally)
- All other rules inherit from the overworld
Version-Specific Game Rule Names:
Minecraft 1.21.x renamed many game rules. Use the appropriate names for your server version:
| Feature |
1.20.x (camelCase) |
1.21.x (snake_case) |
| Keep inventory on death |
keepInventory |
keep_inventory |
| Mob spawning |
doMobSpawning |
spawn_mobs |
| Crop/plant growth speed |
randomTickSpeed |
random_tick_speed |
| Mob item drops |
doMobLoot |
mob_drops |
| Block drops |
doTileDrops |
block_drops |
| Mob griefing |
mobGriefing |
mob_griefing |
| Immediate respawn |
doImmediateRespawn |
immediate_respawn |
Default behavior:
- 1.20.x:
{"doMobSpawning": false} — Creates void islands with no mobs
- 1.21.x:
{"spawn_mobs": false} — Same behavior with renamed rule
NOTE: The intended behavior is that mob spawning is disabled in the
pocket dimension, it makes no sense to enable it as it is a VOID type world
but if you want to, you can enable it. Just set doMobSpawning / spawn_mobs
to true in the configuration.
This is an unsupported feature, and will not be accepted as a bug.
To inherit all rules from the overworld without changes, use an empty map:
{
"dimensionGameRules": {}
}
Creating Multiple Portal Types
You can define multiple portal types to create different island themes. Players
can choose which type of island they want by using different portal materials:
{
"portalTypes": [
{
"frameBlock": "minecraft:nether_bricks",
"activationItem": "minecraft:emerald",
"islandLayers": [
"minecraft:grass_block",
"minecraft:dirt",
"minecraft:stone"
],
"portalColor": "red"
},
{
"frameBlock": "minecraft:blackstone",
"activationItem": "minecraft:nether_star",
"islandLayers": [
"minecraft:netherrack",
"minecraft:soul_sand",
"minecraft:basalt"
],
"portalColor": "red"
},
{
"frameBlock": "minecraft:end_stone_bricks",
"activationItem": "minecraft:ender_pearl",
"islandLayers": [
"minecraft:end_stone"
],
"portalColor": "cyan"
}
]
}
Note: The first portal type a player uses determines their island
composition permanently.
Reloading Configuration
Use /pi admin reload to reload the configuration without restarting the
server. Changes to portal types only affect newly created islands.
Translations
Pocket Islands uses Fabric's standard language file system for all user-facing
messages. This allows server admins and modpack creators to customize messages
or add translations for different languages.
Language File Location
Language files are located at:
src/main/resources/assets/personalworlds/lang/
The mod includes an English (US) translation by default:
lang/en_us.json
Adding Custom Languages
To add support for another language (e.g., German, Dutch, Spanish):
-
Create a new language file with the appropriate locale code:
-
Copy the contents of en_us.json as a template
-
Translate the message values (keep the keys unchanged):
{
"pocketislands.message.invite_sent": "Eingeladen %s zu deiner Dimension",
"pocketislands.message.invite_received": "%s hat dich zu ihrer Dimension eingeladen",
// ...
}
- Place the file in
assets/personalworlds/lang/ in your resource pack or mod JAR
Customizing Messages
To customize messages while keeping the English language:
- Create a resource pack or edit
assets/personalworlds/lang/en_us.json directly
- Modify the translation values (right side of each line)
- Keep translation keys (left side) unchanged
- Use
%s for string parameters, %d for numbers
Example:
{
"pocketislands.message.invite_sent": "You invited %s to your island!",
"pocketislands.message.invite_received": "%s wants you to visit their island!"
}
Available Translation Keys
All translation keys are documented in lang/en_us.json. Key categories include:
pocketislands.message.* — Player-facing messages (invitations, ejections, teleports)
pocketislands.command.* — Command feedback and info
pocketislands.command.error.* — Error messages
pocketislands.invitations.* — Invitation list UI text
pocketislands.command.perf.* — Performance monitoring messages
pocketislands.command.list.* — Admin list command output
pocketislands.command.info.* — Admin info command output
pocketislands.command.delete.* — Admin delete command warnings
pocketislands.command.portals.* — Portal types listing and island status
Technical Details
Dimension Storage
Each pocket island is stored at:
world/dimensions/personalworlds/pw_<uuid>/
Where <uuid> is the player's UUID without dashes.
Metadata Recovery
Each dimension folder contains a .metadata file that enables recovery if the
main registry is corrupted. This file contains:
- Owner UUID
- Owner name
- Dimension ID
- Creation timestamp
- Spawn point
- Generator type
Edge Cases Handled
- Player disconnects in pocket island: Position preserved, dimension restored on reconnect even if unloaded
- Dimension unloaded while offline: Player is restored to their island with fallback to bed spawn or world spawn if restoration fails
- Server crashes: Recovery handler checks permissions and evacuates if needed
- Two players enter portal simultaneously: Concurrent portal guard prevents race conditions
- Return position is blocked: Safe spawn finder locates nearby safe position
- Invitation revoked while offline: Player evacuated on next login with fallback chain (return data → bed → spawn)
- Player falls off island: Automatically teleported back before taking void damage
- Unknown blocks or container items: With
sanitizeChunksOnLoad enabled, chunks are sanitized on load — orphaned block entities (backing block is now air) are purged, unknown items in containers are cleared. Alternatively, run /pi admin sanitize on demand.
Performance
The mod is designed to handle 15+ concurrent islands efficiently:
- Islands unload automatically when empty (after 30s delay)
- Memory-efficient chunk generation for void worlds
- Performance monitoring available via debug commands
Credits
First of all I want to credit my friend, Bktwone, for inspiring this mod as well
as providing a platform to test this mod.
- Built with Fantasy for runtime dimension creation
- Fabric API for mod hooks
评论 0
登录后参与评分
还没有评论,来抢沙发吧