mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +01:00
Merge branch 'master' of github.com:mcMMO-Dev/mcmmo
This commit is contained in:
commit
7441d2d8d6
@ -1,6 +1,8 @@
|
|||||||
Version 2.1.113
|
Version 2.1.113
|
||||||
Check player's PTP world permissions before executing a party teleport
|
Check player's PTP world permissions before executing a party teleport
|
||||||
|
|
||||||
|
Version 2.1.112
|
||||||
|
Use ThreadedLocalRandom for RNG utils, random is seeded, thus creating new instances of Random breaks randomness
|
||||||
Version 2.1.112
|
Version 2.1.112
|
||||||
Correct locale usage for enum access, now enforces using the english locale to prevent issues with oddball locales for configs/commands
|
Correct locale usage for enum access, now enforces using the english locale to prevent issues with oddball locales for configs/commands
|
||||||
Fixed a NPE that can occur if a player engages in combat with specific skills before their profile is loaded
|
Fixed a NPE that can occur if a player engages in combat with specific skills before their profile is loaded
|
||||||
|
@ -13,6 +13,7 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
|
|
||||||
public class RandomChanceUtil
|
public class RandomChanceUtil
|
||||||
{
|
{
|
||||||
@ -78,9 +79,7 @@ public class RandomChanceUtil
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean rollDice(double chanceOfSuccess, int bound) {
|
public static boolean rollDice(double chanceOfSuccess, int bound) {
|
||||||
Random random = new Random();
|
return chanceOfSuccess > ThreadLocalRandom.current().nextInt(bound);
|
||||||
|
|
||||||
return chanceOfSuccess > random.nextInt(bound);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -100,8 +99,6 @@ public class RandomChanceUtil
|
|||||||
{
|
{
|
||||||
double chanceOfSuccess = calculateChanceOfSuccess(randomChance);
|
double chanceOfSuccess = calculateChanceOfSuccess(randomChance);
|
||||||
|
|
||||||
Random random = new Random();
|
|
||||||
|
|
||||||
//Check the odds
|
//Check the odds
|
||||||
return rollDice(chanceOfSuccess, 100);
|
return rollDice(chanceOfSuccess, 100);
|
||||||
}
|
}
|
||||||
|
@ -442,7 +442,7 @@ Bonus_Drops:
|
|||||||
Melon_Slice: true
|
Melon_Slice: true
|
||||||
Nether_Wart: true
|
Nether_Wart: true
|
||||||
Potatoes: true
|
Potatoes: true
|
||||||
Potatoe: true
|
Potato: true
|
||||||
Pumpkin: true
|
Pumpkin: true
|
||||||
Red_Mushroom: true
|
Red_Mushroom: true
|
||||||
Sugar_Cane: true
|
Sugar_Cane: true
|
||||||
|
@ -443,6 +443,7 @@ Enchantment_Drop_Rates:
|
|||||||
LEGENDARY: 0.75
|
LEGENDARY: 0.75
|
||||||
#
|
#
|
||||||
# Settings for Excavation's Archaeology
|
# Settings for Excavation's Archaeology
|
||||||
|
# If you are in retro mode, Drop_Level is multiplied by 10.
|
||||||
###
|
###
|
||||||
Excavation:
|
Excavation:
|
||||||
CAKE:
|
CAKE:
|
||||||
@ -573,6 +574,7 @@ Excavation:
|
|||||||
Drops_From: [Dirt, Coarse_Dirt, Podzol, Grass_Block, Sand, Red_Sand, Gravel, Clay, Mycelium, Soul_Sand]
|
Drops_From: [Dirt, Coarse_Dirt, Podzol, Grass_Block, Sand, Red_Sand, Gravel, Clay, Mycelium, Soul_Sand]
|
||||||
#
|
#
|
||||||
# Settings for Hylian Luck
|
# Settings for Hylian Luck
|
||||||
|
# If you are in retro mode, Drop_Level is multiplied by 10.
|
||||||
###
|
###
|
||||||
Hylian_Luck:
|
Hylian_Luck:
|
||||||
MELON_SEEDS:
|
MELON_SEEDS:
|
||||||
@ -631,6 +633,7 @@ Hylian_Luck:
|
|||||||
Drops_From: [Pots]
|
Drops_From: [Pots]
|
||||||
#
|
#
|
||||||
# Settings for Shake
|
# Settings for Shake
|
||||||
|
# If you are in retro mode, Drop_Level is multiplied by 10.
|
||||||
###
|
###
|
||||||
Shake:
|
Shake:
|
||||||
BLAZE:
|
BLAZE:
|
||||||
|
Loading…
Reference in New Issue
Block a user