Download Simple Rich Discord Presence — Minecraft Mods — MetaMods

Simple Rich Discord Presence

Active

Downloads

19

Last update

7 months ago

Versions

1.14.4 — 1.21.4
Client
Fabric
Forge
Neoforge
Social
Utils

Simple Rich Discord Presence

A modification that displays information about your gaming session in Discord through the Rich Presence system. Allows friends to see which world and dimension you are in, as well as receive other useful information about your gaming activities.

Main Features

Displays Minecraft game status in Discord with indication of current dimension and game mode. Shows whether you are in the main menu, loading, or exploring the game world.

Rich Presence Example

Configuration Settings

clientId: "Your Discord App ID"
enable: "Set to false to disable Discord Rich Presence"
screenEvent: "When set to false, disables the built-in screenEvent that tracks being in the main menu"
clientJoinEvent: "When set to false, disables the built-in clientJoinEvent that tracks player joining world and changing dimensions"

KubeJS Integration

The mod provides functions for advanced customization via KubeJS:

SDRP.setState(String message, String imageName, String imageKey)
message: text under the pack name, such as "In Overworld" or "In Nether", can pass string directly or localization key.
imageName: text when hovering over the small image, such as "Overworld" or "Nether", can pass string directly or localization key.
imageKey: name of Rich Present Art Asset resource to display, such as loading, overworld, menu and others.

SDRP.getCurrentState()
Gets the current client state.

Example of updating state on dimension change and joining world:

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 and Configuration

If you are using your own Rich Presence application, the following image keys are available:

logo
loading
menu

For dimensions, the key will be the registry name path of the dimension:

overworld
the_nether
the_end
yamda_dim

Messages and image names are configured through localization keys "sdrp..in" and "sdrp.". Localization keys can be modified and added through datapacks and mods like KubeJS.

Project members
Nanite

Nanite

Developer

Sunekaer

Sunekaer

Developer

ErrorMikey

ErrorMikey

Developer

Created: 7 Aug 2023

ID: 708