Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2a933f5582 | |||
| 6d7791829c |
@@ -217,6 +217,7 @@ public class WizardData implements INBTSerializable<NBTTagCompound> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the imbuement duration associated with the given imbuement for this player, or 0 if it does not exist. */
|
/** Returns the imbuement duration associated with the given imbuement for this player, or 0 if it does not exist. */
|
||||||
|
@SuppressWarnings("unlikely-arg-type")
|
||||||
public int getImbuementDuration(Enchantment enchantment){
|
public int getImbuementDuration(Enchantment enchantment){
|
||||||
// Need to check that i is not null, otherwise it throws an NPE when Java auto-unboxes it.
|
// Need to check that i is not null, otherwise it throws an NPE when Java auto-unboxes it.
|
||||||
// What's nice here is that the map simply accepts objects as keys, so there's no need to cast or throw exceptions.
|
// What's nice here is that the map simply accepts objects as keys, so there's no need to cast or throw exceptions.
|
||||||
|
|||||||
@@ -102,7 +102,8 @@ public class RandomSpell extends LootFunction {
|
|||||||
if(tier == Tier.BASIC){
|
if(tier == Tier.BASIC){
|
||||||
element = Element.values()[random.nextInt(Element.values().length)];
|
element = Element.values()[random.nextInt(Element.values().length)];
|
||||||
}else{
|
}else{
|
||||||
element = ArrayUtils.removeElement(Element.values(), Element.MAGIC)[random.nextInt(Element.values().length)];
|
Element[] elements = ArrayUtils.removeElement(Element.values(), Element.MAGIC);
|
||||||
|
element = elements[random.nextInt(elements.length)];
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
// In theory, swapping this line to the commented one should make absolutely no difference.
|
// In theory, swapping this line to the commented one should make absolutely no difference.
|
||||||
|
|||||||
Reference in New Issue
Block a user