fix amethyst shard "reducer" loot mod not... reducing

This commit is contained in:
yrsegal@gmail.com 2022-04-26 11:17:17 -04:00
parent 463afb8923
commit 4cd8038729
2 changed files with 3 additions and 3 deletions

View file

@ -18,6 +18,6 @@
}
}
],
"modifier": -2.0,
"modifier": -0.5,
"type": "hexcasting:amethyst_shard_reducer"
}
}

View file

@ -26,7 +26,7 @@ public class AmethystShardReducerModifier extends LootModifier {
protected List<ItemStack> doApply(List<ItemStack> 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;