diff --git a/CHANGELOG.md b/CHANGELOG.md
index ddeea88b..94cb02cd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,3 @@
## Changes 🌽
-- Uses the latest DataAttributes (beta.9) & OfflinePlayerCache.
- - The namespace of DataAttributes got changed on this update, breaking the ability to use the mod with the latest one. This has been addressed now.
-- This patches an issue when updating modifiers (for I forgot to update PlayerEX when changing namespaces.)
\ No newline at end of file
+- Update FLK
+- Fixed **Fire Resistance** not calculating correctly.
\ No newline at end of file
diff --git a/README.md b/README.md
index b6a74697..1e576ef1 100644
--- a/README.md
+++ b/README.md
@@ -1,36 +1,112 @@
![logo](https://cdn.modrinth.com/data/cached_images/f8dd730cf295dc3a449337df81cc47e010eddf3e.png)
-[![GitHub license](https://img.shields.io/badge/MIT-MIT?style=for-the-badge&label=LICENCE&labelColor=582b11&color=a48350&link=https%3A%2F%2Fgithub.com%2FPlayerEXDirectorsCut%2Fplayerex%2Fblob%2F1.20.1%2Fmain%2FLICENSE)](https://github.com/PlayerEXDirectorsCut/playerex/blob/1.20.1/main/LICENSE)
-[![GitHub stars](https://img.shields.io/github/stars/PlayerEXDirectorsCut/playerex?style=for-the-badge&logo=github&color=ffb046&link=https%3A%2F%2Fgithub.com%2FPlayerEXDirectorsCut%2Fplayerex%2Fstargazers
-)](https://github.com/PlayerEXDirectorsCut/playerex/stargazers)
-[![GitHub forks](https://img.shields.io/github/forks/PlayerEXDirectorsCut/playerex?style=for-the-badge&logo=github&link=https%3A%2F%2Fgithub.com%2FPlayerEXDirectorsCut%2Fplayerex%2Fforks
-)](https://github.com/PlayerEXDirectorsCut/playerex/forks)
-[![GitHub issues](https://img.shields.io/github/issues/PlayerEXDirectorsCut/playerex?style=for-the-badge&logo=github&label=ISSUES&link=https%3A%2F%2Fgithub.com%2FPlayerEXDirectorsCut%2Fplayerex%2Fissues
-)](https://github.com/PlayerEXDirectorsCut/playerex/issues)
-
-[![docs](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/documentation/generic_vector.svg)](https://playerexdirectorscut.github.io/Bare-Minimum-Docs/)
-![mkdocs](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/built-with/mkdocs_vector.svg)
-![java17](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/built-with/java17_vector.svg)
-[![curseforge](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/available/curseforge_vector.svg)](https://www.curseforge.com/minecraft/mc-mods/playerex-directors-cut)
-[![modrinth](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/available/modrinth_vector.svg)](https://modrinth.com/mod/playerex-directors-cut)
-
-### Preamble
-
-PlayerEX:
-Directors Cut is an entire rewrite of **[PlayerEx](https://www.curseforge.com/minecraft/mc-mods/playerex)**
-(1.20.1+, though a ported version is available) and
-a mod built using Fabric that adds RPG themed attributes to the game and the player.
-It is available to download from [Curseforge](https://curseforge.com/minecraft/mc-mods/playerex-directors-cut) and [Modrinth](https://modrinth.com/mod/playerex-directors-cut).
-
-Find the original mod [here!](https://modrinth.com/mod/playerex)
-
-### Content
-
-In addition to attributes powered by [Data Attributes: Directors Cut](https://www.curseforge.com/minecraft/mc-mods/data-attributes-directors-cut), PlayerEX: Directors Cut adds a levelling system and skill points to spend, enabled through a nonintrusive vanilla-styled gui accessible from the inventory or by hotkey. For further documentation, as well as how to use the PlayerEX:Directors Cut API in your own project, please see the [wiki](https://github.com/CleverNucleus/PlayerEx/wiki).
-
-### Contributors (Former)
- - [gyular](https://github.com/gyular) - Korean translation.
- - [Hertz](https://github.com/elhertz) - Spanish translation.
- - [MrTYZzik](https://github.com/MrTYZzik) - Russian translation.
- - [Orygeunik](https://github.com/Orygeunik) - Russian translation improvements.
- - [NianGuu](https://github.com/NianGuu) - Simplified Chinese
- - [sky_bai](https://github.com/a1640727878) - Simplified Chinese (legacy release)
+
+
Forge when?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+(though more assembly is required, see further below)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+_________________
+
+
+
+![PlayerEX Screen at Level 5](https://cdn.modrinth.com/data/cached_images/a1932f9482b132e06b75717be8e060149b275b94.png)
+
+### Preamble 📝
+
+PlayerEX is a fundamentally rewritten mod based on the work of **CleverNucleus's [PlayerEx](https://modrinth.com/mod/playerex)**. The mod provides RPG-themed attributes to the game and a configurable leveling system.
+
+### Content 📦
+
+With higher-level, highly configurable attribute modification provided by **[Data Attributes: Directors Cut](https://www.curseforge.com/minecraft/mc-mods/data-attributes-directors-cut)**, PlayerEX integrates skill and refundable points to spend through the non-intrusive, extendable, and modern screen, which can be activated by a hotkey (default is `-`).
+
+### Extras 🎬
+
+- **[EXHud](https://modrinth.com/mod/exhud-directors-cut)**, which provides an optional, opinionated and highly-configurable UI complimentary for PlayerEX, and has compatibility with other mods, such as [**Thermoo**](https://modrinth.com/mod/thermoo), and [**AppleSkin**](https://modrinth.com/mod/appleskin).
+
+- **[RelicEX](https://modrinth.com/mod/relicex-directors-cut)**, which adds relics, tomes, different ways to obtain level, skill, and refund points.
+
+- **[WizardEX](https://modrinth.com/mod/wizardex-directors-cut)**, which provides a layer between this mod and **[Wizards](https://modrinth.com/mod/wizards)** and other mods that use **[Spell Power Attributes](https://modrinth.com/mod/spell-power)**.
+
+### Wiki 📑
+
+To learn more about the mod, you can go **[here!](https://bareminimumstudios.github.io/Bare-Minimum-Docs/)**
+
+### Developers 💻
+
+Ah, my favorite people. You will get some more information on how to mod PlayerEX once the release is stable. For now, know that you will be getting:
+
+- A way to implement attribute modification (and target any attribute you want and apply functions to them) into a registry.
+- Override **any** registered attribute.
+- Apply **any** attribute to **any** `LivingEntity` (primarily for the player).
+- Attach to a screen using `owo-lib`.
+- And much more...
+
+### For Forge Users 🪨
+
+Howdy, I know you have all been **dying** for a forge release. This will come in due time. For now, the mod has been rewritten for fabric, but due to its compatible and improved nature, there is a way you can play it!
+
+*Refer to the **Usage Guide** on [**Sinytra Connector**](https://modrinth.com/mod/connector) to get started.*
+
+> There is no guarantee that it will work for Forge completely, and support **can not** be provided until an actual release of a forge mod is created.
+
+### Contributors 🆘
+
+### The People Who Made This A Reality
+
+- The studio
+- The wispforest team 💖
+- One guy's modpack
+- Literally **YOU**
+- And most importantly, **CleverNucleus**
+
+### Translators (legacy, `<=3.*`)
+
+- [gyular](https://github.com/gyular) - Korean translation.
+- [Hertz](https://github.com/elhertz) - Spanish translation.
+- [MrTYZzik](https://github.com/MrTYZzik) - Russian translation.
+- [Orygeunik](https://github.com/Orygeunik) - Russian translation improvements.
+- [NianGuu](https://github.com/NianGuu) - Simplified Chinese
+- [sky_bai](https://github.com/a1640727878) - Simplified Chinese (older releases)
+
+### A Thanks To Our Sponsor
+
+---
+
+
+
+
+
+ Use code "BAREMINIMUM" to get 15% off your first month!
+
diff --git a/gradle.properties b/gradle.properties
index 894d140f..ab546173 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -9,7 +9,7 @@ loader=fabric
# Fabric Properties
minecraft_version=1.20.1
loader_version=0.15.11
-fabric_kotlin_version=1.11.0+kotlin.2.0.0
+fabric_kotlin_version=1.12.0+kotlin.2.0.10
loom_version=1.7-SNAPSHOT
# Mappings
@@ -17,7 +17,7 @@ parchment_version=1.20.1:2023.09.03
quilt_mappings_version=23
# Mod Properties
-mod_version=4.0.0+1.20.1-alpha.12
+mod_version=4.0.0+1.20.1-alpha.13
maven_group=com.bibireden.playerex
archives_base_name=playerex-directors-cut
diff --git a/src/main/java/com/bibireden/playerex/mixin/InventoryMixin.java b/src/main/java/com/bibireden/playerex/mixin/InventoryMixin.java
index 88db2758..49bc5da1 100644
--- a/src/main/java/com/bibireden/playerex/mixin/InventoryMixin.java
+++ b/src/main/java/com/bibireden/playerex/mixin/InventoryMixin.java
@@ -18,7 +18,6 @@ public abstract class InventoryMixin {
@ModifyReturnValue(method = "getDestroySpeed", at = @At("RETURN"))
private float playerex$getBlockBreakingSpeed(float original) {
- Optional maybeBreakingSpeed = DataAttributesAPI.getValue(PlayerEXAttributes.BREAKING_SPEED, this.player);
- return maybeBreakingSpeed.map(v -> original + v.floatValue() - 1.0F).orElse(original);
+ return DataAttributesAPI.getValue(PlayerEXAttributes.BREAKING_SPEED, this.player).map((v) -> original + v.floatValue() - 1.0F).orElse(original);
}
}
diff --git a/src/main/kotlin/com/bibireden/playerex/factory/DamageFactory.kt b/src/main/kotlin/com/bibireden/playerex/factory/DamageFactory.kt
index bd072c9a..799d8ab0 100644
--- a/src/main/kotlin/com/bibireden/playerex/factory/DamageFactory.kt
+++ b/src/main/kotlin/com/bibireden/playerex/factory/DamageFactory.kt
@@ -13,24 +13,24 @@ object DamageFactory {
fun forEach(registry: (damagePredicate: DamagePredicate, damageFunction: DamageFunction) -> Unit)
{
registry.invoke({ _, source, _ -> source.`is`(DamageTypes.ON_FIRE) }, { entity, _, damage ->
- DataAttributesAPI.getValue(PlayerEXAttributes.FIRE_RESISTANCE, entity).map { ((1.0 - (it / 100)) * damage).toFloat() }.orElse(damage)
+ DataAttributesAPI.getValue(PlayerEXAttributes.FIRE_RESISTANCE, entity).map { damage * (1 - it) }.map(Double::toFloat).orElse(damage)
})
registry.invoke({ _, source, _ -> source.`is`(DamageTypes.FREEZE)}, { living, _, damage ->
- DataAttributesAPI.getValue(PlayerEXAttributes.FREEZE_RESISTANCE, living).map { (damage * (1.0 - it)).toFloat() }.orElse(damage)
+ DataAttributesAPI.getValue(PlayerEXAttributes.FREEZE_RESISTANCE, living).map { damage * (1 - it) }.map(Double::toFloat).orElse(damage)
})
registry.invoke({ _, source, _ -> source.`is`(DamageTypes.LIGHTNING_BOLT)}, { living, _, damage ->
- DataAttributesAPI.getValue(PlayerEXAttributes.LIGHTNING_RESISTANCE, living).map { (damage * (1.0 - it)).toFloat() }.orElse(damage)
+ DataAttributesAPI.getValue(PlayerEXAttributes.LIGHTNING_RESISTANCE, living).map { damage * (1 - it) }.map(Double::toFloat).orElse(damage)
})
registry.invoke(
{ living, source, damage -> living.hasEffect(MobEffects.POISON) && source.`is`(DamageTypes.MAGIC) && damage <= 1.0F },
- {living, _, damage -> DataAttributesAPI.getValue(PlayerEXAttributes.POISON_RESISTANCE, living).map { (damage * (1.0 - it)).toFloat() }.orElse(damage) }
+ {living, _, damage -> DataAttributesAPI.getValue(PlayerEXAttributes.POISON_RESISTANCE, living).map { damage * (1 - it) }.map(Double::toFloat).orElse(damage) }
)
registry.invoke({_, source, _ -> source.`is`(DamageTypes.WITHER) || (source.`is`(DamageTypes.INDIRECT_MAGIC) && ((source.directEntity is ThrownPotion) || (source.directEntity is AreaEffectCloud))) }, {
living, source, damage ->
DataAttributesAPI.getValue(PlayerEXAttributes.WITHER_RESISTANCE, living).map {
if (source.`is`(DamageTypes.WITHER) && living.isInvertedHealAndHarm) return@map 0.0F
if (source.`is`(DamageTypes.INDIRECT_MAGIC) && source.directEntity is ThrownPotion && living.isInvertedHealAndHarm) return@map damage
- (damage * (1.0 - it)).toFloat()
+ (damage * 1 - it).toFloat()
}.orElse(damage)
})
}