fix it once and for all
This commit is contained in:
parent
3c79dbf8c3
commit
f82b4d9c4e
1 changed files with 3 additions and 2 deletions
|
@ -85,10 +85,11 @@ public class Configuration {
|
||||||
|
|
||||||
int min = (int) dropMap.get("quantityMin");
|
int min = (int) dropMap.get("quantityMin");
|
||||||
int max = (int) dropMap.get("quantityMax");
|
int max = (int) dropMap.get("quantityMax");
|
||||||
|
double chance;
|
||||||
try {
|
try {
|
||||||
double chance = (double) dropMap.get("chance");
|
chance = (double) dropMap.get("chance");
|
||||||
} catch (ClassCastException e) { // pointlessest error ever
|
} catch (ClassCastException e) { // pointlessest error ever
|
||||||
double chance = ((Integer) dropMap.get("chance")).doubleValue();
|
chance = ((Integer) dropMap.get("chance")).doubleValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
drops.add(new Drop(itemStack, min, max, chance));
|
drops.add(new Drop(itemStack, min, max, chance));
|
||||||
|
|
Loading…
Reference in a new issue