简单的 Discord 富游戏状态
配置:
clientId: "你的 Discord 应用 ID"
enable: "如果你希望禁用 Discord 富游戏状态,将此设置为 false。"
screenEvent: 如果设置为 false,将禁用内置的 screenEvent,该事件用于判断我们是否在主菜单中。"
clientJoinEvent: 如果设置为 false,将禁用内置的 clientJoinEvent,该事件用于判断玩家何时加入世界并切换维度。"
KubeJS 集成
函数:
SDRP.setState( String message, String imageName, String imageKey ) message: 显示在资源包名称下方的消息,例如“In Overworld”或“In Nether”,可以传入要显示的文本字符串或语言键(lang key)。 imageName: 悬停在小型图片上时显示的文本,例如“Overworld”或“Nether”,可以传入要显示的文本字符串或语言键(lang key)。 imageKey : 要显示的 Rich Present Art Asset 的名称,例如 loading、overworld、menu 等。
SDRP.getCurrentState() 获取客户端当前设置的状态。
示例:
在维度变更和加入世界时更新状态。
kubejs/startup_script/sdrp.js
onForgeEvent(
"net.minecraftforge.event.entity.EntityJoinWorldEvent",
(event) => {
if (event.getEntity().type === "entity.minecraft.player") {
if (event.getWorld().isClientSide()) {
const dimPath = event.getWorld().dimension().location().getPath();
SDRP.setState(sdrp.${dimPath}.in, sdrp.${dimPath}, "dimPath");
}
}
}
);
如果你使用的是自己的 Rich Presence(丰富状态)应用程序,则可使用以下图片键。(默认 Rich Presence 应用程序中使用的图片可在 [此处] () 找到。)
logo
loading
menu
对于维度(dimensions),该键将是维度的注册名称路径,例如:
主世界
下界
末地
yamda_dim
对于提示信息(例如“在主世界”),通过语言键 "sdrp.<维度注册表名称路径>.in" 实现。
对于图片名称(例如在小图片上悬停时显示的“主世界”),通过语言键 "sdrp.<维度注册表名称路径>" 实现。
语言键可以通过数据包进行修改和添加,也可以使用 KubeJS 等模组来实现。
Simple Discord Rich Presence
Config:
clientId: "Your Discord App ID"
enable: "If you wish to disable Discord Rich Presence, set this to false."
screenEvent: If set to false, it disables the build in screenEvent, which is used to tell when we are on the main menu."
clientJoinEvent: If set to false, it disables the build in clientJoinEvent, which is used to tell when the player is joining a world and changing Dimension."
KubeJS Integration
Functions:
SDRP.setState( String message, String imageName, String imageKey )
message: message to show under the packname aka "In Overworld" or "In Nether", can be passed a string with the text to show or a lang key.
imageName: the text to show when hovering over the small image aka "Overworld" or "Nether", can be passed a string with the text to show or a lang key.
imageKey : the name Rich Present Art Asset to show, like loading, overworld, menu and so on.
SDRP.getCurrentState()
Gets the current state the client is set to.
Examples:
Update state on dimension change and joining world.
kubejs/startup_script/sdrp.js
onForgeEvent(
"net.minecraftforge.event.entity.EntityJoinWorldEvent",
(event) => {
if (event.getEntity().type === "entity.minecraft.player") {
if (event.getWorld().isClientSide()) {
const dimPath = event.getWorld().dimension().location().getPath();
SDRP.setState(`sdrp.${dimPath}.in`, `sdrp.${dimPath}`, "dimPath");
}
}
}
);
Image keys for if you are using your own Rich Presence Application. (Images used on the default Rich Presence Application can be found HERE)
logo
loading
menu
For dimensions, the key will be the registry name path of the dimension like:
overworld
the_nether
the_end
yamda_dim
For the message (stuff like "In Overworld") is done via lang keys "sdrp.<registry name path of the dimension>.in"
For imageName (stuff like "Overworld" when hovering over the small image) is done via lang keys "sdrp.<registry name path of the dimension>"
Lang keys can be modified and added via data packs and using mods like KubeJS
下载 Simple Rich Discord Presence
下载 Simple Rich Discord Presence
下载 Simple Rich Discord Presence
下载 Simple Rich Discord Presence
下载 Simple Rich Discord Presence
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Simple Rich Discord Presence
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Simple Rich Discord Presence
下载 Simple Rich Discord Presence
下载 Simple Rich Discord Presence
下载 Simple Rich Discord Presence
未找到更新日志数据
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