Skip to content

Commit

Permalink
Merge branch '1.20.1/fabric' into 1.20.1/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
bibi-reden committed Oct 12, 2024
2 parents 3949797 + e4870cd commit 1aaa2d3
Show file tree
Hide file tree
Showing 7 changed files with 209 additions and 129 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## Changes 🌽
- Added "Item Breaking" mechanic
- Added config option for Item Breaking
- 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.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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.7
maven_group=com.bibireden.playerex
archives_base_name=playerex-directors-cut

Expand All @@ -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.1+1.20.1-fabric

# owo
owo_version=0.11.2+1.20
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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
}
}
}
}
132 changes: 66 additions & 66 deletions src/main/resources/data/playerex/data_attributes/functions/stock.json
Original file line number Diff line number Diff line change
@@ -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
}
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
"enabled": true,
"min": 0.0,
"max": 1.0,
"smoothness": 1.0,
"smoothness": 0.01,
"formula": "Diminished",
"format": "Percentage"
},
"minecraft:generic.luck": {
"enabled": true,
"smoothness": 1.0,
"formula": "Diminished"
"smoothness": 1.0
},
"minecraft:generic.max_health": {
"enabled": true,
Expand Down
Loading

0 comments on commit 1aaa2d3

Please sign in to comment.