Compatibility
Minecraft: Java Edition
Platforms
Supported environments
90% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Creators
Details
Changelog
CraftPresence Changes
v2.0.0 Alpha 2 (12/23/2022)
A Detailed Changelog from the last release is available here
Changes
- Java 7 is no longer supported! (You should be using at least Java 8 by now!)
- The mod will still display as using Java 7 bytecode on legacy versions, but will be utilizing Java 8 APIs
- The mod will crash on initialization with a
RuntimeException
when used on anything below Java 8
- Reworked the way placeholders are interpreted to utilize Starscript
- This integration will allow for significantly more flexibility and overall control over placeholders and how they can be used
- Due to this change, all placeholder names have been adjusted (See the
Placeholders
section of this changelog) - Aditionally, the
allowPlaceholderOperators
option has been removed, due to being redundant
- Adjusted module logic to perform within their own sub-threads, in an effort to avoid waiting on them to retrieve data
- IE the initial retrieval of data when a module is first enabled is now multi-threaded, taking up much less time!
- Migrated the Config Systems from
Properties
toGSON
- A one-time migration layer has been put into place to migrate your v1.x settings over to the v2.x format
- The logic behind data validation has been condensed to be more performant, and this change allows config settings to be more easily migrated across major updates
- Background Options, such as the tooltip and GUI backgrounds, have been reset, since
splitCharacter
was also removed, since we don't use Arrays in this new system
- Added the ability for Module elements to supply their own
PresenceData
- When supplied and enabled, this will do one of two things:
- If
useAsMain
is enabled, this will allow an event to become the generic event rather then simple argument replacement, which is similar to the way SimpleRPC (By Hypherion) presents it's data. - Otherwise, if
useAsMain
is disabled, this allows a placeholder to be interpreted differently depending on the RPC field that placeholder is within. An example of this would be being able to make&DIMENSION&
equalthis
if it is used in theDetails
Presence Field, while equalingthat
if used in theGame State
Presence Field.
- If
- When supplied and enabled, this will do one of two things:
- Added more flexibility and usage to endpoint icons, including the addition of the
allowEndpointIcons
- For users, the new usages also include fetching the server icon in the Server Settings Scroll Lists, if the Base64 icon is unavailable
- It also allows for fetching a dynamic server icon if the icon's the module is looking for do not exist within the Discord Asset List, and doing similar activity for the player's head icon.
- Multiple Accessibility improvements have been made to the GUI in an effort to be more descriptive and user-friendly
- Added support for the per-gui, per-item, and per-entity systems to have RPC Icon Support
- Added support for transferring a Simple RPC (By HypherionSA) config to CraftPresence (With permission, of course!)
- Removed the ViveCraft Message Option and Fallback Placeholder Message
- Alpha Note: The ViveCraft Option will be replaced by something before v2.0 fully releases!
- UUIDs are now refreshed in the Entity Module List when the Server's Player List changes
- This prevents a lot of extra elements from coming into the module list, which should keep things cleaner
- Backend: Increased the default text limit for all
ExtendedTextControl
's- Due to this change, minified placeholder support has been removed from the backend
Fixes
- Fixed the GUI module systems not working properly on 1.14+ ports
- Note: Different Loaders may have different screen names, depending on mappings
- Fixed improper options being available in the Dynamic Editor Screen when adding data that was preliminary-supplied from other modules
- Fixed interpreting Dynamic Icons with Spaces in them (
formatAsIcon
is now ignored for Custom Assets, but null checks do remain) - Fixed Texture saving issues for the
tooltipBackgroundColor
,tooltipBorderColor
,guiBackgroundColor
, and thebuttonBackgroundColor
setting - Fixed issues that could occur when
setControlMessage
was fired with a null argument - Fixed the UUID placeholders in
&IGN&
being available, even if it wasn't a valid UUID - Fixed a regression in MultiMC-type instance detection from
v1.9.0
that caused a normal error to not be suppressed properly - Fixed multiple issues preventing the ability to hide placeholder output depending on a per-module value
- IE You can set the
textOverride
to be an empty string in the frontend, and the mod will respect that
- IE You can set the
- Fixed preliminary-supplied data being able to be removed via the Dynamic Editor Screen
- Only the config entry should have been effected, not the actual module data list
- Fixed Out-Of-Bound issues when there are less then 3 or 4 search results in a Scrollable List
- This issue caused no elements to display until you scrolled, causing it to clamp back to normal values
- The list will now reset the scroll when the list is updated
- Fixed Issues where data relying on the
children
list was unavailable in 1.13+ ports (Tab-Focus changing) - Fixed Issues where the focus status was not being checked for
keyPressed
andcharTyped
on 1.13+ ports- This also fixes hearing a clicking sound when
KP_ENTER
,ENTER
or the spacebar was pushed while focused on a text box
- This also fixes hearing a clicking sound when
- Backend: Fixed
ImageUtils
dynamic texture creation not complying with 1.13+ namespace requirements
Placeholders
One of the foundational changes that have been made to CraftPresence, is with placeholder interpetation.
With the integration of Starscript, several changes, additions, and removals have been made to placeholders and their related systems:
-
Placeholders can now be used anywhere, without restrictions
-
Programmer expressions (Such as formatting, operators, as well as custom functions) have been implemented to allow an even greater level of customizability then we've ever had prior
- See their wiki for some of the standard functions now available
-
The OR operator, initially added in v1.9.x, has been replaced with Starscript usages
- Prior usages will migrate to an
{foo != null ? foo : bar}
format to replicate the prior behavior
- Prior usages will migrate to an
-
All Placeholders have been renamed, converting to an
{foo.bar}
format instead of&FOO:BAR&
- All prior usages from v1 configs will also be migrated to follow the new names as mentioned below:
-
Renamed Placeholders (
old
=>new
, Surround with{}
when using new names):&DEFAULT&
=>general.icon
(Icons Only)&MAINMENU&
=>menu.message
,menu.icon
(Depends on config setting)&BRAND&
=>general.brand
&MCVERSION&
=>general.version
&IGN&
=>custom.player_info_out
,player.icon
(Depends on config setting)&IGN:NAME&
,&NAME&
(FromplayerOuterInfoPlaceholder
) =>player.name
&IGN:UUID&
,&UUID&
(FromplayerOuterInfoPlaceholder
) =>player.uuid.short
&IGN:UUID_FULL&
,&UUID_FULL&
(FromplayerOuterInfoPlaceholder
) =>player.uuid.full
&MODS
=>custom.mods
&MODS:MODCOUNT&
,&MODCOUNT&
(FrommodsPlaceholder
) =>general.mods
&PACK&
=>custom.pack
,pack.icon
(Depends on config setting)&PACK:NAME&
,&NAME&
(FrommodpackMessage
) =>pack.name
&DIMENSION:DIMENSION&
,&DIMENSION&
(From Dimension Settings) =>dimension.name
&DIMENSION:ICON&
,&ICON&
(From Dimension Settings) =>dimension.icon
&DIMENSION&
=>dimension.message
,dimension.icon
(Depends on config setting)&BIOME:BIOME&
,&BIOME&
(From Biome Settings) =>biome.name
&BIOME:ICON&
,&ICON&
(From Biome Settings) =>biome.icon
&BIOME&
=>biome.message
,biome.icon
(Depends on config setting)&SERVER:IP&
,&IP&
(From Server Settings) =>server.address
&SERVER:NAME&
,&NAME&
(From Server Settings) =>server.name
&SERVER:MOTD&
,&MOTD&
(From Server Settings) =>server.motd.raw
&SERVER:ICON&
,&ICON&
(From Server Settings) =>server.icon
&SERVER&
=>server.message
,server.icon
(Depends on config setting)&SERVER:PLAYERS&
,&PLAYERS&
(From Server Settings) =>custom.players
&SERVER:WORLDINFO&
,&WORLDINFO&
(From Server Settings) =>custom.world_info
&SERVER:PLAYERINFO&
,&PLAYERINFO&
(From Server Settings) =>custom.player_info_in
&SERVER:PLAYERINFO:COORDS&
,&PLAYERINFO:COORDS&
(From Server Settings),&COORDS&
( FromplayerInnerInfoPlaceholder
) =>custom.player_info_coordinate
&SERVER:PLAYERINFO:HEALTH&
,&PLAYERINFO:HEALTH&
(From Server Settings),&HEALTH&
( FromplayerInnerInfoPlaceholder
) =>custom.player_info_health
&SERVER:PLAYERINFO:COORDS:xPosition&
,&PLAYERINFO:COORDS:xPosition&
(From Server Settings) ,&COORDS:xPosition&
(FromplayerInnerInfoPlaceholder
),&xPosition&
(FromplayerCoordinatePlaceholder
) =>player.position.x
&SERVER:PLAYERINFO:COORDS:yPosition&
,&PLAYERINFO:COORDS:yPosition&
(From Server Settings) ,&COORDS:yPosition&
(FromplayerInnerInfoPlaceholder
),&yPosition&
(FromplayerCoordinatePlaceholder
) =>player.position.y
&SERVER:PLAYERINFO:COORDS:zPosition&
,&PLAYERINFO:COORDS:zPosition&
(From Server Settings) ,&COORDS:zPosition&
(FromplayerInnerInfoPlaceholder
),&zPosition&
(FromplayerCoordinatePlaceholder
) =>player.position.z
&SERVER:PLAYERINFO:HEALTH:CURRENT&
,&PLAYERINFO:HEALTH:CURRENT&
(From Server Settings),&HEALTH:CURRENT&
( FromplayerInnerInfoPlaceholder
),&CURRENT&
(FromplayerHealthPlaceholder
) =>player.health.current
&SERVER:PLAYERINFO:HEALTH:MAX&
,&PLAYERINFO:HEALTH:MAX&
(From Server Settings),&HEALTH:MAX&
( FromplayerInnerInfoPlaceholder
),&MAX&
(FromplayerHealthPlaceholder
) =>player.health.max
&SERVER:PLAYERS:CURRENT&
,&PLAYERS:CURRENT&
(From Server Settings),&CURRENT&
(FromplayerListPlaceholder
) =>server.players.current
&SERVER:PLAYERS:MAX&
,&PLAYERS:MAX&
(From Server Settings),&MAX&
(FromplayerListPlaceholder
) =>server.players.max
&SERVER:WORLDINFO:DIFFICULTY&
,&WORLDINFO:DIFFICULTY&
(From Server Settings),&DIFFICULTY&
( FromworldDataPlaceholder
) =>world.difficulty
&SERVER:WORLDINFO:WORLDNAME&
,&WORLDINFO:WORLDNAME&
(From Server Settings),&WORLDNAME&
( FromworldDataPlaceholder
) =>world.name
&SERVER:WORLDINFO:WORLDTIME&
,&WORLDINFO:WORLDTIME&
(From Server Settings),&WORLDTIME&
( FromworldDataPlaceholder
) =>world.time24
&SERVER:WORLDINFO:WORLDTIME12&
,&WORLDINFO:WORLDTIME12&
(From Server Settings),&WORLDTIME12&
( FromworldDataPlaceholder
) =>world.time12
&SERVER:WORLDINFO:WORLDDAY&
,&WORLDINFO:WORLDDAY&
(From Server Settings),&WORLDDAY&
( FromworldDataPlaceholder
) =>world.day
&SCREEN:SCREEN&
,&SCREEN&
(From Gui Settings) =>screen.name
&SCREEN:ICON&
,&ICON&
(From Gui Settings) =>screen.icon
&SCREEN:CLASS&
,&CLASS&
(From Gui Settings) =>data.screen.class
&SCREEN&
=>screen.message
,screen.icon
(Depends on config setting)&TARGETENTITY:ENTITY&
,&ENTITY&
(From Target Entity Settings) =>entity.target.name
&TARGETENTITY:ICON&
,&ICON&
(From Target Entity Settings) =>entity.target.icon
&TARGETENTITY&
=>entity.target.message
,entity.target.icon
(Depends on config setting)&RIDINGENTITY:ENTITY&
,&ENTITY&
(From Riding Entity Settings) =>entity.riding.name
&RIDINGENTITY:ICON&
,&ICON&
(From Riding Entity Settings) =>entity.riding.icon
&RIDINGENTITY&
=>entity.riding.message
,entity.riding.icon
(Depends on config setting)&TILEENTITY:[SLOT]&
,&[SLOT]&
(FromplayerItemsPlaceholder
) =>item.[slotIdentifier].message
&TILEENTITY&
=>item.message.default
&ITEM&
(From Item Settings) =>item.message.holding
-
Added Placeholders:
server.motd.line.*
added to display only the specified line fromserver.motd.raw
world.time12
added to displayworld.time24
in anxx:xx AM/PM
formatplayer.icon
added ifallowEndpointIcons
is active and a validplayerSkinEndpoint
is supplied*.instance
and*.class
placeholders added to relevantGui
,Entity
, andTile Entity
Modules
-
Removed (or moved) Placeholders:
- NBT placeholders have moved from being module only as
&[tagName]&
to being able to be used anywhere with anbt.[module].[tagName]
format player.position.*
andplayer.health.*
placeholders now identify asDouble
instead of Stringsserver.players.*
placeholders now identify asInteger
instead of Strings
- NBT placeholders have moved from being module only as
Translations
The following changes have been made for translations:
- Added:
gui.config.message.editor.original
(Used in Scroll List tooltips)gui.config.message.button.remove
(Used in Dynamic Editors)gui.config.{name,comment}.advanced.allow_endpoint_icons
(Added Property)gui.config.{name,comment}.advanced.server_icon_endpoint
(Added Property)gui.config.{name,comment}.display.dynamic_variables
(Added Property)gui.config.{name,comment}.display.enabled
(Added Property)gui.config.{name,comment}.display.use_as_main
(Added Property)craftpresence.defaults.integrations.*
(New namespace for Mod Integrations, only ReplayMod at the moment)craftpresence.command.export.progress
(Added Progress notifier for/cp export assets
)craftpresence.command.compile
(Output for/cp compile
)
- Modified:
gui.config.comment.button.sync.config
(Modified for new config file name)gui.config.comment.advanced.{item,entity_target,entity_riding}_messages
(Modified to remove seperate tag placeholder section)gui.config.comment.display.{button_messages,dynamic_icons}
(Modified to remove outdated info)craftpresence.defaults.*
(Related toPlaceholders
Section)craftpresence.placeholders.*
(SeePlaceholders
Section)craftpresence.command.usage.main
(Modified for/cp compile
command)
- Removed:
craftpresence.logger.error.config.adjust.global
craftpresence.logger.info.config.notice
craftpresence.exception.config.prop.null
gui.config.{name,comment}.advanced.split_character
(Removed Property)gui.config.message.remove
gui.config.message.tags
gui.config.[name,comment].status_messages.placeholder.*
(Moved to the Dynamic Variables UI)
More Information
Known Issues
This release represents a work-in-progress build of CraftPresence's v2.0 release, planned for 2023. It does not in any way, shape, or form represent a final product, in either it's backend or frontend implementation.
Despite configuration compatibility being ensured between v1.8.x/v1.9.x and v2.0, caution is advised to ensure the best experience, while also baring in mind that features can change, be added, or outright removed without forewarning and without compatibility between future Alpha releases.
The following known issues are present in this build:
- Text with colors do not retain those colors if that text moves to a newline in the CraftPresence UIs
- The behavior for Resetting and Syncing a Local Config has been changed and may have issues!
- The HypherionMC Config Layer (To Convert a Simple RPC config to CraftPresence) is heavily work in progress:
- Placeholders related to the realm event are currently unimplemented and parse as
{''}
. %weather%
is also unimplemented at this time, and will also parse as{''}
- Placeholders related to the realm event are currently unimplemented and parse as
1.13.x Build Info
The Rift Edition of this Mod Requires the Rift ModLoader and contains the following differences to take Note of:
- KeyCodes have changed from an LWJGL Upgrade! Be Sure to check and edit your KeyBinds if migrating from 1.12.2 and below.
Starting in v1.5.0, The 1.13 Rift Port of CraftPresence was deprecated in favor of the 1.13.2 Rift Port.
Starting in v1.7.0, The aforementioned KeyCode warning is now void, due to new systems introduced to convert keybindings between LWJGL versions, and this message will be removed in v1.7.1.
Note: Due to Maven Troubles on behalf of the Rift Team, Rift Versions are no longer supported as of v1.6.1, though the differences do still take effect for Forge.
1.14+ Build Info
Some 1.14+ Ports of this Mod require the FabricMC ModLoader and contains the same differences as the 1.13.x Port.
Snapshot Build Info
Some Versions of this Mod are for Minecraft Snapshots or Experimental Versions, and as such, caution should be noted.
Any Snapshot Build released will be marked as BETA to match its Snapshot Status depending on tests done before release and issues found.
Snapshot Builds, depending on circumstances, may also contain changes for a future version of the mod, and will be noted as so if this is the case.
Legacy Build Info (Minecraft Versions 1.5.2 and Below)
Ports of this Mod for Minecraft Versions 1.5.2 and Lower are on very limited support, if using CraftPresence v1.8.11 and lower.
Please keep in mind the following:
- Ports for MC 1.6.4 and lower will now show Images for
ServerData
type Scroll Lists, as Mojang did not implement the logic for this until MC 1.7 and above - The MC a1.1.2_01 Port has its Dimension and Biome Modules disabled, as Mojang did not implement the logic for this until MC a1.2.x and above
- Bugs that are related to or are caused by issues in the Vanilla Codebase, are unlikely able to be fixed due to Minecraft's limitations
See the Mod Description // README for More Info
Files
Metadata
Release channel
AlphaVersion number
v2.0.0-alpha.2+b1.4_01_universalLoaders
Game versions
b1.4_01Downloads
22Publication date
December 24, 2022 at 12:00 AMPublisher
CDAGaming
Owner