From 4cd80387297c3749960626e8c0996ff4d473bdbf Mon Sep 17 00:00:00 2001 From: "yrsegal@gmail.com" Date: Tue, 26 Apr 2022 11:17:17 -0400 Subject: [PATCH] fix amethyst shard "reducer" loot mod not... reducing --- .../loot_modifiers/amethyst_cluster_shard_reducer.json | 4 ++-- .../forge/datagen/lootmods/AmethystShardReducerModifier.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Common/src/generated/resources/data/hexcasting/loot_modifiers/amethyst_cluster_shard_reducer.json b/Common/src/generated/resources/data/hexcasting/loot_modifiers/amethyst_cluster_shard_reducer.json index d4846240..0228fd42 100644 --- a/Common/src/generated/resources/data/hexcasting/loot_modifiers/amethyst_cluster_shard_reducer.json +++ b/Common/src/generated/resources/data/hexcasting/loot_modifiers/amethyst_cluster_shard_reducer.json @@ -18,6 +18,6 @@ } } ], - "modifier": -2.0, + "modifier": -0.5, "type": "hexcasting:amethyst_shard_reducer" -} \ No newline at end of file +} diff --git a/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/lootmods/AmethystShardReducerModifier.java b/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/lootmods/AmethystShardReducerModifier.java index d623b011..f856f2c0 100644 --- a/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/lootmods/AmethystShardReducerModifier.java +++ b/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/lootmods/AmethystShardReducerModifier.java @@ -26,7 +26,7 @@ public class AmethystShardReducerModifier extends LootModifier { protected List doApply(List generatedLoot, LootContext context) { for (var stack : generatedLoot) { if (stack.is(Items.AMETHYST_SHARD)) { - stack.shrink((int) (stack.getCount() * modifier)); + stack.setCount((int) (stack.getCount() * (1 + modifier))); } } return generatedLoot;