mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
Fixes #2760
This commit is contained in:
parent
9436ce451a
commit
7ffc8aff24
@ -55,6 +55,7 @@
|
||||
* Fixed machines not respecting max size from inventories
|
||||
* Fixed #2761
|
||||
* Fixed #2460
|
||||
* Fixed #2760
|
||||
|
||||
## Release Candidate 19 (11 Jan 2021)
|
||||
|
||||
|
@ -246,13 +246,14 @@ public class TalismanListener implements Listener {
|
||||
|
||||
// Wizard Talisman
|
||||
if (!enchantments.containsKey(Enchantment.SILK_TOUCH) && Enchantment.LOOT_BONUS_BLOCKS.canEnchantItem(e.getItem()) && Talisman.checkFor(e, SlimefunItems.TALISMAN_WIZARD)) {
|
||||
|
||||
for (Enchantment enchantment : enchantments.keySet()) {
|
||||
if (random.nextInt(100) < 40) {
|
||||
e.getEnchantsToAdd().put(enchantment, random.nextInt(3) + 1);
|
||||
// Randomly lower some enchantments
|
||||
for (Map.Entry<Enchantment, Integer> entry : enchantments.entrySet()) {
|
||||
if (entry.getValue() > 1 && random.nextInt(100) < 40) {
|
||||
enchantments.put(entry.getKey(), entry.getValue() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
// Give an extra Fortune boost (Lvl 3 - 5)
|
||||
enchantments.put(Enchantment.LOOT_BONUS_BLOCKS, random.nextInt(3) + 3);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user