Skip to content

Commit

Permalink
[Change] Begin v2.4.1 Development
Browse files Browse the repository at this point in the history
- Gradle shadow plugin retired
  - The Gradle plugin "com.github.johnrengelman.shadow" has been retired.
  - See GradleUp/shadow#908 for further info.
  - Switched to the fork
"io.github.goooler.shadow"
  • Loading branch information
CDAGaming committed Jun 14, 2024
1 parent f46c2ee commit cd4f9f5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 129 deletions.
130 changes: 4 additions & 126 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,142 +1,20 @@
# CraftPresence Changes

## v2.4.0 (06/13/2024)
## v2.4.1 (??/??/2024)

_A Detailed Changelog from the last release is
available [here](https://gitlab.com/CDAGaming/CraftPresence/-/compare/release%2Fv2.3.9...release%2Fv2.4.0)_
available [here](https://gitlab.com/CDAGaming/CraftPresence/-/compare/release%2Fv2.4.0...release%2Fv2.4.1)_

See the Mod Description or [README](https://gitlab.com/CDAGaming/CraftPresence) for more info regarding the mod.

### Changes

* (Backend) Updated Build Dependencies (Please see the appropriate repositories for changes)
* Unimined (`1.2.3` -> `1.2.7`)
* JVMDowngrader (`local` -> `0.7.1`)
* ModPublisher (`2.1.1` -> `2.1.4`)
* ModFusioner (`1.0.10` -> `1.0.12`)
* Fabric Loader (`0.15.10` -> `0.15.11`)
* Lenni Reflect (`1.3.2` -> `1.3.4`)
* UniCore (`1.0.10` -> `1.1.9`)
* DiscordIPC (`0.8.7` -> `0.9.1`)
* Starscript (`0.3.0` -> `0.3.3`)
* SpotBugs Annotations (`4.8.4` -> `4.8.5`)
* ClassGraph (`4.8.172` -> `4.8.173`)
* All versions of the mod are now built using Java 21, rather than being dependent on legacy Java
* This allows us to have a consistent API as well as develop under the current modern standards
* In versions where a downgrade is needed, this is performed using `JVMDowngrader` to ensure API compatibility
* Adjusted the way `Dimension` and `Biome` module data is loaded in MC 1.16+
* These changes are designed to support auto-locating data related to data pack additions
* These changes also resolve issues where repeated Registry Lookups could cause a crash in both modules
* Additional performance improvements have also been implemented for all MC versions for these modules
* Added a new script function, `getComponent`, to support the new `DataComponent` system introduced in MC 1.20.5+
* Usage: `getComponent(data=DataComponentHolder, path=String)`
* On versions below MC 1.20.5, an error will appear instead
* Removed the `hasAlphaNumeric`, `hasWhitespace`, and `replace` script functions due to being obsolete
* The backend for these functions was barely functional and has been largely obsolete for a while
* Added new `.identifier` placeholders for the `Biome` and `Dimension` modules
* (Backend) The default formatting for a slider's display value is now `%.1f` instead of a raw append
* Added a `Sync End Color` button to the `Color Editor` UI
* Pressing this button, will set the `endData` to the current `startColor` data, effectively useful for quickly
removing the `endColor` data from the final saving
* Adjusted Mod Initialization in MC 1.7.10 and below to better detect (and avoid) running the mod on server-side
* This uses a similar system implemented for MC 1.13+ in v2.2.4
* This change is only applied for Forge, Risugami ModLoader, or users on similar modloaders
* Added a new `Advanced` Config Setting to toggle `ClassGraph` functionality
* This option allows disabling several backend functions, improving memory usage at the cost of some module
functionality
* Disabling this feature will prevent module auto-lookup functionality in some cases, but is set by default to be
disabled in response to several concerns over memory usage
* (Backend) Adjusted Module Auto-Retrieval Processes for improved usability and error prevention
* `Module#getAllData` has been split into `Module#getInternalData` and `Module#getConfigData`
* `Module#scanForData` has been similarly split up, with separate threads now spawned for each part of the
auto-lookup
* `Module#canFetchData` has been split into `Module#canFetchInternals` and `Module#canFetchConfig`
* `Module#hasScanned...` and `Module#queue...` functions have also been added for configuring when to scan for what
data
* To align better with MC 1.20.5 and above, the scan order has been inverted for modules, with `config` data being
scanned first before `internal` data
* (Backend) Added `printException` for Config Modules, now used in `setProperty`
* These exceptions will only display while `Debug Mode` is enabled
* Adjusted the way the `general.mods` placeholder is calculated (`Constants#getModCount`)
* Now uses a `Supplier` from each implemented loader rather than Reflection
Statements (`Constants#MOD_COUNT_SUPPLIER`)
* Quilt now falls back to `getRawModCount` due to not having an independent build layer
* Added support for Rift, Flint, and Risugami ModLoader mod counts
* Fixes placeholder functionality for Forge 1.13+
* (Backend) Improved performance for various placeholder argument options as well as compiling data
* These changes should conform better towards how Starscript was meant to be used
* (Breaking) Overhauled the `Override` system for Placeholder Arguments
* `overrides.` placeholders have been removed, with overrides now applied directly to the placeholder
when `useAsMain` is false and such override data exists
* Empty Parts of the `Presence Editor` are no longer ignored if `useAsMain` was false
* For `useAsMain` mode, the `forcedData` iteration has been adjusted to now use the first non-null entry, rather
than the last
* Shadow (`[email protected]` -> `[email protected]`)

### Fixes

* (Backend) Modified `ExtendedScreen#getButtonY` to properly respond to `ScrollPane` padding and to better clarify the
logic
* For screens where this is used, this places UI elements in the proper position comparable to v1.x versions
* Old Calculation: `(40 + (25 * (order - 1)))`
* New Calculation `topPosition + (DEFAULT_ELEMENT_PADDING * (order + 1)) + (DEFAULT_ELEMENT_HEIGHT * order)`
* (Backend) Fixed an issue where `ColorData#setEndColor` and `ColorData#setTexLocation` could be applied incorrectly
* This fix was previously present in `ColorEditorGui#setCurrentData` but has been moved into `ColorData` to remove
duplicated logic and to resolve some edge-cases
* Fixed redundant formatting in `Color Editor` Slider UI elements
* The RGBA sliders now use `Integer` formatting instead of `Float`
* The `Tint Factor` slider now uses a percentage value instead of `Float`
* Fixed edge-cases in the `Color Editor` where editing a null `endColor` after editing `startColor` would result in an
incorrect result
* This is caused from the `getEnd` call pulling the `startColor` if null, and only adjusting the value of one slider
rather than all four
* An additional case has been resolved where the `endColor` data wasn't being created, if the new `startColor`
differs when it didn't before when using `setStartColor`
* (Backend) Fixed memory leaks that could occur through repeated `Module#toString` calls
* This occurs due to this function utilizing GSON, and since we used this in `Module#hashCode` and `Module#equals`,
it was being called excessively
* With this fix, `hashCode` and `equals` functions for all Config Categories should be much more performant,
following `PresenceData` formatting with `Objects#hash` and `Objects#equals` usage
* (Backend) Fixed memory leaks that could occur through repeated `FileUtils#findValidClass` calls
* Caching has been added to this method, preventing repetitive calls to `Class#forName`
* (Backend) Fixed a possible discrepancy between using `FileUtils#findValidClass` and `FileUtils#scanClasses`
* This relates to the `useClassLoader` param in `findValidClass`, which now only defaults to true if below Java 16
* This behavior matches the behavior used in `ClassGraph` within `scanClasses
* (Backend) Fixed memory leaks that could occur through `Lenni Reflect` reflection operations
* This issue effects `StringUtils#getFields`, `StringUtils#getMethods`, and methods using these functions
* Caching has been implemented to the `RStream#of`, `RStream#methods`, and `RStream#fields` functions to avoid
repetitive allocation
* (Backend) Fixed memory leaks caused from unnecessary `DiscordUtils#removeArguments` calls
* This issue occurred in `DiscordUtils#syncPlaceholders` in how we were synchronizing `custom.` arguments
* The old method has been replaced with a new more performant system
for removals and iteration
* Several methods have also been adjusted to avoid excessive calls to this function as well
* Fixed the `Sync Config` button in the `Main Gui` not properly applying settings
* This was caused by the `Config#applyFrom(Config)` function not being called
* (Backend) Fixed an issue where the `Server` module was improperly checking for new `ServerList` entries in some cases
* This also fixes an issue where adjusting `config` data could trigger an `internal` scan
* (Backend) Fixed an issue where the `ReplayMod` module could be improperly cleared in some cases
* (Backend) Fixed memory leaks that could occur through `MappingUtils` due to excessive `String#replace` operations
* Both `MappingUtils` and the way the mappings file is generated have been improved to avoid this issue
* (Backend) Fixed memory leaks that could occur through `FileUtils#getClassNamesMatchingSuperType`
and `FileUtils#isSubclassOf`
* Both functions have been rewritten to be significantly more performant compared to past releases
* (Backend) Fixed memory leaks that could occur due to excessive Reflection Usage in Config Modules
* This additionally improves the performance of `Config#handleVerification`
* This fix primarily effects `Module#getProperty` and `Module#setProperty` usage to be static-defined rather than
relying on reflection
* Fixed an issue where `entitySettings#ridingData` was being incorrectly read
* The `entity.riding.message` and `entity.riding.icon` placeholders should work properly again
* Resolved an issue where parts of the mod may show up un-localized when using a different language
* This was caused by a regression when `TranslationUtils#getLocalizedMessage` was introduced
* Resolved a typo causing an issue in the `SimpleRPC` to `CraftPresence` config migration layer where
the `%replaytimeleft%` placeholder, if present, was incorrectly converted to an invalid Starscript expression
* This issue would cause a Starscript exception if the value was present in a `SimpleRPC` config
* (Backend) Fixed an issue preventing `DiscordAssetUtils#setUrl` from triggering in `DiscordAssetUtils#loadAssets`
* This fix also brings a performance improvement to `DiscordAssetUtils#getUrl(list, key)`
* (Backend) Fixed a `DiscordIPC` Issue preventing Mod Functionality on Java 22
* This primarily effected Windows users or those using a non-standard filesystem
* Users effected would receive a false `Unable to connect to Discord...` message
* Several other error messages have also been improved alongside this fix
* TBD

___

Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ plugins {
id("xyz.wagyourtail.unimined") version "1.2.7" apply false
id("xyz.wagyourtail.jvmdowngrader") version "0.7.1"
id("com.diffplug.gradle.spotless") version "6.25.0" apply false
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
id("io.github.goooler.shadow") version "8.1.7" apply false
id("com.hypherionmc.modutils.modfusioner") version "1.0.12"
}

Expand Down Expand Up @@ -54,7 +54,7 @@ subprojects {
apply(plugin = "xyz.wagyourtail.unimined")
apply(plugin = "xyz.wagyourtail.jvmdowngrader")
apply(plugin = "com.diffplug.spotless")
apply(plugin = "com.github.johnrengelman.shadow")
apply(plugin = "io.github.goooler.shadow")

val versionInfoLabel by extra(extVersionInfoLabel)
val baseVersionLabel by extra(extBaseVersionLabel)
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fml_version_range=
forge_game_version_range=1.12.2
forge_loader_version_range=
# Deployment Info
versionId=2.4.0
versionId=2.4.1
deploymentType=Release
versionLabel=Release
additional_mc_versions=
Expand Down

0 comments on commit cd4f9f5

Please sign in to comment.