From f89b85c2bbc905826238e6a2d47829f5e90c449a Mon Sep 17 00:00:00 2001 From: Kai Date: Sat, 23 Nov 2024 01:56:54 +0100 Subject: [PATCH] rename modifier amount field --- .../103d9f3f36b01595f1aa5172191e60eff02e6924 | 18 +++--- .../dragonsurvival/dragon_bodies/center.json | 4 +- .../dragonsurvival/dragon_bodies/east.json | 40 ++++++------ .../dragonsurvival/dragon_bodies/north.json | 24 +++---- .../dragonsurvival/dragon_bodies/south.json | 28 ++++---- .../dragonsurvival/dragon_bodies/west.json | 24 +++---- .../dragonsurvival/dragon_stages/adult.json | 64 +++++++++---------- .../dragonsurvival/dragon_stages/newborn.json | 48 +++++++------- .../dragonsurvival/dragon_stages/young.json | 64 +++++++++---------- .../common/codecs/Modifier.java | 14 ++-- 10 files changed, 164 insertions(+), 164 deletions(-) diff --git a/src/generated/resources/.cache/103d9f3f36b01595f1aa5172191e60eff02e6924 b/src/generated/resources/.cache/103d9f3f36b01595f1aa5172191e60eff02e6924 index 1d5c7d7a23..6114bbb72c 100644 --- a/src/generated/resources/.cache/103d9f3f36b01595f1aa5172191e60eff02e6924 +++ b/src/generated/resources/.cache/103d9f3f36b01595f1aa5172191e60eff02e6924 @@ -1,4 +1,4 @@ -// 1.21.1 2024-11-23T01:22:15.2725671 Registries +// 1.21.1 2024-11-23T01:56:35.4828766 Registries 011b2ee382ec961722c100bbf059b4aa460f44b0 data/dragonsurvival/damage_type/anti_dragon.json afb20257741b4a8be55ecf8e013125f113a9d486 data/dragonsurvival/damage_type/cave_dragon_breath.json 7a732909707be826e322901b5c204e548e48a12b data/dragonsurvival/damage_type/cave_dragon_burn.json @@ -13,12 +13,12 @@ deed90b4724d21cdbf6bcc3d547ce88b8ebf220c data/dragonsurvival/damage_type/forest_ 9324d2a244a05eb4c3b5e1569cf72db6a0dad382 data/dragonsurvival/damage_type/sea_dragon_breath.json 8742553c9323837e23002ce815536f5ce4a86427 data/dragonsurvival/damage_type/spectral_impact.json 3f23f53780e47cb3f324226b6427baef314125d5 data/dragonsurvival/damage_type/water_burn.json -aab3f6fb6bacf03ac245334051014d2fe685a08c data/dragonsurvival/dragonsurvival/dragon_bodies/center.json -9ce907d9c8c2384dbed3d2d7f3cd9859bb45d385 data/dragonsurvival/dragonsurvival/dragon_bodies/east.json -1ecc0b2c25431da73c88c800840eb9b924c71e66 data/dragonsurvival/dragonsurvival/dragon_bodies/north.json -eb07a753db9df98454afc2e7f6af73805eb46bba data/dragonsurvival/dragonsurvival/dragon_bodies/south.json -821fbb3045118eeb3664c1994cbc9aaeffb4bcc8 data/dragonsurvival/dragonsurvival/dragon_bodies/west.json -be4973b49b9d539e506cbe605cc0b159a77a263f data/dragonsurvival/dragonsurvival/dragon_stages/adult.json -affbf652093f94aae3b520ee2150a71d5b458175 data/dragonsurvival/dragonsurvival/dragon_stages/newborn.json -e36ea752a368712662a38ef118f6009a957a4d55 data/dragonsurvival/dragonsurvival/dragon_stages/young.json +100daa7db0f5f2122af1450576b1166e9e08eb11 data/dragonsurvival/dragonsurvival/dragon_bodies/center.json +eeab3afea73f45ef35f3b87ce73a041142a79756 data/dragonsurvival/dragonsurvival/dragon_bodies/east.json +b621c6c9646592704a8c0c92001789869ce99ad1 data/dragonsurvival/dragonsurvival/dragon_bodies/north.json +e9aa519f424a7ef590936f4a7b8c1c5c05674683 data/dragonsurvival/dragonsurvival/dragon_bodies/south.json +b72de04db2cefddacf6a82869b4b88bac3f96672 data/dragonsurvival/dragonsurvival/dragon_bodies/west.json +a8e597c9909cf828af4572261438a88780170adf data/dragonsurvival/dragonsurvival/dragon_stages/adult.json +973f6e502b217a6daef271c39277c6839caba853 data/dragonsurvival/dragonsurvival/dragon_stages/newborn.json +9fb684ef0e3e9aa37dd1890d2717df1742440e66 data/dragonsurvival/dragonsurvival/dragon_stages/young.json af16c6fd6045f7a95654506a3b0c0bef505e6c33 data/dragonsurvival/enchantment/bolas.json diff --git a/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_bodies/center.json b/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_bodies/center.json index 367c143eb0..65f7b0aec4 100644 --- a/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_bodies/center.json +++ b/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_bodies/center.json @@ -3,9 +3,9 @@ "modifiers": [ { "type": "dragonsurvival/body/", + "amount": 0.2, "attribute": "dragonsurvival:flight_speed", - "operation": "add_value", - "per_size": 0.2 + "operation": "add_value" } ] } \ No newline at end of file diff --git a/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_bodies/east.json b/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_bodies/east.json index f6fe462b7e..b6618c60dc 100644 --- a/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_bodies/east.json +++ b/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_bodies/east.json @@ -2,63 +2,63 @@ "modifiers": [ { "type": "dragonsurvival/body/", + "amount": 2.0, "attribute": "minecraft:generic.armor", - "operation": "add_value", - "per_size": 2.0 + "operation": "add_value" }, { "type": "dragonsurvival/body/", + "amount": -1.0, "attribute": "minecraft:generic.attack_damage", - "operation": "add_value", - "per_size": -1.0 + "operation": "add_value" }, { "type": "dragonsurvival/body/", + "amount": -1.0, "attribute": "minecraft:generic.attack_knockback", - "operation": "add_value", - "per_size": -1.0 + "operation": "add_value" }, { "type": "dragonsurvival/body/", + "amount": 0.1, "attribute": "minecraft:generic.gravity", - "operation": "add_multiplied_total", - "per_size": 0.1 + "operation": "add_multiplied_total" }, { "type": "dragonsurvival/body/", + "amount": 0.1, "attribute": "minecraft:generic.jump_strength", - "operation": "add_value", - "per_size": 0.1 + "operation": "add_value" }, { "type": "dragonsurvival/body/", + "amount": 0.1, "attribute": "minecraft:generic.movement_speed", - "operation": "add_multiplied_total", - "per_size": 0.1 + "operation": "add_multiplied_total" }, { "type": "dragonsurvival/body/", + "amount": 1.0, "attribute": "neoforge:swim_speed", - "operation": "add_value", - "per_size": 1.0 + "operation": "add_value" }, { "type": "dragonsurvival/body/", + "amount": 2.0, "attribute": "dragonsurvival:mana", - "operation": "add_value", - "per_size": 2.0 + "operation": "add_value" }, { "type": "dragonsurvival/body/", + "amount": 0.2, "attribute": "dragonsurvival:flight_speed", - "operation": "add_value", - "per_size": 0.2 + "operation": "add_value" }, { "type": "dragonsurvival/body/", + "amount": -0.2, "attribute": "dragonsurvival:flight_stamina_cost", - "operation": "add_multiplied_total", - "per_size": -0.2 + "operation": "add_multiplied_total" } ] } \ No newline at end of file diff --git a/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_bodies/north.json b/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_bodies/north.json index fc798e29c3..9a8899bafa 100644 --- a/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_bodies/north.json +++ b/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_bodies/north.json @@ -4,39 +4,39 @@ "modifiers": [ { "type": "dragonsurvival/body/", + "amount": -0.2, "attribute": "minecraft:generic.attack_damage", - "operation": "add_multiplied_total", - "per_size": -0.2 + "operation": "add_multiplied_total" }, { "type": "dragonsurvival/body/", + "amount": -0.5, "attribute": "minecraft:generic.attack_knockback", - "operation": "add_value", - "per_size": -0.5 + "operation": "add_value" }, { "type": "dragonsurvival/body/", + "amount": -0.3, "attribute": "minecraft:generic.movement_speed", - "operation": "add_multiplied_total", - "per_size": -0.3 + "operation": "add_multiplied_total" }, { "type": "dragonsurvival/body/", + "amount": 0.5, "attribute": "neoforge:swim_speed", - "operation": "add_value", - "per_size": 0.5 + "operation": "add_value" }, { "type": "dragonsurvival/body/", + "amount": 2.0, "attribute": "dragonsurvival:mana", - "operation": "add_value", - "per_size": 2.0 + "operation": "add_value" }, { "type": "dragonsurvival/body/", + "amount": -0.1, "attribute": "dragonsurvival:flight_stamina_cost", - "operation": "add_multiplied_total", - "per_size": -0.1 + "operation": "add_multiplied_total" } ] } \ No newline at end of file diff --git a/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_bodies/south.json b/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_bodies/south.json index 747b14273d..cb001fbe53 100644 --- a/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_bodies/south.json +++ b/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_bodies/south.json @@ -2,45 +2,45 @@ "modifiers": [ { "type": "dragonsurvival/body/", + "amount": 0.5, "attribute": "minecraft:generic.attack_damage", - "operation": "add_value", - "per_size": 0.5 + "operation": "add_value" }, { "type": "dragonsurvival/body/", + "amount": 0.2, "attribute": "minecraft:generic.gravity", - "operation": "add_multiplied_total", - "per_size": 0.2 + "operation": "add_multiplied_total" }, { "type": "dragonsurvival/body/", + "amount": 0.2, "attribute": "minecraft:generic.jump_strength", - "operation": "add_value", - "per_size": 0.2 + "operation": "add_value" }, { "type": "dragonsurvival/body/", + "amount": 0.2, "attribute": "minecraft:generic.movement_speed", - "operation": "add_multiplied_total", - "per_size": 0.2 + "operation": "add_multiplied_total" }, { "type": "dragonsurvival/body/", + "amount": -0.2, "attribute": "neoforge:swim_speed", - "operation": "add_value", - "per_size": -0.2 + "operation": "add_value" }, { "type": "dragonsurvival/body/", + "amount": -0.2, "attribute": "dragonsurvival:flight_speed", - "operation": "add_value", - "per_size": -0.2 + "operation": "add_value" }, { "type": "dragonsurvival/body/", + "amount": -0.5, "attribute": "dragonsurvival:flight_stamina_cost", - "operation": "add_multiplied_total", - "per_size": -0.5 + "operation": "add_multiplied_total" } ] } \ No newline at end of file diff --git a/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_bodies/west.json b/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_bodies/west.json index d837b00ef9..d412082460 100644 --- a/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_bodies/west.json +++ b/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_bodies/west.json @@ -3,39 +3,39 @@ "modifiers": [ { "type": "dragonsurvival/body/", + "amount": 0.5, "attribute": "minecraft:generic.attack_knockback", - "operation": "add_value", - "per_size": 0.5 + "operation": "add_value" }, { "type": "dragonsurvival/body/", + "amount": -0.3, "attribute": "minecraft:generic.movement_speed", - "operation": "add_multiplied_total", - "per_size": -0.3 + "operation": "add_multiplied_total" }, { "type": "dragonsurvival/body/", + "amount": 1.0, "attribute": "minecraft:generic.step_height", - "operation": "add_value", - "per_size": 1.0 + "operation": "add_value" }, { "type": "dragonsurvival/body/", + "amount": -0.3, "attribute": "neoforge:swim_speed", - "operation": "add_value", - "per_size": -0.3 + "operation": "add_value" }, { "type": "dragonsurvival/body/", + "amount": 0.2, "attribute": "dragonsurvival:flight_speed", - "operation": "add_value", - "per_size": 0.2 + "operation": "add_value" }, { "type": "dragonsurvival/body/", + "amount": 1.0, "attribute": "dragonsurvival:flight_stamina_cost", - "operation": "add_multiplied_total", - "per_size": 1.0 + "operation": "add_multiplied_total" } ] } \ No newline at end of file diff --git a/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_stages/adult.json b/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_stages/adult.json index 25d8c5a1b0..f1de8c5da2 100644 --- a/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_stages/adult.json +++ b/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_stages/adult.json @@ -20,90 +20,90 @@ "modifiers": [ { "type": "dragonsurvival/stage/", + "amount": 3.0, "attribute": "minecraft:player.submerged_mining_speed", "dragon_type": "sea", - "operation": "add_value", - "per_size": 3.0 + "operation": "add_value" }, { "type": "dragonsurvival/stage/", + "amount": 0.5, "attribute": "minecraft:generic.step_height", - "operation": "add_value", - "per_size": 0.5 + "operation": "add_value" }, { "type": "dragonsurvival/stage/", + "amount": 3.0, "attribute": "minecraft:generic.attack_damage", - "operation": "add_value", - "per_size": 3.0 + "operation": "add_value" }, { "type": "dragonsurvival/stage/", + "amount": 0.1, "attribute": "minecraft:generic.jump_strength", - "operation": "add_value", - "per_size": 0.1 + "operation": "add_value" }, { "type": "dragonsurvival/stage/", + "amount": 1.0, "attribute": "minecraft:generic.safe_fall_distance", - "operation": "add_value", - "per_size": 1.0 + "operation": "add_value" }, { "type": "dragonsurvival/stage/", + "amount": 4.0, "attribute": "dragonsurvival:dragon_breath_range", - "operation": "add_value", - "per_size": 4.0 + "operation": "add_value" }, { "type": "dragonsurvival/stage/", - "attribute": "minecraft:generic.movement_speed", - "operation": "add_value", - "per_size": { + "amount": { "type": "minecraft:linear", "base": 0.0015, "per_level_above_first": 0.0015 - } + }, + "attribute": "minecraft:generic.movement_speed", + "operation": "add_value" }, { "type": "dragonsurvival/stage/", - "attribute": "minecraft:player.entity_interaction_range", - "operation": "add_value", - "per_size": { + "amount": { "type": "minecraft:linear", "base": 0.01, "per_level_above_first": 0.01 - } + }, + "attribute": "minecraft:player.entity_interaction_range", + "operation": "add_value" }, { "type": "dragonsurvival/stage/", - "attribute": "minecraft:player.block_interaction_range", - "operation": "add_value", - "per_size": { + "amount": { "type": "minecraft:linear", "base": 0.01, "per_level_above_first": 0.01 - } + }, + "attribute": "minecraft:player.block_interaction_range", + "operation": "add_value" }, { "type": "dragonsurvival/stage/", - "attribute": "minecraft:generic.max_health", - "operation": "add_value", - "per_size": { + "amount": { "type": "minecraft:linear", "base": 0.5, "per_level_above_first": 0.5 - } + }, + "attribute": "minecraft:generic.max_health", + "operation": "add_value" }, { "type": "dragonsurvival/stage/", - "attribute": "dragonsurvival:dragon_breath_range", - "operation": "add_value", - "per_size": { + "amount": { "type": "minecraft:linear", "base": 0.05, "per_level_above_first": 0.05 - } + }, + "attribute": "dragonsurvival:dragon_breath_range", + "operation": "add_value" } ], "size_range": { diff --git a/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_stages/newborn.json b/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_stages/newborn.json index e2da957b50..4b8932b425 100644 --- a/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_stages/newborn.json +++ b/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_stages/newborn.json @@ -27,70 +27,70 @@ "modifiers": [ { "type": "dragonsurvival/stage/", + "amount": 1.0, "attribute": "minecraft:player.submerged_mining_speed", "dragon_type": "sea", - "operation": "add_value", - "per_size": 1.0 + "operation": "add_value" }, { "type": "dragonsurvival/stage/", + "amount": -7.0, "attribute": "minecraft:generic.max_health", - "operation": "add_value", - "per_size": -7.0 + "operation": "add_value" }, { "type": "dragonsurvival/stage/", + "amount": 1.0, "attribute": "minecraft:generic.attack_damage", - "operation": "add_value", - "per_size": 1.0 + "operation": "add_value" }, { "type": "dragonsurvival/stage/", + "amount": 0.025, "attribute": "minecraft:generic.jump_strength", - "operation": "add_value", - "per_size": 0.025 + "operation": "add_value" }, { "type": "dragonsurvival/stage/", + "amount": 0.25, "attribute": "minecraft:generic.safe_fall_distance", - "operation": "add_value", - "per_size": 0.25 + "operation": "add_value" }, { "type": "dragonsurvival/stage/", + "amount": 1.5, "attribute": "dragonsurvival:dragon_breath_range", - "operation": "add_value", - "per_size": 1.5 + "operation": "add_value" }, { "type": "dragonsurvival/stage/", - "attribute": "minecraft:generic.movement_speed", - "operation": "add_value", - "per_size": { + "amount": { "type": "minecraft:linear", "base": 0.0015, "per_level_above_first": 0.0015 - } + }, + "attribute": "minecraft:generic.movement_speed", + "operation": "add_value" }, { "type": "dragonsurvival/stage/", - "attribute": "minecraft:generic.max_health", - "operation": "add_value", - "per_size": { + "amount": { "type": "minecraft:linear", "base": 0.5, "per_level_above_first": 0.5 - } + }, + "attribute": "minecraft:generic.max_health", + "operation": "add_value" }, { "type": "dragonsurvival/stage/", - "attribute": "dragonsurvival:dragon_breath_range", - "operation": "add_value", - "per_size": { + "amount": { "type": "minecraft:linear", "base": 0.05, "per_level_above_first": 0.05 - } + }, + "attribute": "dragonsurvival:dragon_breath_range", + "operation": "add_value" } ], "next_stage": "dragonsurvival:young", diff --git a/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_stages/young.json b/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_stages/young.json index 3730688563..ec469b24ef 100644 --- a/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_stages/young.json +++ b/src/generated/resources/data/dragonsurvival/dragonsurvival/dragon_stages/young.json @@ -24,90 +24,90 @@ "modifiers": [ { "type": "dragonsurvival/stage/", + "amount": 2.0, "attribute": "minecraft:player.submerged_mining_speed", "dragon_type": "sea", - "operation": "add_value", - "per_size": 2.0 + "operation": "add_value" }, { "type": "dragonsurvival/stage/", + "amount": 0.25, "attribute": "minecraft:generic.step_height", - "operation": "add_value", - "per_size": 0.25 + "operation": "add_value" }, { "type": "dragonsurvival/stage/", + "amount": 2.0, "attribute": "minecraft:generic.attack_damage", - "operation": "add_value", - "per_size": 2.0 + "operation": "add_value" }, { "type": "dragonsurvival/stage/", + "amount": 0.05, "attribute": "minecraft:generic.jump_strength", - "operation": "add_value", - "per_size": 0.05 + "operation": "add_value" }, { "type": "dragonsurvival/stage/", + "amount": 0.5, "attribute": "minecraft:generic.safe_fall_distance", - "operation": "add_value", - "per_size": 0.5 + "operation": "add_value" }, { "type": "dragonsurvival/stage/", + "amount": 2.5, "attribute": "dragonsurvival:dragon_breath_range", - "operation": "add_value", - "per_size": 2.5 + "operation": "add_value" }, { "type": "dragonsurvival/stage/", - "attribute": "minecraft:generic.movement_speed", - "operation": "add_value", - "per_size": { + "amount": { "type": "minecraft:linear", "base": 0.0015, "per_level_above_first": 0.0015 - } + }, + "attribute": "minecraft:generic.movement_speed", + "operation": "add_value" }, { "type": "dragonsurvival/stage/", - "attribute": "minecraft:player.entity_interaction_range", - "operation": "add_value", - "per_size": { + "amount": { "type": "minecraft:linear", "base": 0.01, "per_level_above_first": 0.01 - } + }, + "attribute": "minecraft:player.entity_interaction_range", + "operation": "add_value" }, { "type": "dragonsurvival/stage/", - "attribute": "minecraft:player.block_interaction_range", - "operation": "add_value", - "per_size": { + "amount": { "type": "minecraft:linear", "base": 0.01, "per_level_above_first": 0.01 - } + }, + "attribute": "minecraft:player.block_interaction_range", + "operation": "add_value" }, { "type": "dragonsurvival/stage/", - "attribute": "minecraft:generic.max_health", - "operation": "add_value", - "per_size": { + "amount": { "type": "minecraft:linear", "base": 0.5, "per_level_above_first": 0.5 - } + }, + "attribute": "minecraft:generic.max_health", + "operation": "add_value" }, { "type": "dragonsurvival/stage/", - "attribute": "dragonsurvival:dragon_breath_range", - "operation": "add_value", - "per_size": { + "amount": { "type": "minecraft:linear", "base": 0.05, "per_level_above_first": 0.05 - } + }, + "attribute": "dragonsurvival:dragon_breath_range", + "operation": "add_value" } ], "next_stage": "dragonsurvival:adult", diff --git a/src/main/java/by/dragonsurvivalteam/dragonsurvival/common/codecs/Modifier.java b/src/main/java/by/dragonsurvivalteam/dragonsurvival/common/codecs/Modifier.java index 7e89b251b9..053a690ef9 100644 --- a/src/main/java/by/dragonsurvivalteam/dragonsurvival/common/codecs/Modifier.java +++ b/src/main/java/by/dragonsurvivalteam/dragonsurvival/common/codecs/Modifier.java @@ -9,11 +9,11 @@ import java.util.Optional; -public record Modifier(ModifierType type, Holder attribute, LevelBasedValue perSize, AttributeModifier.Operation operation, Optional dragonType) { +public record Modifier(ModifierType type, Holder attribute, LevelBasedValue amount, AttributeModifier.Operation operation, Optional dragonType) { public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( ModifierType.CODEC.fieldOf("type").forGetter(Modifier::type), Attribute.CODEC.fieldOf("attribute").forGetter(Modifier::attribute), - LevelBasedValue.CODEC.fieldOf("per_size").forGetter(Modifier::perSize), + LevelBasedValue.CODEC.fieldOf("amount").forGetter(Modifier::amount), AttributeModifier.Operation.CODEC.fieldOf("operation").forGetter(Modifier::operation), Codec.STRING.optionalFieldOf("dragon_type").forGetter(Modifier::dragonType) ).apply(instance, Modifier::new)); @@ -34,15 +34,15 @@ public static Modifier perSize(final ModifierType type, final Holder return new Modifier(type, attribute, LevelBasedValue.perLevel(amount), operation, Optional.of(dragonType)); } - public static Modifier create(final ModifierType type, final Holder attribute, final LevelBasedValue perSize, final AttributeModifier.Operation operation) { - return new Modifier(type, attribute, perSize, operation, Optional.empty()); + public static Modifier create(final ModifierType type, final Holder attribute, final LevelBasedValue amount, final AttributeModifier.Operation operation) { + return new Modifier(type, attribute, amount, operation, Optional.empty()); } - public static Modifier create(final ModifierType type, final Holder attribute, final LevelBasedValue perSize, final AttributeModifier.Operation operation, final String dragonType) { - return new Modifier(type, attribute, perSize, operation, Optional.of(dragonType)); + public static Modifier create(final ModifierType type, final Holder attribute, final LevelBasedValue amount, final AttributeModifier.Operation operation, final String dragonType) { + return new Modifier(type, attribute, amount, operation, Optional.of(dragonType)); } public AttributeModifier getModifier(double size) { - return new AttributeModifier(type().randomId(attribute(), operation()), perSize().calculate((int) size), operation()); + return new AttributeModifier(type().randomId(attribute(), operation()), amount().calculate((int) size), operation()); } }