
在 (neo)forge 上需要安装 Connector 和 FFAPI。
Switchy 允许玩家创建并在不同的 玩家配置(player profiles) 之间切换,这些配置会保存部分玩家数据。
该功能既支持 数据驱动,也支持 玩家自定义。以下是一个结合了 Styled Nicknames 和 Fabric Tailor(以及 SCH)的配置示例:

同时内置了对 Lampblack Pronouns、Trinkets/Accessories、Pehkui(宽/高缩放)以及 Origins 的支持(通过数据包实现)。
你甚至可以像使用 PluralKit 一样,流畅地使用其他配置文件的显示名称进行聊天:

这完全兼容表现良好的聊天桥接插件,例如 我们的 cantilever 分支版本!
使用方法
免责声明:所有操纵玩家数据的模组都存在存档损坏的风险!
请务必定期备份你的世界存档,尤其是在更新模组时。
直接运行 /switchy 并跟随提示操作即可! 这涵盖了重命名、切换组件以及创建新配置文件的功能。
之后,你可以通过 /switch <name> 或在配置文件列表中点击 <switch> 来自由切换配置文件。
切换到某个配置文件会将组件数据恢复到 该配置文件上次被使用时所处的状态。
因此,若要更改某配置文件的 Fabric Tailor 皮肤,请先切换到该配置文件,设置好皮肤后再切换出去。
你可以使用 /switchy say 发送一条聊天消息,就像你已经切换到特定配置文件一样。
使用 /switchy edit <name> tag <prefix>text<suffix> 可以基于特定模式匹配常规聊天消息。
由于显示名称与风格化昵称/聊天的外观略有不同,请相应调整它们的配置以保持一致。
配置文件是按世界独立的,因此你可以运行 /switchy export 将你的姓名/皮肤数据导出到 .json 文件中以加快加载速度。
要导入数据,请将文件上传(例如到 tmpfiles.org),然后将链接粘贴到 /switchy import all <url> 中。
你也可以从 PK 导入(并从 / 导出到 Utter)——使用 /switchy import <member/group> 来过滤导入内容。
兼容性
注意:如果 Switchy 导致你的 1.20 整合包崩溃,请在
config/switchy.toml中将fastSingleplayerReconnect设置为false。
为了与新模组保持兼容,组件定义如下所示:
// data/minecraft/switchy_components/inventory/ender_chest.json (minecraft:inventory/ender_chest)
{
"enabled": true, // 是否加载此组件。请使用此选项而不是删除默认文件,因为它们会自动重新生成。
"codec": "inventory", // 使用哪个编解码器(来自 SwitchyComponentTypes 注册表)来反序列化数据。默认为 "nbt"(透传模式)
"path": "EnderItems", // NBT 路径,指向要从 player.dat 中加载或修改的部分
"preview": "inventory", // 在聊天中使用哪个文本预览器(来自 SwitchyComponentTypes 注册表)。null = toString(),对于长数据请使用 "trunc"。以 $ 开头可针对透传组件使用 NBT 路径。
"prefix": "? ", // 添加到文本预览前的前缀,便于快速浏览
"emptyChecker": "inventory", // 使用哪个空值检查器(来自 SwitchyComponentTypes 注册表)以防止珍贵数据被意外删除配置文件。以 $ 开头可针对透传组件使用 NBT 路径。
"group": "inventory", // 具有匹配组 ID 的组件将被视为一个组件进行预览和切换
"default": [], // 默认值。JSON 序列化。设置为 "$copy" 以复制上一个值。设置为 null 或省略以在初始状态下从玩家数据中删除该键。
"hidden": false // 在配置文件列表中隐藏组件预览(但在组件列表中仍会显示)
}
欢迎提交包含组件(以及 无依赖关系 的预览器等)的 PR 至主模组 —— 请参阅 现有示例。
切换非玩家 NBT 的数据需要额外的插件支持。API 待定 —— 感兴趣的插件开发者可以访问 问题页面。
后记
如果你是多元人格系统(或多身份用户),或者是他们的朋友,并且欣赏我们的工作,请考虑阅读并分享 sys.guide,这是我们编写的多元性指南手册。
Switchy 是我们制作的第一款原创 Minecraft 模组,诞生于模组创作活动 ModFest: Singularity。
自制作以来,Minecraft 模组社区给予了我们友谊、指导,
无尽的帮助,自我表达的途径,并强化了我们把软件视为一种艺术的热情。
每一位参与其中的人——你们知道自己是谁——谢谢你们。

