From a4b481998eef6f45023577493df75fd34168e96c Mon Sep 17 00:00:00 2001 From: Bibi Reden Date: Sat, 31 Aug 2024 07:16:53 -0500 Subject: [PATCH 1/8] [chore] add CL entry --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9811b7c..1c9e3fae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,2 @@ ## Changes 🌽 -- Added "Item Breaking" mechanic -- Added config option for Item Breaking \ No newline at end of file +- Added missing translation key for `itemBreakingEnabled` \ No newline at end of file From accfcbf1513f113331c176e4e983b99943e3265a Mon Sep 17 00:00:00 2001 From: Bibi Reden Date: Sat, 31 Aug 2024 07:27:50 -0500 Subject: [PATCH 2/8] fix CL --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c9e3fae..8bfc782a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,2 @@ ## Changes 🌽 -- Added missing translation key for `itemBreakingEnabled` \ No newline at end of file +- Added a missing translation key for `itemBreakingEnabled` \ No newline at end of file From 8c1281139965d1a8e95f01d09436dd2011fc0b22 Mon Sep 17 00:00:00 2001 From: Bibi Reden Date: Sat, 31 Aug 2024 07:30:05 -0500 Subject: [PATCH 3/8] beta.6 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 0f94da8c..bc08cfa9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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-beta.5 +mod_version=4.0.0+1.20.1-beta.6 maven_group=com.bibireden.playerex archives_base_name=playerex-directors-cut From ee1828604b2175d7ebaed71eb26a34839cd18815 Mon Sep 17 00:00:00 2001 From: Bibi Reden Date: Fri, 11 Oct 2024 15:00:34 -0500 Subject: [PATCH 4/8] [semver] bump version --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index bc08cfa9..404969bc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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-beta.6 +mod_version=4.0.0+1.20.1-beta.7 maven_group=com.bibireden.playerex archives_base_name=playerex-directors-cut @@ -31,7 +31,7 @@ ranged_weapon_api_version=1.1.2+1.20.1 # in-house opc_version=2.0.0+1.20.1-beta.4-fabric -data_attributes_version=2.0.0+1.20.1-beta.13-fabric +data_attributes_version=2.0.0+1.20.1-fabric # owo owo_version=0.11.2+1.20 From 549ff817d15690536c580bdcd43976fbbfa2aacf Mon Sep 17 00:00:00 2001 From: Bibi Reden Date: Fri, 11 Oct 2024 16:33:20 -0500 Subject: [PATCH 5/8] [fix] Add back all of the stock attribute overrides --- .../ui/components/AttributeComponent.kt | 4 +- .../data_attributes/entity_types/stock.json | 112 +++++++++++---- .../data_attributes/functions/stock.json | 132 +++++++++--------- .../data_attributes/overrides/minecraft.json | 2 +- .../data_attributes/overrides/stock.json | 77 ++++++---- 5 files changed, 204 insertions(+), 123 deletions(-) diff --git a/src/client/kotlin/com/bibireden/playerex/ui/components/AttributeComponent.kt b/src/client/kotlin/com/bibireden/playerex/ui/components/AttributeComponent.kt index afbffaf5..24a85ae2 100644 --- a/src/client/kotlin/com/bibireden/playerex/ui/components/AttributeComponent.kt +++ b/src/client/kotlin/com/bibireden/playerex/ui/components/AttributeComponent.kt @@ -35,8 +35,8 @@ class AttributeComponent(private val attribute: Attribute, private val player: P text.append("\n") text.append(Component.literal(attribute.id.toString()).withStyle(ChatFormatting.DARK_GRAY)) text.append("\n\n") - entries.forEach { function -> - val childAttribute = EntityAttributeSupplier(function.id).get().getOrNull() ?: return@forEach + entries.forEach { (id, function) -> + val childAttribute = EntityAttributeSupplier(id).get().getOrNull() ?: return@forEach val formula = (childAttribute as IEntityAttribute).`data_attributes$formula`() text.apply { diff --git a/src/main/resources/data/playerex/data_attributes/entity_types/stock.json b/src/main/resources/data/playerex/data_attributes/entity_types/stock.json index 11701155..7693cf9c 100644 --- a/src/main/resources/data/playerex/data_attributes/entity_types/stock.json +++ b/src/main/resources/data/playerex/data_attributes/entity_types/stock.json @@ -1,34 +1,90 @@ { "entries": { "minecraft:player": { - "playerex:level": 0.0, - "playerex:constitution": 0.0, - "playerex:strength": 0.0, - "playerex:dexterity": 0.0, - "playerex:intelligence": 0.0, - "playerex:luckiness": 0.0, - "playerex:evasion": 0.0, - "playerex:lifesteal": 0.0, - "playerex:focus": 0.0, - "playerex:health_regeneration": 0.0, - "playerex:heal_amplification": 0.0, - "playerex:melee_crit_damage": 0.0, - "playerex:melee_crit_chance": 0.0, - "playerex:ranged_crit_damage": 0.0, - "playerex:ranged_crit_chance": 0.0, - "playerex:fire_resistance": 0.0, - "playerex:freeze_resistance": 0.0, - "playerex:lightning_resistance": 0.0, - "playerex:poison_resistance": 0.0, - "playerex:wither_resistance": 0.0, - "playerex:breaking_speed": 1.0, - "playerex:enchanting": 0.0, - "playerex:logging": 0.0, - "playerex:alchemy": 0.0, - "playerex:fishing": 0.0, - "playerex:mining": 0.0, - "playerex:smithing": 0.0, - "playerex:farming": 0.0 + "playerex:level": { + "value": 0.0 + }, + "playerex:constitution": { + "value": 0.0 + }, + "playerex:strength": { + "value": 0.0 + }, + "playerex:dexterity": { + "value": 0.0 + }, + "playerex:intelligence": { + "value": 0.0 + }, + "playerex:luckiness": { + "value": 0.0 + }, + "playerex:evasion": { + "value": 0.0 + }, + "playerex:lifesteal": { + "value": 0.0 + }, + "playerex:focus": { + "value": 0.0 + }, + "playerex:health_regeneration": { + "value": 0.0 + }, + "playerex:heal_amplification": { + "value": 0.0 + }, + "playerex:melee_crit_damage": { + "value": 0.0 + }, + "playerex:melee_crit_chance": { + "value": 0.0 + }, + "playerex:ranged_crit_damage": { + "value": 0.0 + }, + "playerex:ranged_crit_chance": { + "value": 0.0 + }, + "playerex:fire_resistance": { + "value": 0.0 + }, + "playerex:freeze_resistance": { + "value": 0.0 + }, + "playerex:lightning_resistance": { + "value": 0.0 + }, + "playerex:poison_resistance": { + "value": 0.0 + }, + "playerex:wither_resistance": { + "value": 0.0 + }, + "playerex:breaking_speed": { + "value": 1.0 + }, + "playerex:enchanting": { + "value": 0.0 + }, + "playerex:logging": { + "value": 0.0 + }, + "playerex:alchemy": { + "value": 0.0 + }, + "playerex:fishing": { + "value": 0.0 + }, + "playerex:mining": { + "value": 0.0 + }, + "playerex:smithing": { + "value": 0.0 + }, + "playerex:farming": { + "value": 0.0 + } } } } \ No newline at end of file diff --git a/src/main/resources/data/playerex/data_attributes/functions/stock.json b/src/main/resources/data/playerex/data_attributes/functions/stock.json index b401cd70..89340234 100644 --- a/src/main/resources/data/playerex/data_attributes/functions/stock.json +++ b/src/main/resources/data/playerex/data_attributes/functions/stock.json @@ -1,146 +1,146 @@ { "entries": { - "playerex:luckiness": [ - { - "id": "playerex:melee_crit_chance", + "playerex:luckiness": { + "playerex:melee_crit_chance": { + "enabled": true, "behavior": "Add", "value": 0.02 }, - { - "id": "playerex:ranged_crit_chance", + "playerex:ranged_crit_chance": { + "enabled": true, "behavior": "Add", "value": 0.02 }, - { - "id": "minecraft:generic.luck", + "minecraft:generic.luck": { + "enabled": true, "behavior": "Add", "value": 0.05 }, - { - "id": "playerex:evasion", + "playerex:evasion": { + "enabled": true, "behavior": "Add", "value": 0.01 }, - { - "id": "spell_power:critical_chance", + "spell_power:critical_chance": { + "enabled": true, "behavior": "Add", "value": 0.02 } - ], - "playerex:dexterity": [ - { - "id": "minecraft:generic.attack_speed", + }, + "playerex:dexterity": { + "minecraft:generic.attack_speed": { + "enabled": true, "behavior": "Multiply", "value": 0.01 }, - { - "id": "playerex:ranged_crit_damage", + "playerex:ranged_crit_damage": { + "enabled": true, "behavior": "Add", "value": 0.005 }, - { - "id": "ranged_weapon:haste", + "ranged_weapon:haste": { + "enabled": true, "behavior": "Multiply", "value": 0.02 }, - { - "id": "ranged_weapon:damage", + "ranged_weapon:damage": { + "enabled": true, "behavior": "Multiply", "value": 0.02 } - ], - "playerex:constitution": [ - { - "id": "minecraft:generic.max_health", + }, + "playerex:constitution": { + "minecraft:generic.max_health": { + "enabled": true, "behavior": "Add", "value": 0.5 }, - { - "id": "minecraft:generic.armor", + "minecraft:generic.armor": { + "enabled": true, "behavior": "Add", "value": 0.25 }, - { - "id": "additionalentityattributes:generic.magic_protection", + "additionalentityattributes:generic.magic_protection": { + "enabled": true, "behavior": "Add", "value": 0.25 }, - { - "id": "additionalentityattributes:generic.lung_capacity", + "additionalentityattributes:generic.lung_capacity": { + "enabled": true, "behavior": "Add", "value": 0.01 }, - { - "id": "playerex:poison_resistance", + "playerex:poison_resistance": { + "enabled": true, "behavior": "Add", "value": 0.01 } - ], - "playerex:intelligence": [ - { - "id": "additionalentityattributes:player.dropped_experience", + }, + "playerex:intelligence": { + "additionalentityattributes:player.dropped_experience": { + "enabled": true, "behavior": "Multiply", "value": 0.01 }, - { - "id": "playerex:wither_resistance", + "playerex:wither_resistance": { + "enabled": true, "behavior": "Add", "value": 0.01 }, - { - "id": "spell_power:haste", + "spell_power:haste": { + "enabled": true, "behavior": "Add", "value": 2 } - ], - "playerex:focus": [ - { - "id": "playerex:health_regeneration", + }, + "playerex:focus": { + "playerex:health_regeneration": { + "enabled": true, "behavior": "Add", - "value": 0.0015 + "value": 0.015 }, - { - "id": "playerex:heal_amplification", + "playerex:heal_amplification": { + "enabled": true, "behavior": "Add", - "value": 0.0020 + "value": 0.002 }, - { - "id": "playerex:freeze_resistance", + "playerex:freeze_resistance": { + "enabled": true, "behavior": "Add", "value": 0.01 }, - { - "id": "playerex:lightning_resistance", + "playerex:lightning_resistance": { + "enabled": true, "behavior": "Add", "value": 0.01 }, - { - "id": "playerex:fire_resistance", + "playerex:fire_resistance": { + "enabled": true, "behavior": "Add", "value": 0.01 } - ], - "playerex:strength": [ - { - "id": "minecraft:generic.attack_damage", + }, + "playerex:strength": { + "minecraft:generic.attack_damage": { + "enabled": true, "behavior": "Multiply", "value": 0.02 }, - { - "id": "minecraft:generic.knockback_resistance", + "minecraft:generic.knockback_resistance": { + "enabled": true, "behavior": "Add", "value": 0.01 }, - { - "id": "playerex:melee_crit_damage", + "playerex:melee_crit_damage": { + "enabled": true, "behavior": "Add", "value": 0.005 }, - { - "id": "playerex:breaking_speed", + "playerex:breaking_speed": { + "enabled": true, "behavior": "Add", "value": 1.0 } - ] + } } } \ No newline at end of file diff --git a/src/main/resources/data/playerex/data_attributes/overrides/minecraft.json b/src/main/resources/data/playerex/data_attributes/overrides/minecraft.json index 5bd68de9..6ab4b402 100644 --- a/src/main/resources/data/playerex/data_attributes/overrides/minecraft.json +++ b/src/main/resources/data/playerex/data_attributes/overrides/minecraft.json @@ -4,7 +4,7 @@ "enabled": true, "min": 0.0, "max": 1.0, - "smoothness": 1.0, + "smoothness": 0.01, "formula": "Diminished", "format": "Percentage" }, diff --git a/src/main/resources/data/playerex/data_attributes/overrides/stock.json b/src/main/resources/data/playerex/data_attributes/overrides/stock.json index 54eb44cc..5d477707 100644 --- a/src/main/resources/data/playerex/data_attributes/overrides/stock.json +++ b/src/main/resources/data/playerex/data_attributes/overrides/stock.json @@ -8,69 +8,94 @@ }, "playerex:ranged_crit_damage": { "enabled": true, - "smoothness": 1.0, - "formula": "Diminished" - }, - "playerex:poison_resistance": { - "enabled": true, - "smoothness": 1.0, + "min": 0.0, + "max": 1.0, + "smoothness": 0.001, "formula": "Diminished", "format": "Percentage" }, - "playerex:melee_crit_damage": { + "playerex:heal_amplification": { "enabled": true, - "smoothness": 1, - "formula": "Diminished" + "min": 0.0, + "max": 1.0, + "smoothness": 0.001, + "formula": "Diminished", + "format": "Percentage" }, - "playerex:wither_resistance": { + "playerex:ranged_crit_chance": { "enabled": true, - "smoothness": 1.0, + "min": 0.0, + "max": 1.0, + "smoothness": 0.01, "formula": "Diminished", "format": "Percentage" }, - "playerex:freeze_resistance": { + "playerex:evasion": { "enabled": true, - "smoothness": 1.0, + "smoothness": 0.01, "formula": "Diminished", "format": "Percentage" }, - "playerex:health_regeneration": { + "playerex:melee_crit_chance": { "enabled": true, - "smoothness": 1.0, + "min": 0.0, + "max": 1.0, + "smoothness": 0.01, "formula": "Diminished", "format": "Percentage" }, - "playerex:heal_amplification": { + "playerex:melee_crit_damage": { "enabled": true, - "smoothness": 1.0, + "min": 0.0, + "max": 1.0, + "smoothness": 0.001, + "formula": "Diminished" + }, + "playerex:lifesteal": { + "enabled": true, + "min": 0.0, + "max": 1.0, + "smoothness": 0.001, "formula": "Diminished", "format": "Percentage" }, - "playerex:ranged_crit_chance": { + "playerex:wither_resistance": { "enabled": true, - "smoothness": 1.0, + "min": -1.0, + "max": 1.0, + "smoothness": 0.01, "formula": "Diminished", "format": "Percentage" }, - "playerex:evasion": { + "playerex:poison_resistance": { "enabled": true, - "smoothness": 1.0, + "min": -1.0, + "max": 1.0, + "smoothness": 0.01, "formula": "Diminished", "format": "Percentage" }, - "playerex:lifesteal": { + "playerex:lightning_resistance": { "enabled": true, + "min": -1.0, + "max": 1.0, + "smoothness": 0.01, + "formula": "Diminished", "format": "Percentage" }, - "playerex:melee_crit_chance": { + "playerex:fire_resistance": { "enabled": true, - "smoothness": 1.0, + "min": -1, + "max": 1, + "smoothness": 0.01, "formula": "Diminished", "format": "Percentage" }, - "playerex:fire_resistance": { + "playerex:freeze_resistance": { "enabled": true, - "smoothness": 1.0, + "min": -1, + "max": 1, + "smoothness": 0.01, "formula": "Diminished", "format": "Percentage" } From feeab029e65023a40281c18a4962a108bf4e919d Mon Sep 17 00:00:00 2001 From: Bibi Reden Date: Sat, 12 Oct 2024 01:17:05 -0500 Subject: [PATCH 6/8] [chore] Prepare beta.7, update DA version --- CHANGELOG.md | 3 ++- gradle.properties | 2 +- .../data/playerex/data_attributes/overrides/minecraft.json | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bfc782a..86482055 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,3 @@ ## Changes 🌽 -- Added a missing translation key for `itemBreakingEnabled` \ No newline at end of file +- Patched to work with Data Attributes `2.0.0+1.20.1`. Update to that for this to work. +- \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 404969bc..8fcacd28 100644 --- a/gradle.properties +++ b/gradle.properties @@ -31,7 +31,7 @@ ranged_weapon_api_version=1.1.2+1.20.1 # in-house opc_version=2.0.0+1.20.1-beta.4-fabric -data_attributes_version=2.0.0+1.20.1-fabric +data_attributes_version=2.0.1+1.20.1-fabric # owo owo_version=0.11.2+1.20 diff --git a/src/main/resources/data/playerex/data_attributes/overrides/minecraft.json b/src/main/resources/data/playerex/data_attributes/overrides/minecraft.json index 6ab4b402..cc24c151 100644 --- a/src/main/resources/data/playerex/data_attributes/overrides/minecraft.json +++ b/src/main/resources/data/playerex/data_attributes/overrides/minecraft.json @@ -10,8 +10,7 @@ }, "minecraft:generic.luck": { "enabled": true, - "smoothness": 1.0, - "formula": "Diminished" + "smoothness": 1.0 }, "minecraft:generic.max_health": { "enabled": true, From 38fc76414714bcc05bc32efdb65a4dbd15cec11a Mon Sep 17 00:00:00 2001 From: Bibi Reden Date: Sat, 12 Oct 2024 01:18:09 -0500 Subject: [PATCH 7/8] late night patch~ --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86482055..c563ac2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,3 @@ ## Changes 🌽 - Patched to work with Data Attributes `2.0.0+1.20.1`. Update to that for this to work. -- \ No newline at end of file +- Integrate back all of the attributes and their proper diminishing factor according to **BalanceEX** and some suggestions. \ No newline at end of file From e4870cdfac763bbb6e84d95fd64ba4764a28eca8 Mon Sep 17 00:00:00 2001 From: Bibi Reden Date: Sat, 12 Oct 2024 01:18:33 -0500 Subject: [PATCH 8/8] late night patch~ --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c563ac2d..43088382 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,3 @@ ## Changes 🌽 -- Patched to work with Data Attributes `2.0.0+1.20.1`. Update to that for this to work. +- Patched to work with Data Attributes `2.X.X+1.20.1`. Update to that for this to work. - Integrate back all of the attributes and their proper diminishing factor according to **BalanceEX** and some suggestions. \ No newline at end of file