Requires Connector and FFAPI on (neo)forge.
Switchy allows players to create and switch between player profiles, which save part of their player data.
This is both data-driven and player-customizable. Here's a profile with Styled Nicknames and Fabric Tailor (+SCH):

Support is also built-in (via data) for Lampblack Pronouns, Trinkets/Accessories, Pehkui (width/height), and Origins.
You can even fluently chat using the display names of other profiles, just like PluralKit:

This is fully compatible with well-behaved chat bridges, like our cantilever fork!
Usage
Disclaimer: All mods that manipulate player data have a save corruption risk!
Always take backups of your worlds, especially when updating mods.
Just run /switchy and follow the hints! This covers renaming, toggling components, and making new profiles.
After this, you can freely switch profiles via /switch <name> or by clicking <switch> in the profile list.
Switching into a profile restores component data to the state it was in was when the profile was last used.
So to change e.g. a fabric tailor skin for a profile, switch into the profile first, set the skin, and switch out.
You can use /switchy say to send a chat message as if you were switched into a specific profile.
Use /switchy edit <name> tag <prefix>text<suffix> to match regular chat messages based on a pattern.
Display names look slightly different to styled nicknames/chat, so just adjust their configs to match.
Profiles are per-world, so speed things up by running /switchy export to get your name/skin data to save to a .json file.
To import, upload the file (e.g. to tmpfiles.org) and paste the link into /switchy import all <url>.
You can also import from PK (and import from / export to Utter) - use /switchy import <member/group> to filter imports.
Compatibility
Note: If Switchy crashes your 1.20 modpack, set
fastSingleplayerReconnecttofalseinconfig/switchy.toml
For compatibility with new mods, components are defined like so:
// data/minecraft/switchy_components/inventory/ender_chest.json (minecraft:inventory/ender_chest)
{
"enabled": true, // whether to load the component at all. use this instead of deleting default files, as they'll regenerate.
"codec": "inventory", // which codec (from the registry in SwitchyComponentTypes) to use to deserialize the data. defaults to "nbt" (passthrough)
"path": "EnderItems", // NBT path targeting the part of player.dat to load from / modify to
"preview": "inventory", // which text previewer (from the registry in SwitchyComponentTypes) to use in chat. null = toString(), use "trunc" for long data. Start with $ to use an NBT path for passthrough components.
"prefix": "? ", // a prefix to add to the text preview, for glanceability
"emptyChecker": "inventory", // which empty checker (from the registry in SwitchyComponentTypes) to use to prevent profile deletion for precious data. Start with $ to use an NBT path for passthrough components.
"group": "inventory", // components with a matching group ID will be previewed and toggled as if they're one component
"default": [], // default value. JSON serialized. set to "$copy" to copy the value from previous. set to null or omit to delete the key from player data as the initial value.
"hidden": false // hides the component preview in the profiles list (still shown in the components list)
}
Feel free to PR components (and previewers/etc with no dependencies) into the main mod - see existing examples.
Switching data outside player NBT requires an addon. API TBD - Interested addon devs can hit up the issues page.
Afterword
If you're a plural system (or a friend to one) and appreciate our work, please consider reading and sharing sys.guide, our plurality handbook.
Switchy was our first original minecraft mod, made during the mod jam ModFest: Singularity.
Since making it, the minecraft modding community has given us friendship, mentorship,
endless favours, an outlet for self-expression, and reinforced our passion for software as an art.
Everyone who's been a part of that - and you should know who you are - thank you.
下载 Switchy
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Switchy
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Switchy
下载 Switchy
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Switchy
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Switchy
下载 Switchy
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Switchy
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Switchy
下载 Switchy
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
适用于 MC 1.18+ 的 Effekseer 加载器
评论 0
登录后参与评分
还没有评论,来抢沙发吧